question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Any way to change Switch color?

See original GitHub issue

I’ve tried using colors in various anchors inside a switches html block. It doesn’t look like there’s a way to change a switches color without manually typing the active classes out in css and overriding them with !important. If this is the case, this should be added in as a feature.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

8reactions
ErraticFoxcommented, Aug 24, 2016

I’m sure I’m most likely being ignorant, though I am curious. Isn’t the block below just background-color?

.switch label input[type=checkbox]:checked+.lever:after {
    background-color: #FF5252 !important;
}
.switch label input[type=checkbox]:checked+.lever {
    background-color: #FF5252 !important;
}
2reactions
Nohinncommented, Aug 22, 2016

I don’t know if I understood you right. Take a look at this codepen: http://codepen.io/Nohinn/pen/xONgLv

To change the switch color without using !important you should use those css rules.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Change "on" color of a Switch - android - Stack Overflow
No, there is no easier way. You can't magically change the color of an image :) – you786. Jun 28, 2012 at 23:55....
Read more >
How To Change Your Switch's On-Screen Joy-Con Colors
You can switch up your Joy-Con's display colors through a downloadable toolkit.
Read more >
Is there a way to change the switch lite color software side?
So I customized a switch and some joycons for my little brother and changed the color of the joycons with some software. Is...
Read more >
Change to dark or color mode on your Android device
Learn how to check your Android version. Some of these steps require you to touch the screen. Turn Dark theme on or off....
Read more >
Color Switch - Official - Apps on Google Play
Color Switch was the fastest mobile game in history to reach 50 million downloads and is loved by players in over 150 countries....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found