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
The style is .css-4oa7uv-Header.Space
rather than .css-4oa7uv-Header\.Space
#2638
Comments
Please always try to share a repro case in a runnable form - either by providing a git repository to clone or a codesandbox. OSS maintainers usually can't afford the time to set up the repro, even if exact steps are given. |
OK. |
Hello, here is my code: https://github.com/PeterlitsZo/FUCK/tree/master/project-for-emotion |
Ok, I've found the issue in FireFox. We are indeed matching emotion/packages/react/src/get-label-from-stack-trace.js Lines 32 to 33 in 3d672ac
We either should sanitize this in the linked function or match a different string with a regexp, cc @srmagura |
Or change the build css style name from |
This is unlikely to happen. I don't think that the dot here is worth preserving - we also need to consider what is generated for this setup during SSR because this has to match with the client. |
Out of town, will PR this in the weekend 🙂
…On Mon, Feb 14, 2022, 3:20 AM Mateusz Burzyński ***@***.***> wrote:
Or change the build css style name from .css-xxxxxx-App.Space to
.css-xxxxxx-App.Space?
This is unlikely to happen. I don't think that the dot here is worth
preserving - we also need to consider what is generated for this setup
during SSR because this has to match with the client.
—
Reply to this email directly, view it on GitHub
<#2638 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAGDWDNZC2WJQDLLPCBH45DU3C3LLANCNFSM5OHD3THQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
OK. The chrome will just using |
This case was fixed in #2615, which was released as part of |
Thanks for your great works!!! By the way, I cannot get your test code, could you please... help me to get it? expect(getLabelFromStackTrace(stackTrace)).toBeUndefined() After read source code, in my mind that the function Sorry that my question is stupid... |
@PeterlitsZo What line in the source file did that come from?
|
@srmagura Thanks for your kindly and swift reply. source file here: I find this line: So I except it should return |
That stack trace comes from a class component, so |
Current behavior:
It make the className as
.css-4oa7uv-Header.Space
, and it also make a.css-4oa7uv-Header.Space
style rules. But it should be.css-4oa7uv-Header.Space
rule, it should be.css-4oa7uv-Header\.Space
rule.Here is my code:
When I export
Header
, I find thatHeader.Space
component doesn't work well.I check what happens. Well, there is a
.css-4oa7uv-Header.Space
style rule!But the right name should be
.css-4oa7uv-Header\.Space
. It forget\
sign!I read the emtion source file. I find it will get the label name from function call stack if the NODE_ENV is development.
I try to rewrite the jest's test file. But I cannot make it again in test file...
Could you help me? And do you need a runable demo? If you pointer out how to let it show again in test, I think I can help you with a PR.
Expected behavior:
The style rule should be for
.css-4oa7uv-Header\.Space
.Environment information:
react
version:^17.0.2
@emotion/react
version:^11.7.1
The text was updated successfully, but these errors were encountered: