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

Wrong output to escaped character #108

Open
alexander-akait opened this issue Apr 17, 2017 · 7 comments
Open

Wrong output to escaped character #108

alexander-akait opened this issue Apr 17, 2017 · 7 comments

Comments

@alexander-akait
Copy link
Member

Input:

.class { content: "\F10C" }

Output:

.class { content: "\F10C" }

Seems works fine.

But wrong with lowercase.
Input:

.class { content: "\f10C" }

Output:

.class { content: "\F10C" }

I do not think it's true to change case of escaped character.

@mathiasbynens
Copy link

mathiasbynens commented Apr 17, 2017

Case in escape sequences doesn’t matter. \f10C and \F10C decode to the exact same string.

@alexander-akait
Copy link
Member Author

@mathiasbynens yep, but it's still not quite right, some postcss plugins in theory can handle \F and \f difference.

@alexander-akait
Copy link
Member Author

@mathiasbynens if we have postcss-change-case-escaped-characters (or something like this) then it would be appropriate, any stringer should not change anything if it was not made specifically for the change, this repository is definitely not responsible for this and should not do so

@mathiasbynens
Copy link

some postcss plugins in theory can handle \F and \f difference.

CSS doesn’t handle them differently, so why should those plugins?

@alexander-akait
Copy link
Member Author

alexander-akait commented Apr 17, 2017

@mathiasbynens I'm not saying that this is a critical error, but this is exactly the unpredictable behavior that in theory, as I said earlier, could lead to errors in places where in general it was not expected, also it breaks the tests when i passed with lowercase i expected in lowercase

@mathiasbynens
Copy link

The only bug I see is that somehow (already-escaped) CSS strings are being escaped again.

@alexander-akait
Copy link
Member Author

@markdalgleish can you help our with PR?

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