css-cascade-4 Flashcards

1
Q

What is specificity?

A

means by which browsers decide which CSS property values are the most relevant to an element and, therefore, will be applied.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How is specificity calculated?

A

Specificity is a weight that is applied to a given CSS declaration, determined by the number of each selector type in the matching selector.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Why might CSS include this feature?

A

to style your elements, in the correct way. It’s easier to quickly change a style when you know exactly which selector styles that specific element.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the order of selector strengths for CSS specificity (commonly referred to as the Specificity Hierarchy)?

A

-inline styles
-id attrib
classes,pseudo-class, other attrib
-elements,pseudo-elements
-universal selector

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the CSS Cascade?

A

an algorithm that defines how to combine property values originating from different sources.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly