[wp-trac] [WordPress Trac] #29792: Grunt: Add a precommit task to check for CSS syntax errors
WordPress Trac
noreply at wordpress.org
Tue Oct 13 09:43:08 UTC 2015
#29792: Grunt: Add a precommit task to check for CSS syntax errors
------------------------------+-----------------------
Reporter: helen | Owner: netweb
Type: enhancement | Status: assigned
Priority: normal | Milestone: 4.4
Component: Build/Test Tools | Version:
Severity: normal | Resolution:
Keywords: needs-patch | Focuses:
------------------------------+-----------------------
Comment (by netweb):
'''Rule questions: SCSS Comments'''
Replying to [comment:40 nacin]:
> * `src/wp-admin/css/colors/_admin.scss:83` uses `//` as a commenting
style. I know this is allowed in SCSS, but do these rules mandate `//`
over `/* */`? Should we always use `/* */`, since it's ultimately CSS? I
don't see what stylelint rule this corresponds to.
Replying to [comment:41 GaryJ]:
> `//` gets removed by default during the SCSS->CSS compiling, so it never
makes it into CSS. There's a functional difference at play here, not just
a code style preference.
Replying to [comment:42 helen]:
> Per @GaryJ, they are functionally different, but I'm not sure if/when we
would have rules in our very limited use of SCSS that shouldn't be in the
unminified compiled CSS.
My patch `29792-css-patch.diff` and this specific line `src/wp-
admin/css/colors/_admin.scss:83` was a hack/test I had added but hadn't
removed for the patchto workaround upstream node-sass issue
[https://github.com/sass/node-sass/issues/1139 here] that turns out to be
a libsass issue [https://github.com/sass/libsass/issues/1453 here] and
will ship as part of libsass 3.3
[https://github.com/sass/libsass/issues/1453]
Per the above there is functional differences between both comment types
and there shouldn't be any changes to existing SCSS for any comments
making this a non-issue for now :)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/29792#comment:51>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list