Skip to content

Commit

Permalink
feat: add hyphens-* classes (#205)
Browse files Browse the repository at this point in the history
  • Loading branch information
pearofducks committed Feb 28, 2024
1 parent 6f8907e commit dcc0b4e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/_rules/static.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,17 @@ export const contents = [
['content-none', { content: 'none' }],
];

export const hyphens = [
...['manual', 'auto', 'none', ...globalKeywords].map((keyword) => [
`hyphens-${keyword}`,
{
'-webkit-hyphens': keyword,
'-ms-hyphens': keyword,
hyphens: keyword,
},
]),
];

export const breaks = [
['break-normal', { 'overflow-wrap': 'normal', 'word-break': 'normal' }],
['break-words', { 'overflow-wrap': 'break-word' }],
Expand Down
8 changes: 8 additions & 0 deletions test/__snapshots__/static.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,14 @@ exports[`static rules do static things 1`] = `
.select-unset{user-select:unset;}
.content-empty{content:"";}
.content-none{content:none;}
.hyphens-manual{-webkit-hyphens:manual;-ms-hyphens:manual;hyphens:manual;}
.hyphens-auto{-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto;}
.hyphens-none{-webkit-hyphens:none;-ms-hyphens:none;hyphens:none;}
.hyphens-inherit{-webkit-hyphens:inherit;-ms-hyphens:inherit;hyphens:inherit;}
.hyphens-initial{-webkit-hyphens:initial;-ms-hyphens:initial;hyphens:initial;}
.hyphens-revert{-webkit-hyphens:revert;-ms-hyphens:revert;hyphens:revert;}
.hyphens-revert-layer{-webkit-hyphens:revert-layer;-ms-hyphens:revert-layer;hyphens:revert-layer;}
.hyphens-unset{-webkit-hyphens:unset;-ms-hyphens:unset;hyphens:unset;}
.break-normal{overflow-wrap:normal;word-break:normal;}
.break-words{overflow-wrap:break-word;}
.break-all{word-break:break-all;}
Expand Down

0 comments on commit dcc0b4e

Please sign in to comment.