Venyl
Explore posts from serversKPCKevin Powell - Community
•Created by Venyl on 7/10/2024 in #front-end
Can't override Open-Props custom property
super crude and not that optimized but also should be better than using a universal selector
129 replies
KPCKevin Powell - Community
•Created by Venyl on 7/10/2024 in #front-end
Can't override Open-Props custom property
129 replies
KPCKevin Powell - Community
•Created by Venyl on 7/10/2024 in #front-end
Can't override Open-Props custom property
it works
129 replies
KPCKevin Powell - Community
•Created by Venyl on 7/10/2024 in #front-end
Can't override Open-Props custom property
I'm just gonna make a pre-processor, never made one, but I'll try
129 replies
KPCKevin Powell - Community
•Created by Venyl on 7/10/2024 in #front-end
Can't override Open-Props custom property
Well I guess I'll need to write my own pre-processor if I want both a good DX and a good UX haha
129 replies
KPCKevin Powell - Community
•Created by Venyl on 7/10/2024 in #front-end
Can't override Open-Props custom property
129 replies
KPCKevin Powell - Community
•Created by Venyl on 7/10/2024 in #front-end
Can't override Open-Props custom property
Thank you
129 replies
KPCKevin Powell - Community
•Created by Venyl on 7/10/2024 in #front-end
Can't override Open-Props custom property
Oh, a Sass variable you say? I'll definitely check that out
129 replies
KPCKevin Powell - Community
•Created by Venyl on 7/10/2024 in #front-end
Can't override Open-Props custom property
So all the fixes this article mentions are ok for some use-cases, but for me redeclaring an entire property for a shadow is too bothersome, since those can get quite long, maybe I could use solution #2 and comma-separate the selectors, but that still isn't as nice as using
*
, do you know of any other solutions which could fix this problem? Maybe even a pre-processor of some sort would do the job?129 replies
KPCKevin Powell - Community
•Created by Venyl on 7/10/2024 in #front-end
Can't override Open-Props custom property
I'll read it right away
129 replies
KPCKevin Powell - Community
•Created by Venyl on 7/10/2024 in #front-end
Can't override Open-Props custom property
Oh, thanks a lot :)
129 replies
KPCKevin Powell - Community
•Created by Venyl on 7/10/2024 in #front-end
Can't override Open-Props custom property
What article are you mentioning here?
129 replies
KPCKevin Powell - Community
•Created by Venyl on 7/10/2024 in #front-end
Can't override Open-Props custom property
it won't work that way,
--shadow-6
needs to be re-declared for every element which also wants to change --shadow-color
since --shadow-6
is derived from --shadow-color
, so if you don't redeclare --shadow-6
then it will just use the old --shadow-color
value129 replies
KPCKevin Powell - Community
•Created by Venyl on 7/10/2024 in #front-end
Can't override Open-Props custom property
@Kevin if you haven't already, perhaps you could make a short video about this topic, since this is the first time I've encountered such a problem and honestly I'm still not sure what EXACTLY is going on and it's really difficult to find any information on this matter online
129 replies
KPCKevin Powell - Community
•Created by Venyl on 7/10/2024 in #front-end
Can't override Open-Props custom property
no, that's the entire problem, the color won't update because
--shadow-6
gets computed inside :root
instead of on a per-element basis129 replies
KPCKevin Powell - Community
•Created by Venyl on 7/10/2024 in #front-end
Can't override Open-Props custom property
Works fine
129 replies
KPCKevin Powell - Community
•Created by Venyl on 7/10/2024 in #front-end
Can't override Open-Props custom property
My final solution is to just redeclare the shadow properties in a universal selector
129 replies
KPCKevin Powell - Community
•Created by Venyl on 7/10/2024 in #front-end
Can't override Open-Props custom property
To redefine that entire property each time I want a custom shadow color
129 replies
KPCKevin Powell - Community
•Created by Venyl on 7/10/2024 in #front-end
Can't override Open-Props custom property
I mean it's just very impractical
129 replies
KPCKevin Powell - Community
•Created by Venyl on 7/10/2024 in #front-end
Can't override Open-Props custom property
Which sucks because that property is way too long
129 replies