Skip to content

valueParser.unit(quantity) and scientific numbers #37

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

Closed
jeddy3 opened this issue Aug 15, 2018 · 1 comment
Closed

valueParser.unit(quantity) and scientific numbers #37

jeddy3 opened this issue Aug 15, 2018 · 1 comment

Comments

@jeddy3
Copy link

jeddy3 commented Aug 15, 2018

Firstly, thanks for writing this parser! We use it extensively in stylelint and its been rock solid so far.

We use valueParser.unit(quantity) in our unit-no-unknown rule.

An issue, stylelint/stylelint#3537, was raised about support for scientific numbers (e.g. 4e2px) as covered in the specs.

Reproduce with:

var postcssValueParser = require("postcss-value-parser");
postcssValueParser.unit("1e5px")

Expected:

{
  number: "1e5",
  unit: "px"
}

Got:

Expected:

{
  number: "1",
  unit: "e5px"
}

Is this something you'll be willing to support in this value parser?

@TrySound
Copy link
Owner

@jeddy3 hi, I'm not actively working on this project. I can accept PR with the fix.

chearon added a commit to chearon/postcss-value-parser that referenced this issue Aug 17, 2018
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

2 participants