Skip to content
This repository has been archived by the owner on Dec 2, 2018. It is now read-only.

Pseudo-elements: single- or double-colon? #78

Open
keithjgrant opened this issue May 12, 2017 · 1 comment
Open

Pseudo-elements: single- or double-colon? #78

keithjgrant opened this issue May 12, 2017 · 1 comment

Comments

@keithjgrant
Copy link
Collaborator

Technically, pseudo-elements are supposed to have double-colons (::before, ::after, ::first-line, ::first-letter, and ::selection). What should we do with them?

IE8 supports only a single-colon syntax. All other browsers, for backwards-compat, support both syntaxes. ::selection is an exception to this, as IE8 doesn't support it, and all other browsers support only the double-colon syntax.

Should we
A) convert to single-colon
B) convert to double-colon
C) leave as authored

@keithjgrant
Copy link
Collaborator Author

I am in favor of the double-colon, because I'm a pedant. On the other side, @benfrain has voiced support for single-colon syntax

My reasons for supporting double:

  • It's technically correct, according to spec
  • I don't think it's our job to be making browser compatibility decisions/affordances, particularly for a browser few folks support these days. I think it's fair to assume the dev can run their code through a PostCSS plugin like postcss-pseudoelements to add IE8 support if needed.
  • I’d like to treat all pseudo-elements the same, and ::selection must be the double-colon syntax

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant