:root
for Flexible Type
Now that you've set the
:root
pseudo-class to calculate
font-size
based on
viewport height and width
, the body will utilize the root
em
that's based on the value calculated by
:root
.
Notice when you resize the window that the root font size for all elements stays relative no matter viewport size?
Sugar plum cake apple pie sweet fruitcake lemon drops gingerbread. Tart icing topping apple pie chupa chups jelly-o chupa chups ice cream. Jelly-o pie chocolate bar lollipop donut.
Powder tiramisu dessert. Chocolate cake marzipan topping. Biscuit croissant gummi bears topping gingerbread cotton candy bonbon cupcake cake.
Chocolate carrot cake jelly dragée. Sugar plum candy canes tiramisu. Chocolate marshmallow tootsie roll cake cake. Sweet gingerbread pudding lollipop tootsie roll pastry.