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.
Tab Atkins and I published an updated Working Draft of CSS Image Values and Replaced Content Level 3 this month. We anticipate that this will be the last draft before Last Call, which we aim to publish in January. If you have an interest in this draft, please review it and send in your comments.
Below is a summary of the major changes to CSS gradients over the past year:
linear-gradient()
changed from polar angles to bearing angles (compass directions). 0° now points up (bottom-to-top), and angles increase clockwise. See Angles in Gradients for the feedback that informed this decision.
linear-gradient()
changed from bare directional keywords (top
, right
, bottom
, left
) indicating the starting point to to <keywords>
where the keyword indicates the endpoint. (to bottom
, to left
, to bottom
, to left
). This change was made because Tab felt having 0deg
mean bottom-to-top made the fact that top
meant top-to-bottom confusing. The WG was split but mostly ambivalent on whether this was necessary, or whether from <keyword>
was a better alternative; the resolution landed on to <keyword>
.
linear-gradient()
has been redefined so that instead of aligning the gradient line to the diagonal, the central color occupies the other diagonal. See Behnam Esfabad’s post for a demonstration showing the old and new (“magic”) versions.
radial-gradient()
has been changed to (roughly) radial-gradient( [ <shape> || <size> ] [ at <position> ]?, <color-stop> [ , <color-stop> ]+)
: specifically, the shape/size and position parameters are collapsed into the first argument using CSS property value conventions, allowing either or both to be specified. Position is distinguished from size by the preceding at
keyword. See Radial Gradient Readability for some of the thinking that went into this change.
Although CSS gradients are undoubtedly the most anticipated feature in CSS3 Images, there are a number of other features in this draft:
image()
notation, which can be used in place of url()
, allows authors to trigger CSS parser fallback in older UAs when using media fragments.
image()
notation allows specifying a list of fallback images in various formats and allows annotating images with left-to-right or right-to-left directionality so that they flip automatically to match the element’s directionality.
object-fit
property allows preserving the aspect ratio of an image when assigning its box a specified size. In conjunction with the min/max-width/height
properties, it also allows scaling the image and its box up to a given maximum, or down to a given minimum. The object-position
property allows repositioning the image within its content box using background-positioning sytax when object-fit
causes the aspect ratio of the image and the content box to mismatch.
image-resolution
property allows for using bitmap resolutions other than 1 image pixel == 1 CSS px unit.
As always, send feedback to www-style with the spec code ([css3-images]
) and your comment topic in the subject line. While posting to www-style is preferred, I’ve also cross-posted to CSS3.info, and we’ll be scanning the comments there for issues, too.