Skip to content

Commit

Permalink
feat(atomizer): add text-wrap rule (#897)
Browse files Browse the repository at this point in the history
  • Loading branch information
redonkulus authored May 19, 2024
1 parent 41e3d3b commit 7440be4
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
23 changes: 23 additions & 0 deletions packages/atomizer/src/rules.js
Original file line number Diff line number Diff line change
Expand Up @@ -3783,6 +3783,29 @@ module.exports = [
},
/**
==================================================================
TEXT-WRAP
==================================================================
*/
{
type: 'pattern',
name: 'Text wrap',
matcher: 'Tw',
allowParamToValue: false,
styles: {
'text-wrap': '$0',
},
arguments: [
{
w: 'wrap',
nw: 'nowrap',
b: 'balance',
p: 'pretty',
s: 'stable',
},
],
},
/**
==================================================================
TOUCH-ACTION
==================================================================
*/
Expand Down
19 changes: 19 additions & 0 deletions packages/atomizer/tests/__snapshots__/rules.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -9569,6 +9569,25 @@ exports[`Rules text-underline-offset 1`] = `
"
`;

exports[`Rules text-wrap 1`] = `
".Tw\\(w\\) {
text-wrap: wrap;
}
.Tw\\(nw\\) {
text-wrap: nowrap;
}
.Tw\\(b\\) {
text-wrap: balance;
}
.Tw\\(p\\) {
text-wrap: pretty;
}
.Tw\\(s\\) {
text-wrap: stable;
}
"
`;

exports[`Rules top 1`] = `
".T\\(a\\) {
top: auto;
Expand Down

0 comments on commit 7440be4

Please sign in to comment.