-
-
Notifications
You must be signed in to change notification settings - Fork 150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[hiccup-css] Use of unsigned shift operator prevents negative values #383
Comments
Swap use of unsigned shift for OR `0` Fixes issue thi-ng#383
It could also be argued that decimal places should be allowed for |
Hi @acarabott - sorry just saw this now (after merging your PR) - you're right & I even think we should amend all spatial units to using export const px = (x: number) => `${x.toFixed(1)}px`;
export const percent = (x: number) => `${x.toFixed(3)}%`; |
Hmm, it doesn't seem like there's anything in the spec about limits. I'd be particularly wary about reducing the precision of I use these helpers to prevent typos and as sugar to avoid export const px = (x: number) => `${x}px`; |
- remove pixel rounding - use signed flooring for ms()
Hey @acarabott - agreed & was thinking about that too, but then again if I really would want pixel precision, I wouldn't use percentages... 😉 In any way, I agree it's best to leave the rounding of these values to the user. Milliseconds are the only unit for which this is done now. New release is already out since last Friday... |
The text was updated successfully, but these errors were encountered: