css3 - CSS Rem Unit for Element Sizes -
i've noticed rem unit can usable element's sizes, not font-sizes. , usefull html font-size property.
html { font-size:1vw } @media , (max-width:720px) { html { font-size:10px } } #el { width:20rem;height:5rem }
but proper , trustable?
i think thats you.
i apply:
- rem font-sizes px callback, best !
- em paddings , margins
- px, %, vw , vh element sizes
- and media queries use em, rem , px used too.
you can mess children element if use em font-size, not recommended.
rem size elements interesting, i'm enjoying lot vw , vh responsive behaviors cases % not enough.
and can cool stuff css calc function
like width: calc(100% - 85px);
fixed size within design.
this recommended read units :) hope you.
Comments
Post a Comment