Skip to content

Commit

Permalink
fix(hiccup-css): allow negative values for px
Browse files Browse the repository at this point in the history
Swap use of unsigned shift for OR `0`

Fixes issue #383
  • Loading branch information
acarabott committed Feb 9, 2023
1 parent 410d99d commit 340d542
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/hiccup-css/src/units.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ export const em = (x: number) => `${x}em`;
export const ex = (x: number) => `${x}ex`;
export const rem = (x: number) => `${x}rem`;
export const percent = (x: number) => `${x}%`;
export const px = (x: number) => `${x >>> 0}px`;
export const px = (x: number) => `${x | 0}px`;
export const vh = (x: number) => `${x}vh`;
export const vw = (x: number) => `${x}vw`;

Expand Down

0 comments on commit 340d542

Please sign in to comment.