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

[Bug] : grid-name e1 -> NaN #984

Closed
sKopheK opened this issue Jan 13, 2021 · 7 comments
Closed

[Bug] : grid-name e1 -> NaN #984

sKopheK opened this issue Jan 13, 2021 · 7 comments
Labels
Milestone

Comments

@sKopheK
Copy link

sKopheK commented Jan 13, 2021

Describe the bug
Hi, rather a funny bug that can be easily workarounded, but worth to fix.

To Reproduce
Steps to reproduce the behavior:

div
{
    grid-area: e1;
}

https://cssnano.co/playground/#eyJpbnB1dCI6ImRpdlxyXG57XHJcbiAgICBncmlkLWFyZWE6IGUxO1xyXG59IiwiY29uZmlnIjoiLy8gY3NzbmFubyBjb25maWdcbntcbiAgXCJwcmVzZXRcIiA6IFwiZGVmYXVsdFwiLFxufVxuIn0=

Expected behavior
grid-area: e1 is not converted to number

@illogic-al
Copy link

illogic-al commented Feb 12, 2021

I can confirm that this is an issue. I assume the 'e' in 'e1' is being interpreted as a exponent because not just any single character combined with a number breaks the minifier.
Which is to say only when 'e' is combined with an integer do we see this bug.

@ludofischer ludofischer added this to the 5.0.0 milestone Mar 19, 2021
@ludofischer
Copy link
Collaborator

Fixed in 5.0.0-rc.2

@illogic-al
Copy link

Thanks @ludofischer. Just curious. What was the commit that fixed this? Or what was the underlying issue that 5.0.0 fixes?

@ludofischer
Copy link
Collaborator

I suspect it is just the cssnano-value-parser update that fixes it, so you might want to look at that repository.

@illogic-al
Copy link

illogic-al commented Mar 23, 2021 via email

@ludofischer
Copy link
Collaborator

@illogic-al
Copy link

Thanks. TIL there's a part of the CSS3 spec that deals with identifying strings as numbers
Looks like TrySound/postcss-value-parser#58 was probably responsible for fixing this bug. 👍

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

No branches or pull requests

3 participants