Skip to content

Commit

Permalink
Add border logical property shorthand data
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewLeedham authored and Siilwyn committed Sep 2, 2022
1 parent 7f0cac1 commit 2dea32f
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,12 @@ const keepOverridesTests = [
expected: 'a{border-style: none;border-block-end: 1px solid purple;}',
options: { keepOverrides: true },
},
{
message: 'Keep border width logical property declarations in place.',
fixture: 'a{background: grey;border-width: 0;border-top-width: 1px;border-inline-start-width: 1px;}',
expected: 'a{background: grey;border-width: 0;border-inline-start-width: 1px;border-top-width: 1px;}',
options: { keepOverrides: true },
},
];

testCssFixtures('Should order declarations.', sortOrderTests);
Expand Down
24 changes: 24 additions & 0 deletions src/shorthand-data.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -180,14 +180,26 @@ export const shorthandData = {
'border-right-width',
'border-bottom-width',
'border-left-width',
'border-inline-start-width',
'border-inline-end-width',
'border-block-start-width',
'border-block-end-width',
'border-top-style',
'border-right-style',
'border-bottom-style',
'border-left-style',
'border-inline-start-style',
'border-inline-end-style',
'border-block-start-style',
'border-block-end-style',
'border-top-color',
'border-right-color',
'border-bottom-color',
'border-left-color',
'border-inline-start-color',
'border-inline-end-color',
'border-block-start-color',
'border-block-end-color',
'border-block',
'border-block-start',
'border-block-end',
Expand Down Expand Up @@ -238,18 +250,30 @@ export const shorthandData = {
'border-bottom-color',
'border-left-color',
'border-right-color',
'border-inline-start-color',
'border-inline-end-color',
'border-block-start-color',
'border-block-end-color',
],
'border-width': [
'border-top-width',
'border-bottom-width',
'border-left-width',
'border-right-width',
'border-inline-start-width',
'border-inline-end-width',
'border-block-start-width',
'border-block-end-width',
],
'border-style': [
'border-top-style',
'border-bottom-style',
'border-left-style',
'border-right-style',
'border-inline-start-style',
'border-inline-end-style',
'border-block-start-style',
'border-block-end-style',
],
'border-radius': [
'border-top-right-radius',
Expand Down

0 comments on commit 2dea32f

Please sign in to comment.