All things Shopify and commerce
To continue receiving payouts, you need to secure your account by turning on two-step authentication. If two-step authentication is not turned on your payouts will be paused. Learn more
Hello,
Can someone tell me how to enable dark grey colour on dark mode and light grey colour on light mode?
like...
https://electrox.arenacommerce.com/
There are a few different ways to enable dark grey color on dark mode and light grey color on light mode, depending on the specific framework or technology you are using to build your website. Here are a few examples:
body {
background-color: lightgray;
}
@media (prefers-color-scheme: dark) {
body {
background-color: darkgray;
}
}
const checkDarkMode = window.matchMedia('(prefers-color-scheme: dark)');
checkDarkMode.addListener((e) => {
if (e.matches) {
document.body.style.backgroundColor = "darkgray";
} else {
document.body.style.backgroundColor = "lightgray";
}
});
$light-gray: #f5f5f5;
$dark-gray: #333;
body {
background-color: lightness($light-gray, 100%);
@IF(lightness($light-gray) > 50) {
background-color: darken($light-gray, 5%);
}
@else {
background-color: lighten($light-gray, 5%);
}
}
Note: These are just examples and you might have to tweak it based on your specific requirements and frameworks you are using.
User | RANK |
---|---|
67 | |
46 | |
34 | |
32 | |
27 |
Learn these 5 things I had to learn the hard way with starting and running my own business
By Kitana Jan 27, 2023Would you love to unleash the unbridled power of the Google Shopping Channel into your sho...
By Gabe Jan 6, 2023How can you turn a hobby into a career? That’s what Emmanuel did while working as a wa...
By Skye Dec 30, 2022