zobweyt
zobweyt
Explore posts from servers
KPCKevin Powell - Community
Created by zobweyt on 10/11/2024 in #front-end
Choosing between dependencies and dev dependencies
I understand various types of dependencies when making libraries, but I still can't figure out whether it's worth dividing dependencies into different groups for applications. Let's say I use Vite, and how do I figure out where to put it? I use it for building and for running the app after it's built in production. So do I actually use it for production? Should I put such builders and runners as Vite in regular dependencies? Also, I use SASS. I know that It's needed for the building stage only. So should it be a development dependency? This leads me to another question: is building considered part of the production or development stage? Should dependencies required for the build process be placed in development dependencies or regular dependencies?
45 replies
KPCKevin Powell - Community
Created by zobweyt on 8/7/2024 in #front-end
Using CSS selectors with @media queries
Hey! I want user to select between dark, light, and system themes (and maybe even third, fourth, etc). I came up with this pen in mind: https://codepen.io/zobweyt/pen/BagdyGq But it's not working as expected. I want to turn on dark styles when any of the following conditions satisfy: - There's [data-theme="dark"] on an element - There's [data-theme="system"] on an element with @media (prefers-color-scheme: dark) I can't find a solution to make it without copy-pasting and mixins from SCSS or PostCSS, etc Is it even possible?
7 replies