.panel { color: #7c3aed; }\n.badge { color: inherit; }The badge takes the panel’s violet colour without repeating the hexadecimal value.
LESSON 13 OF 100
Use the inherit value to take the parent colour.
The CSS-wide value inherit makes a property use the inherited value from its parent and states that intention explicitly.
.panel { color: #7c3aed; }\n.badge { color: inherit; }The badge takes the panel’s violet colour without repeating the hexadecimal value.
.badge { color: #7c3aed; }The copied value looks the same but no longer follows a future parent colour change.
Complete the .badge rule with the inherit value.
inherit preserves the parent-child relationship instead of copying a value that may change.
ANALYSIS REQUEST
The initial discussion is without obligation. You receive an honest recommendation, suitable stages and the factors that affect price.