HNHacker News
TopNewBestAskShowJobs

TabAtkins

49 karma · joined June 13, 2012

I work at Google and am a member of the CSS Working Group and a few others (SVG, HTML, WebApps, etc.). I'm the editor for several CSS specs, including Image Values, Values & Units, Flexbox, and Variables.

Homepage is http://xanthir.com. Blog is http://xanthir.com/blog. Twitter is @tabatkins.

[ my public key: https://keybase.io/tabatkins; my proof: https://keybase.io/tabatkins/sigs/hC-Sok8TKSuyb_bb9cSU6uZxkXZQI0PXjSmrI1-5Nb0 ]

submissionscomments
TabAtkins··on W3C Decisions on CSS Variables (Accepting Comments)
We already have this: http://www.whatwg.org/specs/web-apps/current-work/multipage/...
TabAtkins··on W3C Decisions on CSS Variables (Accepting Comments)
As bkardell said, math is in CSS now with calc() http://dev.w3.org/csswg/css3-values/#calc-notation

Color manipulation will be in Colors level 4, whenever I get the time to work on it (probably early next year).

TabAtkins··on CSS Variables land in WebKit
Many of the most exciting upcoming features in CSS don't gracefully degrade well. Variables are one, yes, but the same is true of Flexbox or Grid Layout, Regions, and others.

One thing that will help (once it's supported, heh) is the @supports rule http://dev.w3.org/csswg/css3-conditional/#at-supports . (Actually, it'll help even before it's supported, since you can put the "down-level" version outside the rule and then reverse the properties and do the new stuff inside the rule. The inner bits will be completely ignored in old browsers.)

TabAtkins··on CSS Variables land in WebKit
Syntax isn't frozen. Here's another possibility:

:root { $header-color: #06c; } h1 { background-color: $header-color; }

(Note that the spec's use of the :root pseudo is just to generically declare "global" variables that should apply to the whole page. If you're just using HTML, feel free to use "html" or "body" as the selector instead.)

TabAtkins··on CSS Variables land in WebKit
You can't write a server-side implementation of canvas or AJAX either. ^_^ It is possible to create a polyfill for CSS variables if you use JS as well. You can do a mostly-working one relatively easily that covers the simple, static case (where vars aren't changed dynamically), but a feature-complete one is a lot harder.

More directly, though, things that can be done by a preprocessor are, by their very nature, less attractive for us to work on. Syntax improvements are nice, and can justify their existence in the core language, but more important to us in the CSSWG is adding functionality that can't be achieved any other way, or not without a lot of painful hacking.

I'd rather let a thousand flowers bloom on the syntax side while I spend my limited time adding new features.

← PreviousPage 2 of 2