Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Avoid error for ::selection #19

Open
romainberger opened this issue Apr 10, 2013 · 3 comments
Open

Avoid error for ::selection #19

romainberger opened this issue Apr 10, 2013 · 3 comments

Comments

@romainberger
Copy link

Hi,

The tool report the rules for ::selection and ::-moz-selection as duplicate.But for now we need to write the rules for both separately (https://developer.mozilla.org/en/docs/CSS/::selection).
Not a big issues, but thought I could share (awesome project btw and would love to fork but sadly I don't know ruby :( ).

Example with

::-moz-selection {
    background: #000;
    color: #fff;
    text-shadow: none;
}
::selection {
    background: #000;
    color: #fff;
    text-shadow: none;
}

we get the error:

{::-moz-selection} AND {::selection} share 3 rules`
@zmoazeni
Copy link
Owner

Thanks for the report @romainberger I can see why it would be reported that way based on how csscss is currently written. Are you saying that writing it as:

::-moz-selection, ::selection {
    background: #000;
    color: #fff;
    text-shadow: none;
}

isn't practical from a browser support standpoint?

@romainberger
Copy link
Author

Yes, if a browser sees a selector that is invalid for him, it doesn't take in account the whole rule set, so we have to write this kind of thing twice (the link I gave explains it better).

@zmoazeni
Copy link
Owner

Ah thanks.

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

2 participants