Live data from Hacker News

CSS Variables landing in Chrome 49

developers.google.com

41–50 of 70 posts

Re: CSS Variables landing in Chrome 49

#41
post #18

Earlier quoted context omitted.

The CSS team has people like this, who no longer make websites: https://www.w3.org/People/Bos/CSS-variables Thus they're disconnected from current web developers. Meanwhile Smashing says something like 77% of audience uses SASS.

> Very few people (only professional designers, it seems) write style sheets longer than a hundred lines. Hahaha, wow.

As someone who has to write thousands of lines of CSS due to a poorly designed CMS, I'll start calling myself a Professional Designer from now on.

Re: CSS Variables landing in Chrome 49

#42

They're already enabled in Firefox, and they'll also be supported in the next version of Safari. I'm going to use these to allow changing the appearance of my app, which has a Windows 95-style UI. 95 has many customisable values that determine how the UI looks (fonts, font sizes, font styles, foreground and background colours, UI element sizes, etc.) that it stores in certain registry keys and that the user can chang…

you are using reg keys to store properties? is it a chromium app?

He was just explaining how it worked in Windows 95, he will be using CSS variables instead.

Re: CSS Variables landing in Chrome 49

#43
post #15

Earlier quoted context omitted.

I think a lot of people agree with you but there is a reason: http://www.xanthir.com/blog/b4KT0

Stupid decision, the should have used $foo (dollar sign for variables) like in Perl and PHP. It remind me decisions of standards based on XML (XLST, XML-Schema, RDF, etc).

Read the linked post. Css variables are nothing like macros like sass's `$foo` and css might support macros with sass's `$foo` syntax in future.

Re: CSS Variables landing in Chrome 49

#45
post #18

Earlier quoted context omitted.

The CSS team has people like this, who no longer make websites: https://www.w3.org/People/Bos/CSS-variables Thus they're disconnected from current web developers. Meanwhile Smashing says something like 77% of audience uses SASS.

> Very few people (only professional designers, it seems) write style sheets longer than a hundred lines. Hahaha, wow.

That's from 2008, though that was a pretty silly thing to say even then.

Re: CSS Variables landing in Chrome 49

#46
post #12

Earlier quoted context omitted.

Given that Edge has pretty much completely replaced IE, then yes, it's unlikely IE will receive any more updates. And to make it worse, Microsoft doesn't seem to be updating Edge as much as they were promising, meaning that we could end up in the exact same situation as before.

Edge is an evergreen (ie auto updating) so it's a very good thing that MS is aggressively pushing to kill IE. In the not-so-distant future, IE won't exist. Safari will likely be the next browser that will be slowest to update, considering its current progress in relation to the latest standards. Even with regular updates they seem to be falling behind.

That's definitely what it's supposed to be, and what Microsoft said they were doing.

But Edge updates seem to be a lot rarer than people expected, and seemingly tied more into Windows updates than any sort of regular release schedule.

If Microsoft want to make it a good browser in the long term, they need to move away from tying updates to Windows ones and just release them when new features have been implemented.

Re: CSS Variables landing in Chrome 49

#49
post #47

Is there a way to access it from javaScript? Can JS code set CSS --color and make it change.

It looks like this can be changed with `setProperty`. There's a demo[1] that works on Firefox 31+ and Chrome 49+

[1] https://www.broken-links.com/2014/08/28/css-variables-updati...

Re: CSS Variables landing in Chrome 49

#50
post #18

I've wondered for years why we're using pre-processing to get variables into CSS. Given that there hasn't been a commonly advocated workflow that didn't include some sort of CSS processor (like LESS or SASS) in about a decade, it seems like somebody working on the standards would have realized that CSS needed variables, at the very least. So, it's cool that it's coming, though it's taken a lot longer than I reckon it…

The CSS team has people like this, who no longer make websites: https://www.w3.org/People/Bos/CSS-variables Thus they're disconnected from current web developers. Meanwhile Smashing says something like 77% of audience uses SASS.

Ah, Bert Bos, the W3C's "style activity lead". What a joke.

He's the guy who wasted a decade writing an ASCII-art based "template layout module"[1], which he was never able to persuade a single browser vendor to implement. It eventually got demoted from a working draft to a "note", which is the W3C's polite term for standards fanfiction.

His other major achievement is putting his own photo on every one of the CSS working group's web pages. I'm not joking: https://www.w3.org/Style/CSS/#endmatter .

And let me tell you tale of that photo/byline. It originally appeared on the working group's crappy 1990s site, which persisted until the late 2000s (because that's how fast things move at the W3C), and you could kinda forgive it as one of the dumb things people put on dumb 1990s websites.

Anyway, eventually it became too embarrassing that the working group responsible for CSS had such a shitty site, and some other members of the group took it upon themselves to produce a shiny new design with useful content, but sans Bos' photo. This done, they submitted what they'd come up to the W3C. Eventually, it showed up on the W3C's servers but, surprise, surprise, it had been rather mangled, and Bos' photo was back, clumsily shoved into a footer where it hadn't originally been.

It's a small, petty thing, but all the more hilarious for it. God knows how that guy still has a job at the W3C. Maybe he's best friends with Tim Berners-Lee, or something?

[1] https://www.w3.org/TR/css-template-3/

Post reply on HN