hss
hss copied to clipboard
Operations between two different units
Readme says:
Operations between two different units (for instance 50px + 3em) are not allowed.
Technically CSS allows basic +
and -
operations on units of different type via calc (support):
width: calc(100% - 10px);
padding-top: calc(20px + 1%);
- Be careful of spacing -- always use spaces around the operator.
- I believe this supports any unit (
em
px
%
vw
etc.)
I wonder if HSS should infer the calc for +
and -
, or require the user to specify it explicitly.