Xanthir

xanthir.com · Personal blog · on HN since 2010

Tab Atkins-Bjorklund (Xanthir) writes about CSS standards work, web specs, and assorted programming and math topics.

What HN saysHN commenters cite it for the reasoning behind CSS decisions, such as why @apply was abandoned and why variables use the -- prefix.
27HN people shared it
14linked it in comments
32stories submitted
137story points
4 years agolast shared
2010people per year2026

Most-shared posts

  1. 1
    W3C Decisions on CSS Variables (Accepting Comments)
    6 people · 26 points · first shared 2012 · 10 comments on HN
  2. 2
    B4o00
    4 people · first shared 2017
  3. 3
    A Word About CSS4
    2 people · 53 points · first shared 2012 · 33 comments on HN
  4. 4
    We Should Be Using Base 6 Instead
    2 people · 6 points · first shared 2018 · 1 comments on HN
  5. 5
    Depixelating Pixel Art
    1 people · 5 points · first shared 2015 · discussion on HN
  6. 6
    The color() Function
    1 people · 5 points · first shared 2012 · discussion on HN
  7. 7
    Why We Can't Have Nice Things: Metric Time
    1 people · 4 points · first shared 2014 · discussion on HN
  8. 8
    Render Any HTML5 Video in ASCII
    1 people · 3 points · first shared 2010 · 1 comments on HN
  9. 9
    2014 State of Element Queries
    1 people · 3 points · first shared 2014 · 1 comments on HN
  10. 10
    Explaining Futures
    1 people · 3 points · first shared 2013 · discussion on HN
  11. 11
    DOM Streams
    1 people · 2 points · first shared 2013 · discussion on HN
  12. 12
    2013 Work Plans - Tab Completion
    1 people · 2 points · first shared 2013 · discussion on HN
  13. 13
  14. 14
    Futures Eliminate Time
    1 people · 2 points · first shared 2013 · discussion on HN
  15. 15
    Basic Category Theory Terms
    1 people · 2 points · first shared 2018 · discussion on HN

What HN people wrote when they linked it

err4nt · 2023-03-29
Tailwind depends on @apply in PostCSS to function, something that was never officially proposed for CSS, but has been killed by its author and we know for sure CSS won't do, for the reasons the author of the original @apply idea lists here: https://www.xanthir.com/b4o00 So we have known all along that this will never happen. It was rejected for some very good reasons before Tailwind began.
no_wizard · 2022-10-22
There was a mixins proposal for `@apply`[0][1] but it was unfortunately dropped [0]: https://tabatkins.github.io/specs/css-apply-rule/ [1]: https://www.xanthir.com/b4o00
tln · 2020-05-28
Sometimes I wish that python strings weren't directly iterable... this article sums it up better than I ever could https://www.xanthir.com/b4wJ1 ...then str.strip and variants could be cleanly and logically extended to allow this functionality, because passing a string and a sequence of strings would be distinguishable. Alas, clean and logical function design can be hard to do late in a languages life. PEP 593 and PEP 585 are clean and logical... glad to see that :)
gorbert · 2019-12-18
They talk about reasons for choosing `--` here: https://www.xanthir.com/blog/b4KT0 TL, DR: There was discussion of using properties that look like `$foo` to define variables, but if they used `$foo` for variables, they would be unable to use it for future "variable-like" things. CSS custom properties behave differently from CSS pre-processor variables and they wanted to make that clear. Additionally, it’s to provide a way for custom properties to be used in any preprocessor.
striking · 2017-08-01
Relevant discussions to "@apply": https://discourse.wicg.io/t/needed-new-champion-for-css-apply-rule/201… and the linked http://www.xanthir.com/b4o00 ("Why I Abandoned @apply")
pluma · 2017-07-13
Err... no. CSS custom properties are interesting because they are dynamic. CSSNext just translates them statically, hence why it restricts definitions to `:root`. So the only thing CSSNext gives you over other "variables in CSS" preprocessors is that the syntax looks like actual CSS. But good luck swapping out colors at runtime without recompiling the generated CSS, which is trivial with "CSS-in-JS" solutions like styled-components or glamorous. EDIT: Also CSS variables are often advocated with `@apply` replacing preprocessor mixins. But `@apply` is pretty much dead outside faux-css preprocessors: http://www.xanthir.com/b4o00 so you probably shouldn't rely on CSSNext for this unless you understand that even if it looks like CSS what you're writing won't necessarily ever work in a browser.
colinramsay · 2016-02-07
I think a lot of people agree with you but there is a reason: http://www.xanthir.com/blog/b4KT0
MoOx_ · 2015-05-28
- Good for you :) - You probably don't need a framework - There is no such things as CSS 4 http://www.xanthir.com/b4Ko0 . That said, cssnext will handle features like babeljs, using different stages. An issue is opened for this https://github.com/cssnext/cssnext/issues/100
paulrouget · 2014-07-23
> what the heck were they thinking? I don't know, maybe about how to design a spec that is compatible with past and future CSS parsers and features? People think it's so simple to come up with a new feature for CSS/HTML/JS, when actually, they have no idea how difficult it is. They're smarter than that: http://www.xanthir.com/blog/b4KT0
icebraining · 2013-12-15
Using $ to identify variables was proposed in the CSS working group. It was ruled against in order to keep that syntax free for future developments (e.g.g SASS-like macros). http://www.xanthir.com/blog/b4KT0
SwellJoe · 2016-02-07
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 probably should have. I would normally say, "But, at least there's been time to work out the syntax in non-core projects, so things are probably nice now." But, this syntax and behavior doesn't even resemble SASS or LESS. Is there some other tool out there that provides variables in CSS that this is modeled after? Why reinvent the wheel when so many people are already familiar with and have worked out the quirks in SASS or LESS? Reading the explanation for why they went this way (in short, because these are nothing like SASS variables, in the sense that SASS is more like a macro): http://www.xanthir.com/blog/b4KT0 Is somewhat unconvincing. Why not implement what's already working for people in SASS/LESS (in the way it's already working), and then move on to whatever it is they've implemented here later once it is clear it's something people want/need and once it's been worked out in pre-processors? (I don't think I quite grasp the entirety of the difference, either...is it merely a matter of scope and composability?). Actually, someone in the comments maybe…
mncharity · 2022-11-22
Apropos color names, some related work: [] Color map with meaningful names http://www.procato.com/rgb+index/ [] The CNS Color Naming System https://www.xanthir.com/blog/b4JS1 https://en.wikipedia.org/wiki/Color_Naming_System [] Universal Color Language, Level 3 Color Names https://johndecember.com/html/spec/colorucl.html [] deriving color names from photos of rainbows: https://www.comfsm.fm/~dleeling/cis/hsl_rainbow.html [] determining color values by training on image searches: https://lear.inrialpes.fr/people/vandeweijer/color_names.html [] https://github.com/ayushoriginal/Optimized-RGB-To-ColorName

Keyboard shortcuts

/Search
j kNext / previous blog
EnterOpen selected blog
vVisit the blog site
fFollow / unfollow
lSwitch grid / list view
dSwitch dark mode
g hHome
g pTop posts
g tTopics
g fFollowing
g lLiked
g yHistory
g qFAQ
EscBack / close