DEV Community

Discussion on: CSS Specificity and the use of !important: a case study

Collapse
 
gerreth profile image
Gerret Halberstadt

Nice post, emphasizing to remove !important where possible (and almost everywhere it is) is a good point. But how about dealing with specifity in your case from the other side? Instead of increasing the specifity in the media query you could reduce it in the former part. This would have the same effect and increases the readability. Seeing two nested id selectors always looks suspicious to me.