[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:42:37 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: Leading Zero'''
Replying to [comment:40 nacin]:
> * The requirement for a leading 0 for a decimal value (`.1s` or `.25`)
seems weird. They get minified out anyway. And, it seems, we omit them all
over the place. Which is more common in our codebase? What's common in the
real world? (This would mean `number-leading-zero: always`).
Replying to [comment:41 GaryJ]:
> That's part of the documented [https://make.wordpress.org/core/handbook
/best-practices/coding-standards/css/#values WP coding standards for CSS]:
"Use a leading zero for decimal values, including in rgba()."
Replying to [comment:42 helen]:
> My recollection of why we went this route in our coding standards was
also for human readability: `.` is easy to miss, `0.` less so. I'd prefer
to add them in where missing.
Per the above, it is listed as one of our standards, a quick straw poll of
WP Australia was to also include the leading zero, primarily for
readability per Helen's explanation above.
Stats: We would have to remove 399 leading zeros if we changed our
standards to **not** include leading zeros versus adding 185 instances
where leading zeros are currently missing.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/29792#comment:50>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list