Software Architect at This Dot, blogger, speaker, writer https://leanpub.com/beyond-coding. I advocate knowledge transfer, clean code and focusing his extra time in supporting new Devs.
What I meant in that sentence, is that eh feature works with plain CSS, not that SCSS is useless! :)
Also what you said about "designs values" that need to be set at design time, but that also can nowadays be achieved with the use of CSS properties. I have worked in many projects that uses CSS properties in the way you are now explaining (set constant values), and I do not think the use of a pre-processor would be needed there either.
Again, I love SASS and I personally use it all the time, the reasoning for me say that it was not needed, is to make sure that people are aware of what they CAN and CANNOT achieve with plain technologies :)
but that also can nowadays be achieved with the use of CSS properties.
Sure—but that still has a "we have let, what do we need const for" vibe to me.
I have worked in many projects that uses CSS properties in the way you are now explaining (set constant values), and I do not think the use of a pre-processor would be needed there either.
Ok—what if you're using SASS anyway—for source organization?
/* Somewhere in the "settings" layer (01) */$black:#000000;$white:#ffffff;/* Somewhere in the "generic" layer (03) */:root{--text-colour:#{$black};--bg-colour:#{$white};}@media(prefers-color-scheme:dark){:root{--text-colour:#{$white};--bg-colour:#{$black};}}
In this particular scenario CSS custom properties are only employed where dynamic (i.e. late, run-time) behaviour is required (communicating intent) and the fundamental, global colours and measures are collectively assembled in one place outside of any CSS.
Dynamic values are often based on static ones (which are perhaps even generated) and this maintains a nice separation.
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.
What I meant in that sentence, is that eh feature works with plain CSS, not that SCSS is useless! :)
Also what you said about "designs values" that need to be set at design time, but that also can nowadays be achieved with the use of CSS properties. I have worked in many projects that uses CSS properties in the way you are now explaining (set constant values), and I do not think the use of a pre-processor would be needed there either.
Again, I love SASS and I personally use it all the time, the reasoning for me say that it was not needed, is to make sure that people are aware of what they CAN and CANNOT achieve with plain technologies :)
Sure—but that still has a "we have
let
, what do we needconst
for" vibe to me.Ok—what if you're using SASS anyway—for source organization?
(ITCSS)
In this particular scenario CSS custom properties are only employed where dynamic (i.e. late, run-time) behaviour is required (communicating intent) and the fundamental, global colours and measures are collectively assembled in one place outside of any CSS.
Dynamic values are often based on static ones (which are perhaps even generated) and this maintains a nice separation.