This is a page from the Cascading Style Sheets Working Group Blog. Some other places to find information are the “current work” page, the www-style mailing list, the Future of CSS syndicator, and the issue list on Github.
Do you want to know how the CSS WG works? Fantasai has written about:csswg, An Inside View of the CSS Working Group at W3C.
From Tab’s blog post on the recent changes to the Color module:
Yesterday I committed a few changes to the CSS Color spec that are proving a little controversial to people without any background on the changes. Hopefully this will help!
Specifically, I made it so that the
rgb()function (and others) can now use the syntaxrgb(0 255 0 / 50%)for half-transparent green. Previously you’d write that asrgba(0, 255, 0, 50%). Why’d I make this change?This is part of a general overhaul to how CSS defines functions that fantasai and I are pushing. The overall strategy is written up on our wiki, but the general idea is that CSS has some informal rules about how to organize things and use certain punctuation characters. In particular, in CSS properties we normally just separate values with spaces, relying on distinguishable syntax (like
<string>vs<number>vs<length>) or just careful ordering to keep things unambiguously parseable. We use punctuation separators only for very specific purposes: commas are used to separate repetitions of a base value (like layers in thebackgroundproperty, or font names in thefont-familyproperty), and occasionally, when we can’t do anything better, a slash is used to separate two otherwise-ambiguous values (like font-size vs line-height in thefontshorthand, transition-delay vs transition-duration in thetransitionshorthand, or the multiple pieces of syntax in aborder-imagelayer).However, functions violated those rules. They used commas extensively and somewhat inconsistently, just to separate values from each other. On the one hand, this makes CSS functions look slightly more like functions in a traditional programming language; on the other hand, it meant you had to learn a different mental model of how CSS’s syntax works, and type a bunch of comma characters that weren’t actually necessary. fantasai and I have gradually come to the position that it’s worthwhile to unify CSS’s syntaxes, making functions more property-like. (Our position can be summed up aptly as “functions are just named chunks of CSS syntax”.)
Color
So that brings us to the Color spec. Color 3 was already a function-full spec, and Color 4 more than doubles that number, adding
hwb(),gray(),lab()andlch(), andcolor(). The first four of those look similar to the existingrgb()/etc functions, just taking a couple of numbers, so they were originally designed with the same syntax, separating every number with commas.But
color()was a bit more complex, more like a CSS property. It had to take a colorspace name, an arbitrary number of arguments to the colorspace, an alpha, then finally a fallback value in case the colorspace wasn’t loaded or was invalid. Putting commas between every value there just got ridiculous, not to mention made it difficult to read; in particular, it was hard to tell where the colorspace arguments ended and the alpha began.So, I opened Issue 266 about it, and discussion eventually led us to making it use CSS property syntax pretty much exactly:
color()takes a comma-separated list of colors (each one serving as fallback for the previous), and within each color, everything is space-separated. Because colorspaces can take an arbitrary number of numeric parameters, the alpha value was ambiguous (hard to even tell whether or not there was an alpha at a casual glance), and so we employed the slash to separate it visually from the parameters.At this point, tho, it was slightly weird to have this one color function use this particular syntax form, while none of the others used anything like it. Welp, all the color functions were on our wiki page’s list of things to overhaul anyway, so bombs away! We went ahead and changed all the new functions to use the same syntax (all values space-separated, with an optional slash-separated alpha), and then added a new syntax variant to the old functions with the same form.
(I stress, this is a new variant syntax, not a replacement. All your old
rgb(0, 255, 0)code is fine and will never be incorrect. We’re just classifying it as a legacy syntax; we’ve got a handful of those cluttering up CSS specs.)So, now all the color functions use the same syntax form, and they all agree with our general push to make functions resemble properties more closely. It may feel a little weird at first, but I think you’ll appreciate it as you get used to it (a few characters less typing, at the very least). And we’ve been edging this way for quite a while – as far back as
linear-gradient()we were trying to use commas reasonably, with the complex sizing/positioning part up front completely space-separated and commas used only to separate the color-stop repetitions.
calc for table layout to Values and Units 4calc with only percentage or only length is required to be resolved in Values and Units 4 color( [ colorspace? [ number+ | string ] [ / alpha ]? ]# [ , color ]? )rgb( [r, g, b] | [ r g b [ / alpha ] )calc serialization to it, and then publish the remainder of Values & Units 3 as CR.fit-content apply on every step of the algorithm instead of at the end.number and percentagenumber or percentagergb should be extended to allow an optional alpha. Likewise hsl. Pending compat analysis by TabAtkins.color nor in other color functions like rgb and hsl. There were four options on the table for the group to discuss on github and revisit for voting next week. They are:
The CSS Working Group has published an updated Working Draft of CSS Scroll Snap Module Level 1. This module contains features to control panning and scrolling behavior with “snap positions”, to which the UA is biased to land after a scroll operation.
This publication represents the completed merge of Tab and Fantasai’s Change Proposal that incorporates www-style feedback into Microsoft’s CSS Snap Points Module proposal championed by Matt Rakow. At this point all three editors will be working together to resolve the remaining open issues and address any further feedback on the module.
Please send feedback by either filing an issue in GitHub (preferable) or sending mail to the (archived) public mailing list www-style@w3.org with the spec code ([css-scroll-snap]) and your comment topic in the subject line. (Alternatively, you can email one of the editors and ask them to forward your comment.)
The CSS Working Group has published a Working Draft CSS Generated and Replaced Content Level 3. This module specifies the generated content features (content property and related functionality) in CSS.
This is the first draft of a complete rewrite of this module, and is very rough. Large chunks (i.e. most) of the 2003 draft have been deleted, and major new functionality over CSS2.1 consists mainly of imports from the GCPM module. New features include:
plus a handy new syntax for alternate text: content: url(sparkle.png) / "New!";
We expect future work on this module to be pinning down the actual syntax and behavior of all the exciting new features imported from GCPM. For those who want to toy with implementations, most CSS->PDF renderers already support a significant subset. Significant changes since 2003 are listed in the Changes section.
Please send feedback by either filing an issue in GitHub (preferable) or sending mail to the (archived) public mailing list www-style@w3.org with the spec code ([css-content]) and your comment topic in the subject line. (Alternatively, you can email one of the editors and ask them to forward your comment.)
offset-position will be written to mean do nothing to the position of the element.offset-path as it’s only relevant when there’s an angle.vertical-align: baseline means first baseline except for inline-blocks (due to CSS2.1 legacy)Archival Copy of the Change Proposal being discussed available here
Full Minutes || Spec Referenced
lch to the speccolor examplescolor fallback should be like font list fallback.Full Minutes || Spec Referenced
repeat and auto-rowsFull Minutes || Spec Referenced
Full Minutes || Spec Referenced
Browse by date:
Browse by category: