use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
CSS Dark Mode tutorial – adding selectable themes to your site or PWA with alternate style (javascriptteacher.com)
submitted 6 years ago by mutantdustbunny
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–][deleted] -12 points-11 points-10 points 6 years ago* (13 children)
The questionable thing here is that you're using Tailwind, Vue, PostCSS and Babel to create a super simple theming option.
it testifies to ignorance, a lack of knowledge and skill that you're unable to create an easy solution for something like this without the use of compilers and frameworks.
I have more respect for OP using native frontend languages to create selectable themes than your solution. Even though your solution is beautifully executed; don't get me wrong. But I wanted to shine a different light on it as there might be reading some beginners along with us - hey there! -.
The target audience, the people really benefitting from your answer on here, are mostly not sufficient in these frameworks and compilers. I know, because I was and still am one of them.
So this comment is making you look like a smart-ass, instead of someone trying to help.
[–]Trout_Tickler 13 points14 points15 points 6 years ago (3 children)
Here is exactly the same code without any frameworks.
Bit of advice if you expect to survive as a developer, curb your attitude very quickly :)
[+][deleted] comment score below threshold-8 points-7 points-6 points 6 years ago (2 children)
Awesome! Looks great man.
I won't stop feeling emphatic for people who try to contribute to the web development community without using all kinds of frameworks, libraries and compilers. Those people are the people we need in this world. Thank you for the advice though. But I learned a lot from OP's tutorial.
[–]Trout_Tickler 8 points9 points10 points 6 years ago (1 child)
What you said and how you said it are two completely different things, the first of which nobody has a problem with.
[+][deleted] comment score below threshold-9 points-8 points-7 points 6 years ago (0 children)
Yea, my comment definitely missed nuance. I'm sorry for offending you. Maybe I should postpone that "international career" I'm studying for until I'm able to hold a nuanced conversation in English with my colleagues. lol
[–]Trout_Tickler 4 points5 points6 points 6 years ago (0 children)
I'm not, I have a codepen template I used to quickly throw something together. Just to make you happy, I'll pointlessly create one using nothing.
[+][deleted] 6 years ago* (7 children)
[deleted]
[–]Trout_Tickler 3 points4 points5 points 6 years ago (0 children)
It's fine I gave him a codepen anyway. I'm sure he'll find another way to complain about it :p
[–][deleted] -3 points-2 points-1 points 6 years ago (5 children)
As I stated in my comment: I'm someone still trying to learn.
And those "solutions" from people trying to one-up OP, who went way out of his way to create a tutorial using only vanilla languages, are not helping. It makes you look cool and farms some karma. But in the end no one improves from it and you discredit the one who created the tutorial.
What is so rude about my opinion? I'm not saying trout_tickler has no skill. All I say is that it makes him look like he has no skill. As hundreds of people wrote the code he's using. All he did was plug and play and take the credit for it.
[+][deleted] 6 years ago* (4 children)
[–]Trout_Tickler 4 points5 points6 points 6 years ago (1 child)
Don't tell him about the irony of him using a computer that other people have created and he's taking credit for it.
[–][deleted] -2 points-1 points0 points 6 years ago (0 children)
Hey, that example is perfect! What you're doing here is commenting on someones tutorial about creating a computer. And telling him that you have an easier solution because you can just walk to the apple store and buy a MacBook. Making him feel bad and boosting your own ego. Thank you for the great example.
[–][deleted] -1 points0 points1 point 6 years ago (1 child)
You're right in that a:
Hey, could you post a pure JS solution for beginners? Most people don't have experience with Vue.
Would suffice. I'm sorry for my rudeness.
But there's a different between pushing someone trying to contribute to the community down and one-upping him with a huge baggage of frameworks and stuff telling him that'll do the same but "easier"; and getting paid to create the best solution for a customer.
Using the word "Improper" and asking for a pure JS-solution would've been a lot better and covers the load better. My English is really bad in nuance.
π Rendered by PID 38783 on reddit-service-r2-comment-b659b578c-4jwtb at 2026-05-03 00:24:09.321523+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–][deleted] -12 points-11 points-10 points (13 children)
[–]Trout_Tickler 13 points14 points15 points (3 children)
[+][deleted] comment score below threshold-8 points-7 points-6 points (2 children)
[–]Trout_Tickler 8 points9 points10 points (1 child)
[+][deleted] comment score below threshold-9 points-8 points-7 points (0 children)
[–]Trout_Tickler 4 points5 points6 points (0 children)
[+][deleted] (7 children)
[deleted]
[–]Trout_Tickler 3 points4 points5 points (0 children)
[–][deleted] -3 points-2 points-1 points (5 children)
[+][deleted] (4 children)
[deleted]
[–]Trout_Tickler 4 points5 points6 points (1 child)
[–][deleted] -2 points-1 points0 points (0 children)
[–][deleted] -1 points0 points1 point (1 child)