Open jneubrand opened 2 years ago
By the way, those magic 0.25em
numbers could be removed and get us to this:
let
topVal =
offset
bottomVal =
(1 - offset) - height
margin =
String.fromFloat (negate topVal)
++ "em "
++ (String.fromInt spacingX ++ "0px ")
++ String.fromFloat (negate bottomVal)
++ "em"
in
Attr.style "margin"
margin
:: Attr.style "padding" "0 calc((1/32) * 1em) 0 0px"
:: Attr.style "overflow" "visible"
:: attrs
—note the overflow: visible. This way, the hitbox isn't larger than necessary :)
widthFill
/heightFill
still exist, are 12 bits forspacingX
needed…)