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

[docs] Add scrollbar to color picker demo #43672

Merged
merged 3 commits into from
Sep 11, 2024

Conversation

sai6855
Copy link
Contributor

@sai6855 sai6855 commented Sep 9, 2024

Added scroll bar to https://deploy-preview-43672--material-ui.netlify.app/material-ui/customization/color/#playground demo, so that users can see names of colors they have selected

current demo: https://mui.com/material-ui/customization/color/#playground

@sai6855 sai6855 marked this pull request as draft September 9, 2024 05:16
@sai6855 sai6855 added docs Improvements or additions to the documentation enhancement This is not a bug, nor a new feature labels Sep 9, 2024
@mui-bot
Copy link

mui-bot commented Sep 9, 2024

Netlify deploy preview

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

Bundle size report

No bundle size changes (Toolpad)
No bundle size changes

Generated by 🚫 dangerJS against cdfcb87

@sai6855 sai6855 self-assigned this Sep 9, 2024
@sai6855 sai6855 marked this pull request as ready for review September 9, 2024 05:29
@sai6855 sai6855 removed their assignment Sep 9, 2024
@ZeeshanTamboli ZeeshanTamboli merged commit 2d311c3 into mui:master Sep 11, 2024
22 checks passed
@@ -58,7 +58,7 @@ function ColorDemo(props) {
</Typography>
</Toolbar>
</AppBar>
<Box component="pre" sx={{ m: 2, fontSize: 16 }}>
<Box component="pre" sx={{ m: 2, fontSize: 16, overflowX: 'auto' }}>
Copy link
Member

@oliviertassinari oliviertassinari Sep 11, 2024

Choose a reason for hiding this comment

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

Why not

Suggested change
<Box component="pre" sx={{ m: 2, fontSize: 16, overflowX: 'auto' }}>
<Box component="pre" sx={{ m: 2, fontSize: 16, overflow: 'auto' }}>

like in

?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We could do this. The reason I went for overflowX is that I haven't come across any situation that requires a scrollbar on the Y axis.

Copy link
Member

Choose a reason for hiding this comment

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

Ok, we can be lazy and wait. It's more that I usually never seen X/Y overflow to be superior to the alternatives: what I found most useful is nothing, or overflow: auto when I want to make sure a scroll container trigger.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work docs Improvements or additions to the documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants