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

Is there a possibility to style switches in "off" position the same as for the "on" positions? #67

Closed
oliveratgithub opened this issue Nov 7, 2017 · 2 comments
Labels
question General questions about the project.

Comments

@oliveratgithub
Copy link

This is regarding the Switches span: https://shoelace.style/docs/switches.html

Is it possible to style a Switch with the same classes but in the OFF position (switch button on the left), in combination with the default behaviour for styling the ON position? By default, switch = off is always grayed out.

I would like to have a switch in different colors, whether it's on the "off" or "on" position – image it to be more like an A/B chooser, instead of an ON/OFF switch.

Thanks for any hints on this,
Oliver

@claviska claviska added the question General questions about the project. label Nov 8, 2017
@claviska
Copy link
Member

claviska commented Nov 8, 2017

The default styles are inspired by iOS switches, where they're plain white/gray by default and turn a color when activated.

I'd suggest adding a modifier class to customize your own. You can use the base switch class to start, then override it with your modifier class (e.g. switch-colored).

@oliveratgithub
Copy link
Author

Thanks, I will look into that!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question General questions about the project.
Projects
None yet
Development

No branches or pull requests

2 participants