thi-ng / umbrella

⛱ Broadly scoped ecosystem & mono-repository of 199 TypeScript projects (and ~180 examples) for general purpose, functional, data driven development
https://thi.ng
Apache License 2.0
3.35k stars 149 forks source link

fix(hiccup-css): allow negative values for px #384

Closed acarabott closed 1 year ago

acarabott commented 1 year ago

Swap use of unsigned shift for OR 0

Fixes issue #383

Example use case:

const MARGIN_PX = -10;
const cmp = div({ style: "margin-left": px(MARGIN) }, "Hi");
postspectacular commented 1 year ago

Congratulations, Arthur, for finding & fixing a bug which has been sitting there for 5 years! Thank you & hope you're well!

acarabott commented 1 year ago

:) you're welcome

I wonder what your thoughts are on https://github.com/thi-ng/umbrella/issues/383#issuecomment-1424399054