-
-
Notifications
You must be signed in to change notification settings - Fork 399
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
Classes does not work for Components with special chars in display name #624
Labels
bug
It went crazy and killed everyone.
Comments
I am going to use CSS.escape, since it is implemented in the most modern browsers and will be used in dev mode only. If once develops in a different browser, there is a good polyfill. |
fixed and released |
@rafaeltavares please file a separate issue with codesandbox link |
@rafaeltavares can you place |
@iamstarkov I updated |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@luiz290788 commented on Mon Nov 13 2017
The new prefix for the generated classes that use the display name of the decorated components are not being sanitized.
For example:
Decorated class display name "SomeOtherDecorator(Test)"
Generated classes ".SomeOtherDecorator(Test)-root-0-1"
The parenthesis in the classes is causing the problems here.
Suggested solution: Parse the display name of the component to remove the special characters.
@kof commented on Mon Nov 13 2017
Or escape the chars.
@luiz290788 commented on Mon Nov 13 2017
I was checking the code and thinking about the issue, it seems to be a jss issue instead of a react-jss issue. What do you think?
@kof commented on Mon Nov 13 2017
Well, ultimately yeah, as we are using property names in classes, they can also contain everything. We just never had that issue over there.
@kof commented on Mon Nov 13 2017
Also the escaping needs to be done in dev mode only, because in production we build short class names.
The text was updated successfully, but these errors were encountered: