-
-
Notifications
You must be signed in to change notification settings - Fork 31.7k
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
[styles] Increase counter only for non global styles #21003
Conversation
Details of bundle changes.Comparing: e25b7d5...3e5e1fa Details of page changes
|
@jantimon No specific objection to going in this direction. However, what problem do you plan to solve? How are the change valuable? |
I was just confused why it would increase the numbers "randomly". But you are right the value would be rather low:
|
@jantimon Ok sounds fair. Do you want to fix the CI so we can move the pull request forward? Thanks |
Okay it works 🎉 While looking through the code I saw something strange:
Removing line 62 in this file could fix that: There are also no tests for that scenario (production + seed) |
@jantimon Thanks for the patch.
I think that the incentive was to help developers debug the style of the application in production. It can be perceived as inconsistent with when the style doesn't come from Material-UI components. At least, the Material-UI components garentuee the unique of the style sheet names |
I guess that’s a good point. |
I have an idea to reduce the
ruleCounter
amount but maybe I didn't fully understand the idea behind increasing theruleCounter
.Right now all styles also those which are not using the
ruleCounter
are increasing the counter.This PR increases the counter only once it is used.