Skip to content

Commit

Permalink
feat: add more declaration block rules
Browse files Browse the repository at this point in the history
  • Loading branch information
rodoabad committed Apr 4, 2016
1 parent 3c3be5f commit 5fb43d4
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 2 deletions.
38 changes: 38 additions & 0 deletions lib/declaration-block.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,30 @@ module.exports = {
'background'
]
},
{
order: 'strict',
emptyLineBefore: 'always',
properties: [
'font',
'font-family',
'font-feature-settings',
'font-kerning',
'font-language-override',
'font-size',
'font-size-adjust',
'font-stretch',
'font-style',
'font-synthesis',
'font-variant',
'font-variant-alternates',
'font-variant-caps',
'font-variant-east-asian',
'font-variant-ligatures',
'font-variant-numeric',
'font-variant-position',
'font-weight'
]
},
{
order: 'strict',
emptyLineBefore: 'always',
Expand All @@ -26,6 +50,7 @@ module.exports = {
order: 'strict',
emptyLineBefore: 'always',
properties: [
'margin',
'margin-top',
'margin-right',
'margin-bottom',
Expand All @@ -36,11 +61,24 @@ module.exports = {
order: 'strict',
emptyLineBefore: 'always',
properties: [
'padding',
'padding-top',
'padding-right',
'padding-bottom',
'padding-left'
]
},
{
order: 'strict',
emptyLineBefore: 'always',
properties: [
'width',
'max-width',
'min-width',
'height',
'max-height',
'min-height'
]
}
],
{
Expand Down
5 changes: 3 additions & 2 deletions test/sample.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@
color: white;
background: #ffa;

font-family: 'Times New Roman', 'Times', serif;
font-weight: bold;

top: calc(1rem + 2rem);
bottom: 1rem;

font-family: 'Times New Roman', 'Times', serif;
font-weight: bold;
line-height: 0.5;

transform: translate(1, 1) scale(3);
Expand Down

0 comments on commit 5fb43d4

Please sign in to comment.