Sorry for not following up on this earlier, Ehsan, somehow this slipped
through my inbox.
On 4/6/18 1:26 AM, Ehsan Akhgari wrote:
::-moz-selection seems like a fairly popular feature. PublicWWW claims
it's seen on a million sites:
https://publicwww.com/websites/%22%3A%3A-moz-selection%22/
After this change, is it feasible to detect the usage of the prefixed
pseudo-element so that existing code that uses ::-moz-selection would emit
a helpful console warning? It would be nice to have a way to communicate
to web developers that they can now remove the Gecko specific rules.
It is feasible, but it's not clear to me how worth it is to land this
now. In particular, we're going to keep parsing ::-moz-selection for now
as an alias, since as you mentioned it's a fairly popular feature, and
people won't be able to remove it for a while if they want to support
ESR and similar.
If we decide to remove the prefixed version, developers would get a in
the console automatically if they have the CSS error filter enabled that
would look like:
Unknown pseudo-class or pseudo-element ‘-moz-selection’. Ruleset
ignored due to bad selector.
Which should be enough to hint them that they can remove it.
-- Emilio
On Mon, Mar 26, 2018 at 9:21 AM Emilio Cobos Álvarez <emi...@crisal.io>
wrote:
Hi,
In bug 509958 I intend to unprefix the ::-moz-selection pseudo-element.
The situation here is not great wrt the spec saying what we do, or what
other implementations do for that matter, see [1].
However other engines have shipped this unprefixed for a long time with
the same semantics that we implement, and we're seeing webcompat
problems due to people forgetting to include ::-moz-selection in their
style sheets, see bug 1427680 or bug 1448670 for some examples.
Given I don't think other engines have any incentive to implement what
the spec says (given it's slower, and has the chance of giving them
webcompat headache), and that we're compatible with them, I proposed to
adapt the spec to reality in that spec issue, and unprefix our
pseudo-element.
Let me know if there's any concerns with this plan. Thanks!
-- Emilio
[1]: https://github.com/w3c/csswg-drafts/issues/2474
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform