U
U
urajo2021-07-03 15:40:04
css
urajo, 2021-07-03 15:40:04

Why doesn't it reassign the style?

grid-column changes at 375 resolution, but in DevTools it is crossed out, although the property is written later than the main one (you can see the lines on the screenshot).
Moreover, if I remove grid-column from this "non-working" one, the markup changes. That is, it seems to work, but in the dev Tuls - it is supposedly turned off. What does it have to do with
60e059f47b72a376904518.png

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey delphinpro, 2021-07-03
@delphinpro

Specificity of selectors
The top selector has more weight. There's a class selector + a pseudo-class selector.

V
Vladislav, 2021-07-03
@SlavaMaxwell

Because the first selector refers to a specific element, in this case the fifth, and the lower selector tries to refer to all at once, as you noted above, this is the weight of the selectors, the upper one, so to speak, is more important than the lower one, if it’s easier to explain, in your case then in the media query, just refer to the fifth one separately, then everything will be ok

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question