Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion: Revisit spec copy for quote need and consistency #7158

Open
j9t opened this issue Oct 5, 2021 · 4 comments
Open

Suggestion: Revisit spec copy for quote need and consistency #7158

j9t opened this issue Oct 5, 2021 · 4 comments

Comments

@j9t
Copy link
Contributor

j9t commented Oct 5, 2021

The specification is inconsistent when it comes to when and how it quotes terms.

The same class of terms may be

  • unquoted
  • put in double quotes (as in “the term "properties"”)
  • put in single quotes (as in “the terms 'character', 'encoding' and 'string'”)
  • put in guillemets (as in “«[ "rootMargin" → lazy load root margin ]»”) [will be fixed by a proactive PR]
  • put in backticks (as in “by checking `Origin` headers”)

There are a few problems with that:

  1. In some cases, the quotes aren’t necessary—most oft the time because the respective term is already marked as code or as a term to be defined (usually marked in italics).
  2. In other cases, it violates the idea of use vs. mention.
  3. It generally is inconsistent, for empirically, terms in needs of quotes could use the same quotes.

(There’s also the problem of the characters not being the typographically correct characters, but this can be and probably was already handled separately.)

Filing this as I didn’t spot a similar report.

@j9t
Copy link
Contributor Author

j9t commented Oct 5, 2021

Not sure how sophisticated my search was for this (I took notes over a period of a few weeks), but double quotes seem to be significantly more common (~4k) than single quotes (~1k). These have probably been the standard so far.

@Kaiido
Copy link
Member

Kaiido commented Oct 6, 2021

Most of these are certainly part of the specs language, see https://infra.spec.whatwg.org

In particular,

Also, CSS values and properties (like 'overflow') are surrounded by single quotes, some may have other meanings too, but the case you exposed seems to be a direct quotation from a W3C text.

@j9t
Copy link
Contributor Author

j9t commented Oct 6, 2021

This is great context! How about the spec explains this somewhere?

(This would not solve inconsistencies and violations of use/mention, but would certainly help!)

@domenic
Copy link
Member

domenic commented Oct 6, 2021

They are explained in Infra, the dependency on which is already mentioned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants