WordPress.org

Make WordPress Core

Opened 14 months ago

Closed 14 months ago

Last modified 14 months ago

#23653 closed defect (bug) (fixed)

Twenty Thirteen: Single/double quote consistency?

Reported by: markmcwilliams Owned by: lancewillett
Milestone: 3.6 Priority: normal
Severity: trivial Version: 3.6
Component: Bundled Theme Keywords: has-patch
Focuses: Cc:

Description

There's a mixture of single and double quotes used throughout the CSS file. Perhaps a trivial matter, but surely keeping things consistent would be a good idea?

I opted to make them all single, as there appeared to be less of them using the double.

Attachments (5)

23653.diff (6.4 KB) - added by markmcwilliams 14 months ago.
23653.2.diff (4.8 KB) - added by markmcwilliams 14 months ago.
23653.3.diff (4.7 KB) - added by markmcwilliams 14 months ago.
23653.4.diff (6.3 KB) - added by markmcwilliams 14 months ago.
23653.5.diff (8.3 KB) - added by markmcwilliams 14 months ago.

Download all attachments as: .zip

Change History (20)

markmcwilliams14 months ago

comment:1 follow-up: lancewillett14 months ago

  • Keywords 2nd-opinion removed
  • Milestone changed from Awaiting Review to 3.6

Let's stick with the CSS code standards: http://make.wordpress.org/core/handbook/coding-standards/css/#values -- "Use double quotes rather than single quotes (regardless if there is a space or not)."

Can you make a patch that fixes any single quotes?

comment:2 in reply to: ↑ 1 markmcwilliams14 months ago

Replying to lancewillett:

Let's stick with the CSS code standards: http://make.wordpress.org/core/handbook/coding-standards/css/#values -- "Use double quotes rather than single quotes (regardless if there is a space or not)."

Can you make a patch that fixes any single quotes?

I missed that part of the code standards.

Yup, will do that just now ...

markmcwilliams14 months ago

comment:3 markmcwilliams14 months ago

Think that's all of them caught.

I replaced the quotes round the Bitter font, but I'm unsure if it even needs them?

comment:4 lancewillett14 months ago

Cool, thank you.

If no whitespace in the name, the font does not need to have quotes around it.

comment:5 markmcwilliams14 months ago

I'll upload another patch, plus I missed some single quotes! :(

comment:6 follow-up: nacin14 months ago

  • Owner set to nacin
  • Status changed from new to reviewing

That standards document isn't quite finalized, if I recall correctly. (It's been a while.)

One standard that was also pushed was:

  • No quotes for image sources.
  • Single quotes should be unused.
  • Double quotes for font families with spaces, and as needed elsewhere.

Either way, I believe double over single quotes is prevailing. No, Bitter does not need quotes.

comment:7 nacin14 months ago

  • Owner changed from nacin to lancewillett

markmcwilliams14 months ago

comment:8 markmcwilliams14 months ago

Latest patch reflects [23546] which removed a mention of Bitter.

comment:9 helen14 months ago

Replying to nacin:

You are correct - that particular guideline was a rough rule based on a really informal, really small vote, but I think I'd like to change it to the other proposal - no quotes unless needed for spaces, and then double quotes for that. (Shhh, don't look at core CSS.)

markmcwilliams14 months ago

comment:10 in reply to: ↑ 6 ; follow-up: markmcwilliams14 months ago

Replying to nacin & helen:

I go away for a few minutes haha ...

Think the 23653.4.diff patch covers what you were both talking about? :)

Last edited 14 months ago by markmcwilliams (previous) (diff)

comment:11 in reply to: ↑ 10 ; follow-up: lancewillett14 months ago

Replying to markmcwilliams:

Think the 23653.4.diff patch covers what you were both talking about? :)

Almost there ... Genericons as a one-word font-family can lose the quotes -- also in custom-header.php are two cases of quotes around CSS URL values, if you want to patch those up, too.

Might as well capitalize "courier new" also, just to be precise: "Courier New" is the font family.

markmcwilliams14 months ago

comment:12 in reply to: ↑ 11 markmcwilliams14 months ago

Replying to lancewillett:

Almost there ... Genericons as a one-word font-family can lose the quotes -- also in custom-header.php are two cases of quotes around CSS URL values, if you want to patch those up, too.

Wasn't even thinking, just replaced those single quotes haha!

Caught another couple of single quotes I also, somehow, missed in the process.

in custom-header.php there was three cases of quotes in the CSS URL value. I also escaped a particular one to match one further down. Oh and removed singles quotes from Bitter there too (side note: what a cool, but funny font name)!

Might as well capitalize "courier new" also, just to be precise: "Courier New" is the font family.

I debated about just deleting it entirely! ;) #23507

comment:13 follow-up: lancewillett14 months ago

Nice patch, .5 looking good. I found 1 more case of single quotes in custom-header.php.

comment:14 lancewillett14 months ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 23557:

Twenty Thirteen: CSS fixes to change single to double quotes, proper quoting around font-family names, and add a missing escape to a background image in custom-header.php. Props markmcwilliams, fixes #23653.

comment:15 in reply to: ↑ 13 markmcwilliams14 months ago

Replying to lancewillett:

Nice patch, .5 looking good. I found 1 more case of single quotes in custom-header.php.

Well spotted, how I missed that I'll never know? o_O

Note: See TracTickets for help on using tickets.