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

Type checking length units #3172

Merged
merged 7 commits into from Apr 30, 2018

Conversation

jacobwardio
Copy link
Contributor

Resolves issue: #3023 Incorrect type-checking for CSS length units

@seven-phases-max
Copy link
Member

#2326 ?

@jacobwardio
Copy link
Contributor Author

@seven-phases-max please read issue #3023, which this PR resolves.

@seven-phases-max
Copy link
Member

seven-phases-max commented Feb 20, 2018

#3023 is OK (see complete LU list below though), but could you please annihilate theis festival?

https://www.w3.org/TR/css-values-3:

em, ex, ch, rem, cm, mm, q, in, pt, pc, px, vw, vh, vmin, vmax

P.S. Ideally the test should be case-insensitive (not a big deal usually, but counting they're using both q and Q, this won't harm anyway).

@jacobwardio
Copy link
Contributor Author

jacobwardio commented Feb 20, 2018

@seven-phases-max sorry, I understand what you mean now.

Please excuse my sleepy head late last night 😴

I'll refactor it to use isunit rather than introducing a load of isfoo/isbar/isbaz type methods later today. And yes, you're correct, the tests should really be case insensitive.

@jacobwardio
Copy link
Contributor Author

jacobwardio commented Apr 30, 2018

  • Use isunit instead of the isFoo festival.
  • Add case-insensitivity to unit matcher.
  • Add all units from the complete LU list.

@jacobwardio
Copy link
Contributor Author

jacobwardio commented Apr 30, 2018

@seven-phases-max I have resolved your comments and updated my PR for issue #3172 :)

@seven-phases-max
Copy link
Member

Thanks!

@matthew-dean
Copy link
Member

Thanks! I'll try to tag and push a release soon on NPM.

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

Successfully merging this pull request may close these issues.

None yet

3 participants