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][base] Add Tailwind CSS & plain CSS demo on the Switch page #37728

Merged

Conversation

mnajdova
Copy link
Member

@mnajdova mnajdova commented Jun 26, 2023

Part of #37222

TODO:

@mnajdova mnajdova added docs Improvements or additions to the documentation component: switch This is the name of the generic UI component, not the React module! package: base-ui Specific to @mui/base labels Jun 26, 2023
@mnajdova mnajdova changed the title WIP docs switch tailwind css & plain css demo [docs][base] Add Tailwind CSS & plain CSS demo on the Switch page Jun 26, 2023
@mnajdova
Copy link
Member Author

I am not sure about the focus visible styles, they look too much like Material UI. Maybe we should use the shadow for the other components:
image
cc @danilo-leal

@mui-bot
Copy link

mui-bot commented Jun 26, 2023

Netlify deploy preview

Bundle size report

No bundle size changes (Toolpad)
No bundle size changes

Generated by 🚫 dangerJS against ec7121b

@mnajdova mnajdova marked this pull request as ready for review June 27, 2023 08:48
@zannager zannager requested a review from danilo-leal June 27, 2023 10:16
@zanivan
Copy link
Contributor

zanivan commented Jun 27, 2023

I am not sure about the focus visible styles, they look too much like Material UI. Maybe we should use the shadow for the other components:

We could do like Joy UI—and some other libs too—and make the focus visible on the track instead of the thumb.

Screenshot 2023-06-27 at 16 47 11

However, I don't think it's much of a problem to look like Material UI, though. IMO, I like the focus on the thumb, what do you think?

@danilo-leal
Copy link
Contributor

I agree that the focus on the thumbs is not inherently a bad thing ⎯ it's slightly more intuitive that outlining the entire switch component. Would customize/polish it a bit though so it doesn't look as rough 😬

@mnajdova
Copy link
Member Author

Would customize/polish it a bit though so it doesn't look as rough 😬

@danilo-leal should I wait for this, or can we do it as a follow up?

@zanivan
Copy link
Contributor

zanivan commented Jul 3, 2023

I've tweaked a bit of the focusVisible to make the shadows the same color we're using in the demos. I don't know if it's just here, but the Tailwind thumb is not working as the other styles—it keeps the slate bg even when checked.

Tailwind:
Screenshot 2023-07-03 at 15 20 37

MUI System:
Screenshot 2023-07-03 at 15 22 57

@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Jul 4, 2023
@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label Jul 4, 2023
@mnajdova
Copy link
Member Author

mnajdova commented Jul 4, 2023

I don't know if it's just here, but the Tailwind thumb is not working as the other styles—it keeps the slate bg even when checked.

Fixed

Copy link
Contributor

@zanivan zanivan left a comment

Choose a reason for hiding this comment

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

Since the Tailwind and plain CSS demo is working, I think we could merge this. Other visual tweaks on the demos could be done on #37740

@mnajdova mnajdova merged commit 4b7c7eb into mui:master Jul 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: switch This is the name of the generic UI component, not the React module! docs Improvements or additions to the documentation package: base-ui Specific to @mui/base
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants