-
-
Notifications
You must be signed in to change notification settings - Fork 608
Nested emoji class names do not work as expected #995
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
Comments
Why do you use emoji as classes? It will be removed in next version, just for information, i will look on issue in near future |
Because it's short and cool... Why will it be removed? |
@gera2ld because it is unsafe in some situations, buggy and do not supported old browsers |
@gera2ld There is no point in using emojis as classnames. This is not only an antipattern, moreover the corresponding fix is causing severe regressions on our business critical project. @evilebottnawi Would you kindly remove it, please ? |
@gfortaine remove |
@gfortaine if you have a bug after this patch please open new issue with reproducible test repo |
@evilebottnawi after further investigations, we have clearly identified our annoying bugs coming from the upgrade of postcss-modules-scope to 2.1.1 We use bootstrap and it completely broke the CSS for glyphicons. I will try to set up a reproducible test repo. However, I was a bit surprised to have a such regression on a patch release (3.2.1). |
@evilebottnawi We do confirm that this is a blocking point for us to upgrade css-loader (still stuck with last working version that is 3.2.0). Moreover, this request looks like totally no sense. It is a bad practice to use emoji as class names, it seems that nobody is doing this. How could we revert this, please ? The bug appears with Glyphicon Halfings from Bootstrap 3. |
@gfortaine do not use |
Expected Behavior
Emoji in nested class names should always work.
Actual Behavior
Nested emoji class names do not work as expected. See explanation below.
Code
I made a project for minimum reproduction: https://github.com/gera2ld/css-loader-bug
And the CSS file
style.module.css
:How Do We Reproduce?
After
yarn build
, we will get CSS like this (embedded in dist/main.js):".\\1F4FF {\n color: red;\n}\n.\\1F4FF .\\1F366 {\n color: green;\n}\n"
To make it look better:
Open

dist/index.html
, and we will findcolor: green
does not work. Tested in Chrome and Firefox.According to the W3C document:
That is the problem.
.\1F4FF .\1F366
is actually the same as.\1F4FF.\1F366
(without the white space), so it does not work. I tried adding an extra space,.\1F4FF .\1F366
(with two spaces) worked as expected.The text was updated successfully, but these errors were encountered: