hss icon indicating copy to clipboard operation
hss copied to clipboard

Operations between two different units

Open jcward opened this issue 6 years ago • 0 comments

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%);
  1. Be careful of spacing -- always use spaces around the operator.
  2. 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.

jcward avatar Jun 12 '18 22:06 jcward