Skip to content
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

number-no-trailing-zeros への対応が不完全です #208

Closed
irok opened this issue Sep 15, 2016 · 2 comments
Closed

number-no-trailing-zeros への対応が不完全です #208

irok opened this issue Sep 15, 2016 · 2 comments

Comments

@irok
Copy link

irok commented Sep 15, 2016

    letter-spacing: 1.05em;

のようなCSSがあるとき、number-no-trailing-zeros: true になっていると

    letter-spacing: 15em;

となってしまいます。

lib/formatZeros.js#L18 を以下のように変更すれば直るかと思います。

-    value = value.replace(/(\d+)(\.0+)/g, '$1')
+    value = value.replace(/(\d+)(\.0+)(?=\D|$)/g, '$1')
@olegshilov
Copy link

have the same issue.

font-size: calc(var(--default-font-size) * 1.075);

after format turn into this:

font-size: calc(var(--default-font-size) * 175);

@masaakim
Copy link
Owner

@irok Thank you for your report 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants