[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:41:43 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: String Quotes'''
Replying to [comment:40 nacin]:
> * `string-quotes` -- What is more common in our CSS, single quotes or
double quotes? We already prefer single quotes in JS (unlike the jQuery
project) and in PHP, so should we just keep using it in CSS too? Is there
a reason to not be consistent? (I think double quotes look more natural
when surrounding a font name, I'm just asking.)
Replying to [comment:41 GaryJ]:
> Already documented in the CSS standards as: "Use double quotes rather
than single quotes, and only when needed, such as when a font name has a
space.". Custom fonts, using a single name, don't technically need any
quotes, but some folks favour them for some reason.
Replying to [comment:42 helen]:
> Double quotes somehow "feel" more right in CSS, I think possibly because
it's a standard in many other projects. It's not just voodoo personal
preference, promise :)
Indeed, defined in our CSS Standards as `Use double quotes rather than
single quotes, and only when needed, such as when a font name has a
space.` [https://make.wordpress.org/core/handbook/best-practices/coding-
standards/css/#values here]
Stats: ~280 were changed to double quotes in r34011 with 14 new proposed
changes here in this ticket versus 977 if we were to change to single
quotes
--
Ticket URL: <https://core.trac.wordpress.org/ticket/29792#comment:49>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list