Похожие чаты

CSS #2: CSS Specificity Level: Intermediate When two or more selectors target

property on an element, browsers will calculate Specificity of each selector.
more weight on Specificity of selector means more power and the winner is the Strongest rule.

——————
How is specificity calculated?

Specificity determined by the number of each selector type in the matching selector,
Here you can find selectors wieght list:

0-0-0-0-1 - Type selectors and pseudo-elements. (e.g., div, ::after)
0-0-0-1-0 - Class selectors, attributes selectors and pseudo-classes. (e.g,, .element, [type="radio"], :hover)
0-0-1-0-0 - ID selectors (e.g., #element)
0-1-0-0-0 - Inline style (e.g., `style="" )
1-0-0-0-0 - !important

When multiple declarations have equal specificity, the Last declaration found in the CSS is applied to the element.

Now you can look at attached picture and find out the calculated Specificity of each selector. (from weakest to strogest).

1 ответов

3 просмотра
ꜱ-ᴋɪʟʟ- Автор вопроса

Похожие вопросы

Обсуждают сегодня

Всем привет, написал код ниже, но он выдает сегфолт, в чем причина? #include <stdio.h> #include <stdlib.h> #include <string.h> struct product { char *name; float price; };...
buzz базз
75
I love the passion, really do. I do think this is being blown way out of proportion. We are not deleting our Telegram or not allowing you to talk about anything you want, a...
Mike Herron
3
Did you guys see the latest tweet from TonGifts? 🚀
Mike
44
Hey guys, did you see the latest announcement about $FUN? 🔥
Brian
21
Did kadena deliver anything on time?
Femboi Uwu
22
Hey guys Long term LINK holder here (All in for the past 5 years). I actually tried not to pay too much attention anymore and just let my thesis play out. But seeing that fili...
Koala Chud
9
My thoughts on it: LLC growth might be signed contracts and partnerships with business companies and cash flow on LLC bank accounts. Not bad for CMO, CEO, and all the manage...
Katu
2
Whats the deadline to convert noia into synt on erc20?
✙ Alex ✙ ✤ ∞
17
Хотел бы спросить у знающих, правильную ли я выбрал книгу для начала изучения ассемблера Юрова В.И ? Или есть более лучшие книги для начала обучения?
Botsman
31
Conversation at a festival with a non-crpto person (not a normie by any stretch, though): * person: tell me about crypto, me: ok, the original idea is p2p sound money for the...
molecular#123 🐓
25
Карта сайта