WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 3 years ago

Last modified 3 years 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 3 years ago.
23653.2.diff (4.8 KB) - added by markmcwilliams 3 years ago.
23653.3.diff (4.7 KB) - added by markmcwilliams 3 years ago.
23653.4.diff (6.3 KB) - added by markmcwilliams 3 years ago.
23653.5.diff (8.3 KB) - added by markmcwilliams 3 years ago.

Download all attachments as: .zip

Change History (20)

@markmcwilliams3 years ago

comment:1 follow-up: @lancewillett3 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?

comment:2 in reply to: ↑ 1 @markmcwilliams3 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 ...

@markmcwilliams3 years ago

comment:3 @markmcwilliams3 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?

comment:4 @lancewillett3 years ago

Cool, thank you.

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

comment:5 @markmcwilliams3 years ago

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

comment:6 follow-up: @nacin3 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.

comment:7 @nacin3 years ago

  • Owner changed from nacin to lancewillett

@markmcwilliams3 years ago

comment:8 @markmcwilliams3 years ago

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

comment:9 @helen3 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.)

@markmcwilliams3 years ago

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

comment:11 in reply to: ↑ 10 ; follow-up: @lancewillett3 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.

@markmcwilliams3 years ago

comment:12 in reply to: ↑ 11 @markmcwilliams3 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

comment:13 follow-up: @lancewillett3 years ago

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

comment:14 @lancewillett3 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.

comment:15 in reply to: ↑ 13 @markmcwilliams3 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.