Skip to content

Conversation

o-alexandrov
Copy link
Contributor

There's currently CSS specificity order issue.
If a user has a global CSS override, such as:

span: {
  whiteSpace: `pre-line`
}

Then Divider component will become broken, there'll be extra line breaks
visual-error

that's because the whiteSpace: 'nowrap' is currently set on the parent HTML element, instead of the actual wrapper.

css-order-bug

@zannager zannager added the scope: divider Changes related to the divier. label Oct 25, 2024
@zannager zannager requested a review from DiegoAndai October 25, 2024 10:29
@ZeeshanTamboli ZeeshanTamboli changed the title [Divider] Fix css specificity order [material-ui][Divider] Fix CSS specificity order Oct 27, 2024
Copy link
Member

@ZeeshanTamboli ZeeshanTamboli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you provide a live reproduction of the issue in the form of StackBlitz or CodeSandbox?

@mui-bot
Copy link

mui-bot commented Oct 27, 2024

Netlify deploy preview

https://deploy-preview-44204--material-ui.netlify.app/

Bundle size report

Details of bundle changes (Toolpad)
Details of bundle changes

Generated by 🚫 dangerJS against c9d3dcf

@o-alexandrov
Copy link
Contributor Author

@ZeeshanTamboli

See this repo for the repro; it's based on MUI's pigment vite example (but it isn't related to Pigment).

Then, here's a video on how to reproduce how this PR fixes it (removing style from the parent HTML element and applying to the span with text)

Screen.Recording.2024-10-27.at.6.29.49.AM.mov

Copy link
Member

@ZeeshanTamboli ZeeshanTamboli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@ZeeshanTamboli ZeeshanTamboli merged commit f538258 into mui:master Oct 27, 2024
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: divider Changes related to the divier.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants