PseudoElement should support both single and double colon syntaxes
Previously #639, specifically https://github.com/brigade/scss-lint/issues/639#issuecomment-160044042 quoting @JohnAlbin there:
For pseudo-elements and pseudo-classes defined in CSS2.1, all current browsers must support both single colon (:) and double colon(::) syntaxes. For pseudo-elements defined in later CSS specs, the single colon (:) version is invalid.
Also, note that IE8 (and other old browsers that don't understand the newer :: syntax) will see the double colon pseudo-elements and ignore the entire ruleset as per the requirements in the CSS 2.1 spec says to do.
Here's a list of -moz prefixes: https://developer.mozilla.org/en-US/docs/Web/CSS/Mozilla_Extensions
My use case is using SCSS-Lint with WordPress and as IE8 is still a supported browser by WordPress, WordPress uses single colon : syntaxes for pseudo-elements.
Hi @ntwb, thanks for opening the discussion. Can you be a little more specific about what you are proposing? For instance, which of these things (or is there something els) are you proposing?
- Make the rule allow either single colon or double colon syntax
- Make the rule require both single colon or double colon syntax
- Make the rule require only single colon syntax
- Make the rule configurable to support any of the above cases in addition to its current behavior
- would work for me, 4. would be the most flexible in general though.
I'd like to be able to define the rule so that when linting if ::before is detected I'd like that flagged as WordPress requires the single colon :before syntax for IE8 backward compatibility.
At the moment the only way around this is to explicitly define the PseudoElement rule as false which results in both single :before and double ::before pseudo syntaxes to be ignored completely.
I just updated to 0.48.0 and added PseudoElement: enable: false to my .scss-lint.yml config file but it's still throwing warnings PseudoElement: Begin pseudo elements with double colons:::``
@lstanard, you should open a separate bug.