From 91335297c3847dfc2c9289baf105e0965a1db812 Mon Sep 17 00:00:00 2001 From: rodoabad Date: Sun, 3 Apr 2016 19:40:45 -0500 Subject: [PATCH] feat: add more declaration block rules --- lib/declaration-block.js | 65 ++++++++++++++++++++++++++++++++++------ test/sample.scss | 2 ++ 2 files changed, 58 insertions(+), 9 deletions(-) diff --git a/lib/declaration-block.js b/lib/declaration-block.js index d41db10..5e13807 100644 --- a/lib/declaration-block.js +++ b/lib/declaration-block.js @@ -8,8 +8,61 @@ module.exports = { order: 'strict', emptyLineBefore: 'always', properties: [ - 'color', - 'background' + 'color' + ] + }, + { + order: 'strict', + emptyLineBefore: 'always', + properties: [ + 'background', + 'background-attachment', + 'background-clip', + 'background-color', + 'background-image', + 'background-origin', + 'background-position', + 'background-poistion-x', + 'background-poistion-y', + 'background-repeat', + 'background-size' + ] + }, + { + order: 'strict', + emptyLineBefore: 'always', + properties: [ + 'border', + 'border-color', + 'border-image', + 'border-image-outset', + 'border-image-repeat', + 'border-image-slice', + 'border-image-source', + 'border-image-width', + 'border-radius', + 'border-style', + 'border-width', + 'border-top', + 'border-top-color', + 'border-top-left-radius', + 'border-top-right-radius', + 'border-top-style', + 'border-top-width', + 'border-right', + 'border-right-color', + 'border-right-style', + 'border-right-width', + 'border-bottom', + 'border-bottom-color', + 'border-bottom-left-radius', + 'border-bottom-right-radius', + 'border-bottom-style', + 'border-bottom-width', + 'border-left', + 'border-left-color', + 'border-left-style', + 'border-left-width' ] }, { @@ -63,13 +116,7 @@ module.exports = { 'top', 'right', 'bottom', - 'left', - 'clear', - 'display', - 'float', - 'position', - 'visibility', - 'z-index' + 'left' ] }, { diff --git a/test/sample.scss b/test/sample.scss index e8d0d5f..7d30692 100644 --- a/test/sample.scss +++ b/test/sample.scss @@ -4,6 +4,7 @@ .moo { color: white; + background: #ffa; font-family: 'Times New Roman', 'Times', serif; @@ -77,5 +78,6 @@ .alpha { color: black; + background: red; }