News for hackers. Stuff that matters.
Re:Custom Properties as State by bawolff on Saturday January 09, 2021 @12:31AM (#25697570)
True, but you still cant do first paint until all css is loaded, and for people with fast connections, the latency of the extra roundtrip matters more than the size of the file downloaded (within reason)
Re:Custom Properties as State by bryzaguy on Sunday January 10, 2021 @03:13PM (#25719137)
An alternative would be keeping theme state in JS as suggested at the end of the article which improves the cache-ability of the css file as themes change.
Re:Custom Properties as State by rriepe on Saturday January 09, 2021 @01:16AM (#25697895)
Yeah you'd have to load it in async to avoid that. You could start with a gray base and have the theme color pop in. Flash of original color.