Skip to content
This repository has been archived by the owner on Feb 23, 2022. It is now read-only.

Combining of CSS rules breaks when using browser prefixes and selectors #109

Open
BradMclain opened this issue Jan 17, 2017 · 1 comment

Comments

@BradMclain
Copy link

For example the following:

.search [type="search"]::-webkit-input-placeholder {
  color: rgba(255, 255, 255, 0.4);
}
.search [type="search"]::-moz-placeholder {
  color: rgba(255, 255, 255, 0.4);
}
.search [type="search"]:-ms-input-placeholder {
  color: rgba(255, 255, 255, 0.4);
}
.search [type="search"]::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

Will be rewritten as:

.search [type="search"]::-webkit-input-placeholder,.search [type="search"]::-moz-placeholder,.search [type="search"]:-ms-input-placeholder,.search [type="search"]::placeholder{
  color:rgba(255,255,255,0.4)
}

However standard browser behaviour is to ignore a rule if any selector in a group of selectors is not recognised or is invalid. In this case the browser prefixes will always fail in other browsers so this rule is never applied.

See https://www.w3.org/TR/css3-selectors/#Conformance which has the line:

a group of selectors containing an invalid selector is invalid.
@BradMclain
Copy link
Author

BradMclain commented Mar 22, 2017

Possibly a dupe of #97?

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

No branches or pull requests

1 participant