[wp-trac] [WordPress Trac] #29792: Grunt: Add a precommit task to check for CSS syntax errors
WordPress Trac
noreply at wordpress.org
Mon Oct 6 17:57:17 UTC 2014
#29792: Grunt: Add a precommit task to check for CSS syntax errors
------------------------------+------------------
Reporter: helen | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 4.1
Component: Build/Test Tools | Version:
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
------------------------------+------------------
Comment (by nacin):
Replying to [comment:1 x2048]:
> 1) all media queries will need to be rewritten to not include spaces
between parentheses, or CSSLint will show errors.
No thanks. :) I patched CSSLint for this: https://github.com/CSSLint
/parser-lib/pull/125
I think CSSLint is actually feasible here. Here's what I'm using, with
good effect:
{{{
{
// I used jQuery UI as a starting point
"adjoining-classes": false,
"box-sizing": false,
"compatible-vendor-prefixes": false,
"duplicate-background-images": false,
"import": false,
"important": false,
"outline-none": false,
"overqualified-elements": false,
"text-indent": false,
// Additional
"ids": false,
"box-model": false,
"qualified-headings": false,
"unique-headings": false,
"universal-selector": false,
"regex-selectors": false,
"floats": false,
"font-sizes": false
}
}}}
With my patch applied to parserlib, this results in:
* errors for unknown moz-document and ms-keyframes
* no other errors
* 65 warnings
The warnings all seem like good things to fix:
* non-adjacent duplicate properties (5)
* unknown property values (3)
* no fallback colors for RGBA usage (18)
* one vendor-prefixed property without the standard property
* one verbose property usage when shorthand will do (1)
* zero units (17)
* some display property grouping warnings (19)
* one unqualified attribute (this one may be a bug)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/29792#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list