News for hackers. Stuff that matters.
Re:Why I'm Excited About Native CSS Variables by RX14 on Monday December 07, 2015 @04:59AM (#10688590)
What I am most excited about is manipulating these using javascript, which is also something you cannot do with a CSS processor because the values are baked into the CSS.
Re:Why I'm Excited About Native CSS Variables by Tiquor on Monday December 07, 2015 @06:46AM (#10688824)
I'm very excited for dynamic, succinct templating.
Re:Why I'm Excited About Native CSS Variables by err4nt on Monday December 07, 2015 @10:22AM (#10689968)
If you're looking for 'living' CSS with variables supplied by JS at the time the styles (or responsive queries) apply, there's a polyfill for IE8+ that includes this functionality that you can use everywhere today!

http://codepen.io/tomhodgins/pen/MKWOWW

Re:Why I'm Excited About Native CSS Variables by onion2k on Monday December 07, 2015 @10:32AM (#10690026)
I don't understand that use case. If you're happy using a JS value to update a style, what's wrong with just updating the style in JS? If you're concerned about performance then you can obviously do things like debouncing anything that changes the style, or you could use a MediaQueryListListener to fire an event your JS listens to when a user crosses over a media query breakpoint.

While it'll be fun to manipulate CSS properties using JS values, it doesn't seem necessary.

Re:Why I'm Excited About Native CSS Variables by philh on Monday December 07, 2015 @12:28PM (#10690928)
It seems like this would let you update lots of styles simultaneously, without having to keep track of exactly which styles they are.