Skip to content

Commit

Permalink
Add more shorthand data
Browse files Browse the repository at this point in the history
  • Loading branch information
hudochenkov committed Oct 20, 2024
1 parent 38e2915 commit b304239
Show file tree
Hide file tree
Showing 3 changed files with 113 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,26 @@ a {
border-color: transparent;
border-bottom-color: pink;
}

a {
margin-inline: 0;
margin: 0;
}

a {
margin-bottom: 0;
margin-inline: 0;
margin: 0;
}

a {
margin-top: 0;
margin-inline: 0;
margin: 0;
}

a {
margin-bottom: 0;
margin-inline-start: 0;
margin: 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,26 @@ a {
border-color: transparent;
border-bottom-color: pink;
}

a {
margin: 0;
margin-inline: 0;
}

a {
margin: 0;
margin-inline: 0;
margin-bottom: 0;
}

a {
margin: 0;
margin-inline: 0;
margin-top: 0;
}

a {
margin: 0;
margin-inline-start: 0;
margin-bottom: 0;
}
75 changes: 67 additions & 8 deletions lib/properties-order/shorthandData.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,72 @@
'use strict';

// See https://github.com/stylelint/stylelint/blob/10.1.0/lib/reference/shorthandData.js
// More properties were added in addition to the file above
module.exports = {
margin: ['margin-top', 'margin-bottom', 'margin-left', 'margin-right'],
'margin-block': ['margin-block-start', 'margin-block-end'],
'margin-inline': ['margin-inline-start', 'margin-inline-end'],
padding: ['padding-top', 'padding-bottom', 'padding-left', 'padding-right'],
'padding-block': ['padding-block-start', 'padding-block-end'],
'padding-inline': ['padding-inline-start', 'padding-inline-end'],
margin: [
'margin-top',
'margin-bottom',
'margin-left',
'margin-right',
'margin-block',
'margin-block-start',
'margin-block-end',
'margin-inline',
'margin-inline-start',
'margin-inline-end',
],
'margin-block': [
'margin-block-start',
'margin-block-end',
'margin-top',
'margin-bottom',
'margin-left',
'margin-right',
],
'margin-block-start': ['margin-top', 'margin-bottom', 'margin-left', 'margin-right'],
'margin-block-end': ['margin-top', 'margin-bottom', 'margin-left', 'margin-right'],
'margin-inline': [
'margin-inline-start',
'margin-inline-end',
'margin-top',
'margin-bottom',
'margin-left',
'margin-right',
],
'margin-inline-start': ['margin-top', 'margin-bottom', 'margin-left', 'margin-right'],
'margin-inline-end': ['margin-top', 'margin-bottom', 'margin-left', 'margin-right'],
padding: [
'padding-top',
'padding-bottom',
'padding-left',
'padding-right',
'padding-block',
'padding-block-start',
'padding-block-end',
'padding-inline',
'padding-inline-start',
'padding-inline-end',
],
'padding-block': [
'padding-block-start',
'padding-block-end',
'padding-top',
'padding-bottom',
'padding-left',
'padding-right',
],
'padding-block-start': ['padding-top', 'padding-bottom', 'padding-left', 'padding-right'],
'padding-block-end': ['padding-top', 'padding-bottom', 'padding-left', 'padding-right'],
'padding-inline': [
'padding-inline-start',
'padding-inline-end',
'padding-top',
'padding-bottom',
'padding-left',
'padding-right',
],
'padding-inline-start': ['padding-top', 'padding-bottom', 'padding-left', 'padding-right'],
'padding-inline-end': ['padding-top', 'padding-bottom', 'padding-left', 'padding-right'],
background: [
'background-image',
'background-size',
Expand Down Expand Up @@ -153,6 +212,6 @@ module.exports = {
'mask-border-repeat',
'mask-border-slice',
'mask-border-source',
'mask-border-width'
]
'mask-border-width',
],
};

0 comments on commit b304239

Please sign in to comment.