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

[core] Prefix stylesheet names to prevent collisions #6110

Merged
merged 1 commit into from Feb 11, 2017
Merged

[core] Prefix stylesheet names to prevent collisions #6110

merged 1 commit into from Feb 11, 2017

Conversation

oliviertassinari
Copy link
Member

  • PR has tests / docs demo, and is linted.
  • Commit and PR titles begin with [ComponentName], and are in imperative form: "[Component] Fix leaky abstraction".
  • Description explains the issue / use-case resolved, and auto-closes the related issue(s) (http://tr.im/vFqem).

Users might want to use the withStyles Higher-order Component and use a stylesheet name conflicting with our internal ones. To prevent that issue, I have prefixed them to reduce the conflict probability.

@mbrookes
Copy link
Member

I have prefixed them to reduce the conflict probability.

Won't the unique ID take care of that?

@oliviertassinari
Copy link
Member Author

@mbrookes What unique ID are you referring to? The name is on a global namespace and user can inject styles with the same one. If they do, the injection order would no longer be correct.

@mbrookes
Copy link
Member

@oliviertassinari I was talking about the number added to the generated className, but I hadn't thought about injection order.

@oliviertassinari oliviertassinari merged commit 3267275 into mui:next Feb 11, 2017
@oliviertassinari oliviertassinari deleted the scope-name-space branch February 11, 2017 22:44
@oliviertassinari oliviertassinari changed the title [jss] Prefix stylesheet names to prevent collisions [core] Prefix stylesheet names to prevent collisions Feb 12, 2017
@zannager zannager added the core Infrastructure work going on behind the scenes label Mar 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Infrastructure work going on behind the scenes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants