Skip to main content

All Questions

0 votes
1 answer
753 views

Stylelint selector-max-specificity: class::placeholder (0,0,1) doesn't but class:focus::placeholder (0,1,1) throws error with 0.2.0 max specificity

I am trying to reduce CSS specificity in my project by using the stylelint selector-max-specificity and I have now set it to "0.2.0". The problem is that when I use wonderful-input::...
botana_dev's user avatar
1 vote
1 answer
728 views

Best way to overwrite child element for pseudo-elements (e.g., :before)

I have a very complex drop-down menu with different icons for almost each section and sub-section, and it is causing specificity issue that has gone to a point that I found it hard to control. ...
user1258365's user avatar
11 votes
2 answers
339 views

Same specificity, after taking placement into consideration, :first-letter always wins?

Take a look at this jsfiddle: http://jsfiddle.net/ZNddz/ .intro:first-letter { font-size: 130px; } span.letter { background-color: red; font-size: 30px; } p { font-size: 80px; } The ...
Romed7442's user avatar
  • 149
9 votes
3 answers
10k views

Why can't I override existing pseudo-elements?

I have two CSS rules following each other: .some td:first-child:before { content:url('path/to/image.png')" " ; } .some .other:before { content:url('path/to/image2.png')" " ; } Here's the HTML ...
DanMan's user avatar
  • 11.6k