I use a different approach, I set all my scss variables in maps, so I can link them to a function and return the css variables. I have a flag as well in case I want to use the real value.
I just noticed the title of my article may lead to confusion: it’s more about accessing to the variable once defined, it’s not about the variable definition, which is a topic covered by your article.
I’m currently working on a SCSS workflow for Custom Media Queries, this time more on the media query definition. It will leverage the postcss-custom-media and postcss-media-minmax plugins, and from what I’m testing, it’ll be the faster way to both declare and use media queries I’ve ever encounter. (Huge statement. :D)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hey, cool way.
I use a different approach, I set all my scss variables in maps, so I can link them to a function and return the css variables. I have a flag as well in case I want to use the real value.
vinceumo.github.io/devNotes/sass/2...
Can your function be rewritten like this?
I just noticed the title of my article may lead to confusion: it’s more about accessing to the variable once defined, it’s not about the variable definition, which is a topic covered by your article.
What you write reminds me the css-vars package or the postcss-custom-properties plugin, which both seems very similar to what you do.
I’m currently working on a SCSS workflow for Custom Media Queries, this time more on the media query definition. It will leverage the postcss-custom-media and postcss-media-minmax plugins, and from what I’m testing, it’ll be the faster way to both declare and use media queries I’ve ever encounter. (Huge statement. :D)