Make WordPress Core

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#23653 closed defect (bug) (fixed)

Twenty Thirteen: Single/double quote consistency?

Reported by: markmcwilliams's profile markmcwilliams Owned by: lancewillett's profile 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 12 years ago.
23653.2.diff (4.8 KB) - added by markmcwilliams 12 years ago.
23653.3.diff (4.7 KB) - added by markmcwilliams 12 years ago.
23653.4.diff (6.3 KB) - added by markmcwilliams 12 years ago.
23653.5.diff (8.3 KB) - added by markmcwilliams 12 years ago.

Download all attachments as: .zip

Change History (20)

#1 follow-up: @lancewillett
12 years 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?

#2 in reply to: ↑ 1 @markmcwilliams
12 years 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 ...

#3 @markmcwilliams
12 years 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?

#4 @lancewillett
12 years ago

Cool, thank you.

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

#5 @markmcwilliams
12 years ago

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

#6 follow-up: @nacin
12 years 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.

#7 @nacin
12 years ago

  • Owner changed from nacin to lancewillett

#8 @markmcwilliams
12 years ago

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

#9 @helen
12 years 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.)

#10 in reply to: ↑ 6 ; follow-up: @markmcwilliams
12 years 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 12 years ago by markmcwilliams (previous) (diff)

#11 in reply to: ↑ 10 ; follow-up: @lancewillett
12 years 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.

#12 in reply to: ↑ 11 @markmcwilliams
12 years 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

#13 follow-up: @lancewillett
12 years ago

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

#14 @lancewillett
12 years 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.

#15 in reply to: ↑ 13 @markmcwilliams
12 years 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.