[buddypress-trac] [BuddyPress Trac] #7028: Use stylelint to lint SCSS & CSS replacing Ruby gem `scss_lint`

buddypress-trac noreply at wordpress.org
Wed Apr 27 07:52:05 UTC 2016

#7028: Use stylelint to lint SCSS & CSS replacing Ruby gem `scss_lint`
 Reporter:  netweb                     |       Owner:
     Type:  defect (bug)               |      Status:  new
 Priority:  normal                     |   Milestone:  Future Release
Component:  Tools - Build Process      |     Version:  2.3.0
 Severity:  normal                     |  Resolution:
 Keywords:  needs-patch needs-refresh  |

Comment (by hnla):


     Why do those scss lint commands need to be in true css comment syntax
 as in a scss file that means they are compiled pointlessly to the real
 stylefile, with scsslint I used their rules but in forward slash escapes

 >Where exactly, can you give me an example of where I missed that? My
 quick check of the 7028.patch​ shows the double slash // comments
 untouched and we should continue to use both comment formats where
 applicable so that comments we want compiled and to appear in the compiled
 CSS using /* and to not be compiled with //

 It was glancing through and seeing in the compiled css files generated
 from the scss companion sheets:
 /* stylelint-disable declaration-colon-space-after */
 /* stylelint-enable */

 In the twentyfifteen.scss file we have:
 // Variables: color definitions
         129     /* stylelint-disable declaration-colon-space-after */
 127     130     $content-background: #fff;
 128     131     $light-background:   #f7f7f7;
 129     132     $medium-background:  #ccc;
 …       …
 141     144     $stripe-even:        #dbe5ff;
 142     145     $unread:             #dce5ff;
 143     146     $link-action:        #c82b2b;
         147     /* stylelint-enable */

 Preserving the human readable formatting keeping the hex codes lined up.
 I presume we can change the css comments to forward slash (These comments
 are after all not comments we want compiled to a true stylesheet)  as per
 my example in the sheets where I cancel the check on vendor prefix for a
 mixins block.

Ticket URL: <https://buddypress.trac.wordpress.org/ticket/7028#comment:6>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac

More information about the buddypress-trac mailing list