CSS basics: Cascade review
With equal origin, importance, layer, and specificity, a later declaration wins for the same property.
Current edit
Understand the pattern
With equal origin, importance, layer, and specificity, a later declaration wins for the same property.
With equal origin, importance, layer, and specificity, a later declaration wins for the same property.
Misconceptions to reject
- If the page fits one desktop viewport, no narrower viewport needs checking.
- Hiding all overflow always makes content accessible.
The preview is a sanitized subset, not a full browser compatibility test.
Worked example and expected result
p { color: #58626b; }
p { color: #182b2a; }
p { line-height: 1.6; }With equal origin, importance, layer, and specificity, a later declaration wins for the same property.
Explain it
Apply it elsewhere
Keep the momentum.
Complete the lab, then explain and apply the pattern.
Review this courseTry an incident drillAnonymous lesson and mastery progress lasts for this session. Sign in to keep synced lesson XP between sessions; mastery stays device-local. No speed bonus, lost lives, or hint penalties.