Opened 11 years ago
Closed 11 years ago
#25898 closed defect (bug) (fixed)
Twenty Fourteen: consider removing non-standard `::selection` selectors
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 3.8 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Bundled Theme | Keywords: | |
Focuses: | Cc: |
Description
See https://developer.mozilla.org/en-US/docs/Web/CSS/::selection for the explanation.
I believe this came through from the original theme, Further, and they aren't in any standard spec and aren't recommended for production (it's experimental).
Attachments (2)
Change History (11)
#1
@
11 years ago
- Component changed from General to Bundled Theme
- Keywords has-patch added; needs-patch removed
#3
@
11 years ago
- Owner set to lancewillett
- Resolution set to fixed
- Status changed from new to closed
In 26062:
#5
@
11 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
I'd argue that just because it's non-standard doesn't mean we shouldn't support it. Many, many web users are in the habit of highlighting text when reading (I use it a lot, it can help with focus, several other WordPress people use it too).
::selection
has wide support across all browsers (Chrome 1+, Firefox 1+ w/ -moz-, IE 9+, Opera 9.1+, Safari 1+). Yes, there are slight variations between behavior but changing color and background-color doesn't break anything. Using it doesn't make anything worse, and almost always makes things better. The appearance of a color that is completely foreign to the design of a website when selecting text is just plain bad design.
The MDN article is a big exaggeration; the W3C discussion they reference is centered on details of slight inconsistent behavior between vendors, and concerns with nesting, etc. We're using it, like most sites that do, in the most widely accepted way (one rule for the whole site), using only the widely accepted color and background properties. It's only a matter of time before it re-enters the standards, as usage continues to increase and it is an excellent design touch.
The <meta>
viewport is non-normative too (though almost everyone uses it), and the standards currently recommend that it is mapped to the standard `@viewport` css declaration (since that should really be done in css, not html, but Apple made up their own standard and everyone followed). But we aren't pulling that out, because it's necessary for the design of the website to work. IMO this is exactly the same situation, using a widely-adopted non-standard to achieve a better design. (See #25888 for adding that, or at least the required -ms- prefix to all of the responsive bundled themes).
I really think we should revert [26062], it's a step in the wrong direction (trying to fix something that really isn't broken). Reopening for discussion, and because there's another patch up to finish removing it anyway.
#6
in reply to:
↑ 2
@
11 years ago
Replying to iamtakashi:
The style is not important at all. I'm fine to remove that.
As someone who uses it regularly, it is critical (and as mentioned & linked above I'm not the only one). It is extremely annoying when sites don't use it.
The style is not important at all. I'm fine to remove that.