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

[TreeView] TreeItem label is two levels of specificity instead of one #12284

Closed
david-ic3 opened this issue May 5, 2021 · 6 comments · Fixed by #11721
Closed

[TreeView] TreeItem label is two levels of specificity instead of one #12284

david-ic3 opened this issue May 5, 2021 · 6 comments · Fixed by #11721
Assignees
Labels
component: tree view TreeView, TreeItem. This is the name of the generic UI component, not the React module! MUI X new feature New feature or request ready to take Help wanted. Guidance available. There is a high chance the change will be accepted

Comments

@david-ic3
Copy link

david-ic3 commented May 5, 2021

Some styles applied to TreeItem label are not applied (the class order is wrong).

You can check the example : https://codesandbox.io/s/gmailtreeview-material-demo-forked-s6z3q

font size should be 45px.

Tested on alpha.29, thank you very much for doing Material-UI ❤️

Search keywords:

@david-ic3 david-ic3 added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label May 5, 2021
@david-ic3 david-ic3 changed the title TreeView / TreeItem - label style not applied [TreeView / TreeItem] - label style not applied May 5, 2021
@oliviertassinari oliviertassinari added support: Stack Overflow Please ask the community on Stack Overflow and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels May 5, 2021
@support
Copy link

support bot commented May 5, 2021

👋 Thanks for using Material-UI!

We use GitHub issues exclusively as a bug and feature requests tracker, however,
this issue appears to be a support request.

For support, please check out https://material-ui.com/getting-started/support/. Thanks!

If you have a question on StackOverflow, you are welcome to link to it here, it might help others.
If your issue is subsequently confirmed as a bug, and the report follows the issue template, it can be reopened.

@support support bot closed this as completed May 5, 2021
@oliviertassinari oliviertassinari added the component: tree view TreeView, TreeItem. This is the name of the generic UI component, not the React module! label May 5, 2021
@oliviertassinari
Copy link
Member

oliviertassinari commented May 5, 2021

tip: check the CSS specificity of your selector (.css-ehlda4-MuiTreeItem-content .MuiTreeItem-label)

@oliviertassinari
Copy link
Member

Actually, @mnajdova would it be worth flattening?

https://github.com/mui-org/material-ui/blob/58c7e708a419bc8895774e964b8ef00b55d045ac/packages/material-ui-lab/src/TreeItem/TreeItem.js#L119

I wonder, not sure.

@oliviertassinari oliviertassinari added support: question Community support but can be turned into an improvement and removed support: Stack Overflow Please ask the community on Stack Overflow labels May 5, 2021
@support support bot reopened this May 5, 2021
@oliviertassinari oliviertassinari changed the title [TreeView / TreeItem] - label style not applied [TreeView] Tree item label style not applied May 5, 2021
@david-ic3
Copy link
Author

david-ic3 commented May 6, 2021

Sorry, missing something, but this is the code generated by the TreeItem component (.css-ehlda4-MuiTreeItem-content .MuiTreeItem-label). I'd expect the css rule label to work as it is doing in v4.

The example we put here is using the Google TreeItem example Material-UI (actually check the difference between the same example between v5 and v4).

br,

@oliviertassinari oliviertassinari changed the title [TreeView] Tree item label style not applied [TreeView] TreeItem label is two levels of specificity instead of one May 6, 2021
@oliviertassinari oliviertassinari removed the support: question Community support but can be turned into an improvement label May 6, 2021
@mnajdova
Copy link
Member

Actually, @mnajdova would it be worth flattening?

https://github.com/mui-org/material-ui/blob/58c7e708a419bc8895774e964b8ef00b55d045ac/packages/material-ui-lab/src/TreeItem/TreeItem.js#L119

I wonder, not sure.

Agree, we should re-implement the TreeItemContent component to follow the implementation of the other components. Then we won't need to increase the specificity.

@oliviertassinari oliviertassinari added new feature New feature or request ready to take Help wanted. Guidance available. There is a high chance the change will be accepted labels Jun 29, 2021
@flaviendelangle flaviendelangle transferred this issue from mui/material-ui Mar 1, 2024
@flaviendelangle flaviendelangle self-assigned this Mar 1, 2024
Copy link

⚠️ This issue has been closed.
If you have a similar problem, please open a new issue and provide details about your specific problem.
If you can provide additional information related to this topic that could help future readers, please feel free to leave a comment.

How did we do @david-ic3?
Your experience with our support team matters to us. If you have a moment, please share your thoughts through our brief survey.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: tree view TreeView, TreeItem. This is the name of the generic UI component, not the React module! MUI X new feature New feature or request ready to take Help wanted. Guidance available. There is a high chance the change will be accepted
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants