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

Light/Dark mode #54

Open
jaspermayone opened this issue Oct 1, 2024 · 3 comments
Open

Light/Dark mode #54

jaspermayone opened this issue Oct 1, 2024 · 3 comments

Comments

@jaspermayone
Copy link
Owner

No description provided.

@jaspermayone
Copy link
Owner Author

jaspermayone commented Oct 1, 2024

https://www.instagram.com/reel/C-k49eCSFOX/?igsh=MTVoanNxamNvODk4Mw==

Instagram
Code with Ania Kubow on Instagram: "You can now create light and dark mode with just 2 Iines of CSS! This is a game changer for anyone who has tried to create light and dark mode before, writing lots of lots of code for your apps to turn to a darker theme, when viewed in dark mode on your operating system - or of course turn to lighter colours, when viewed in light mode. Now by using the light-dark method in css, you can pass through a light colour of your choice, and a dark colour of your choice! You can do so for many elements, such as the body element right here. All the first arguments will be lumped into your light mode theme. Just make sure to set the root also. And voila! Get the HTML and CSS from below and don’t forget to save this tip and follow for more.

Since May 2024, this feature works across the latest devices and browser versions.

— HTML —

View me in Light Mode and then Dark Mode on your OS

— CSS —
:root {
color-scheme: light dark;
}

body {
background-color: light-dark(#fff, #444);
color: light-dark(#444, #fff);
}

#devcommunity #csstips #coding #100daysofcode #webdeveloper"

9,934 likes, 85 comments - aniakubow on August 12, 2024: "You can now create light and dark mode with just 2 Iines of CSS! This is a game changer for anyone who has tried to create light and dark mode before, writing lots of lots of code for your apps to turn to a darker theme, when viewed in dark mode on your operating system - or of course turn to lighter colours, when viewed in light mode.
Now by using the light-dark method in css, you can pass through a light colour of your choice, and a dark colour of your choice! You can do so for many elements, such as the body element right here. All the first arguments will be lumped into your light mode theme. Just make sure to set the root also.
And voila! Get the HTML and CSS from below and don’t forget to save this tip and follow for more.

Since May 2024, this feature works across the latest devices and browser versions.

— HTML —

View me in Light Mode and then Dark Mode on your OS

— CSS —
:root {
color-scheme: light dark;
}

body {
background-color: light-dark(#fff, #444);
color: light-dark(#444, #fff);
}

#devcommunity #csstips #coding #100daysofcode #webdeveloper".

@aramshiva
Copy link
Collaborator

aramshiva commented Oct 1, 2024 via email

@jaspermayone
Copy link
Owner Author

Oh perfect!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants