feat(mat.*-overrides): Improve the styles overrides functions to not generate so much duplicity selectors in the css. #30248
Labels
feature
This issue represents a new feature or feature request rather than a bug or bug fix
needs triage
This issue needs to be triaged by the team
Feature Description
Explain the issue
Following your documentation, when we override the style we can do the next:
But this is translated into css in N duplicate definitios of SELECTOR:
And they should be filled togeteher in only one SELECTOR:
Example with button
For example to override the button style we can do the next:
But this is translated into css in two duplicate definitios of :root
And they should be filled togeteher:
Explanation of why this should be improved
If we edit a lot of things it generate a lot of unnecessary verbiage that is unefficiency and cause greatly hinders debugging during develmpment.
For example, if we edit 100 Selectors and modify 20 tokens in each one, we have at the end 20 duplicate definitions per each selector that is a total of 2000 selector definitions with one line each instead of 100 selector definitions with 20 lines each.
Logically this makes the final css inefficient as it has many selectors to check, in this case 2000 instead of 100.
Thanks
Thank you very much for your great work. I hope you correct this, and if there is already a way to avoid these duplicities please let me know and you should add it to the official documentation.
Use Case
No response
The text was updated successfully, but these errors were encountered: