Adding a Dark Mode to Vue in 5 Minutes
HTML-код
- Опубликовано: 29 сен 2024
- Save your spot in Vue.js Forge and get hands-on experience building Vue projects: vuejsforge.com/
---
RESOURCES
Setting up Vue and Tailwind - • How to Setup Tailwind ...
Tailwind Docs - tailwindcss.co...
VueUse Docs - vueuse.org/cor...
✅ Join the LearnVue+ Waiting List - learnvue.co
Get early access to videos, exclusive content, interactive code challenges, and more.
follow me on twitter:
/ mattmaribojoc
🚨 Like quick Vue lessons like these? Check out 800+ lessons over on Vue School - go.learnvue.co...
MUSIC
Lukrembo - Apricity • (no copyright music) l...
Lukrembo - Bake a Pie • lukrembo - bake a pie ...
Lukrembo - Bored • lukrembo - bored (roya...
Lukrembo - Branch • (no copyright music) c...
Lukrembo - Bread • (no copyright music) j...
Lukrembo - Castle • lukrembo - castle (roy...
Lukrembo - Daily • (no copyright music) c...
Lukrembo - Forest • (no copyright music) l...
Lukrembo - Home • lukrembo - home (royal...
Lukrembo - I Always Love You • (no copyright music) l...
Lukrembo - Imagine • (no copyright music) c...
Lukrembo - Lamp • lukrembo - lamp (royal...
Lukrembo - Marshmallow • lukrembo - marshmallow...
Lukrembo - Night • lukrembo - night (roya...
Lukrembo - Pancake • lukrembo - pancake (ro...
Lukrembo - Picnic • lukrembo - picnic (roy...
Lukrembo - Storybook • lukrembo - storybook (...
Lukrembo - Together • lukrembo - together (r...
Lukrembo - Wine • lukrembo - wine (royal...
#vuejs #vue #javascript #webdev
I'l pass this to my manager, he hates Dark Mode... (evil laugh)
he would get wrecked by tech twitter lol
@@LearnVue I think he is more "lets actually get all the P1 features in first, before doing dark mode" but then product team added more and more and more P1 MUST DO features, and then just randomly ask "What happened to dark mode" and almost made it a higher priority because they announced it would be coming soon.. AGES ago..
And the argument boiled down to "Is Dark Mode more important than P1" at which point Product didn't want to say yes, but you know they almost did..
And now it's just became a running joke of how important an unimportant feature almost became.
I found this channel today and i wanted only say thank you 🔥🤜🤛🙂
Watched the video just for fun and for support of the channel, because already knew how to make dark/light mode with Vanilla JS and with VueUse.
Ended learning something new. I always had the question about using parentheses or not when passing a function to an event attribute in the template, and never bothered reading about it, so I assumend Vue added the parentheses if the value was a function name, and evaluated the value if it was a function call. Now I learned that if we don't add parentheses, Vue appends the Event Object as argument. Mind blown. Thank you!
I have a question, how could you add a delay between changes so that the transition is not abrupt?
Is pure CSS viable in real world business? IDK why i am like this, but i feel like pure CSS can be enough by itself... is it?
I feel (like most things), it's doable when organized and maintained well - in theory at least lol.
For me, the biggest pro of Tailwind and utility classes is that they make it easier to see where styles are controlled. When I have tons of custom CSS styles, I find myself wasting time cross referencing BEM named classes since it's harder for me to visualize the inheritance and overrides.
Would love to hear your thoughts
hey, how can i enable the darkmode by default?
just learn Vue about 1 month, should i jump to nuxt ?
btw just found your chanel, i subscribe
I feel like by learning Nuxt, you'll still spend a decent amount of time learning Vue itself. You need to learn Vue to use Nuxt, but nothing says you can't do both at the same time.
So it really depends on the kind of projects you want to build and how you prefer learning
Your videos are top level, so straight forward and easy to follow. Most importantly very informative
Cool event, but why during the week, impossible to join for working people :/
Fr bro
AWESOME!! THANKS!
I new in Vue. Please, let me know, how to add class in body or html if "isDark" toggles (like in tile wind, maybe but i dont need tilewind)
Sorry! Find this in the the end of the video ))
but! if i use this- html class 'dark' toggled, but if i reload page i get error 'Cannot read properties of undefined (reading 'documentElement')'
bro, you save me from 2 hr burning
please do a video on data fetching in Nuxt3, its a complete nightmare
Does this work in combination with Capacitor for building hybrid apps
Awesome, thank you! I was able to implement dark mode on my site, but this would've probably made it easier.
Hi!
I'm just beginning to use UI frameworks with Vue 3 which ones do you recommend?
Cool!!!
Thanks. Blessings from Venezuela
yess very easy, thank you captan
how do we change class of the html tag in vue?
Ya I have a request , do more videos
any video for bootstrap?
Thank you! Awesome video.
Great ❤️💚
if (localStorage.theme === 'dark' || (!('theme' in localStorage) && window.matchMedia('(prefers-color-scheme: dark)').matches)) {
document.documentElement.classList.add('dark')
} else {
document.documentElement.classList.remove('dark')
}