Beginner
Buttons that scale with em
Make the button padding and corner radius scale with each button's own text size.
At 16px text, a .btn must have 8px padding on top and bottom, 16px on the left and right, and a 6px border radius. The .btn.big button has 24px text and must get 12px, 24px and 9px automatically, without any extra padding rule for .big.
What Check tests
- The normal button has 8px / 16px padding
- The normal button has a 6px radius
- The big button still has 24px text
- The big button's padding grows to 12px / 24px
- The big button's radius grows to 9px
Stuck? One hint at a time
The solution unlocks after your first Check. Try first: that is where the learning happens.
Runs in your browser. Your code is saved here.
Your page
Press Run to see the page.
Console
Nothing logged yet.