⬆️ ⬇️

W3C Digest. What's new in CSS3. Release 2

The CSS3 working group is constantly having discussions about what will be in the new standard. No scandals, intrigues and investigations. Bare thoughts, undisguised ideas, naked facts.



Previous part here



A bit of magic in linear gradients



A new way of drawing linear gradients is proposed. As you know, such fillings are drawn along the gradient line ( gradient-line ), the starting point of which is the center of the container. However, if one wants to draw a gradient more cunningly, one cannot do without additional crutches in the form of JS. For example, there is a gradient with three colors: A, B, B. I wanted to fill the container so that color A was “tied” to the upper left corner, color B to the upper right, and color B to the lower right. And when you change the size of the container, the result was always the same.



There is some sensible idea in this, but “sculpt” on top of the current behavior of linear gradients is somehow a bit wrong.



Desire to manage background print



As you know, the background is not printed by the browser until the user manually specifies the desire to print the contents of the page along with the background. But, some authors still itch in one place to ignore the user's opinion about this. A suggestion was received stupidly to print all background images indiscriminately, or just fills that are defined in @media print , or add a new property that would uniquely indicate the background print. Then a clarification was received that print without demand only those fills that are !important But, after a lengthy discussion, the offering party was never able to invent a normal way to manage the printing of backgrounds. Protection is still in its opinion - it is better to manage printing from the browser, not from the page.

')

CSS3 animation. Difficulties with hidden content



The specification has not yet described how an element that is hidden through display: none , or visibility: hidden should behave. Gecko and WebKit have slightly different behavior when an element is hidden during an animation: WebKit does not start the animation and sets it to zero if the element is invisible, and Gecko continues to iterate the properties of even invisible elements. As a result, the conversation came to the conclusion that there is a lack of a special API for more precise control of the animation, to which there was a reasonable objection that all animation perversions should be done on the JS side, and the simplest possibilities in CSS.



New CSS3 Grid Layout editorial version



The CSS3 Grid Layout module has been slightly modified. Added description of the sizing algorithm for rows and columns. The grid-template property has been slightly simplified, in which the grid-cell pseudo-element and the grid-cell-stacking property have been removed. Fixed grammar for grid-columns and grid-rows properties.



That's all for today. Thanks for attention!

Source: https://habr.com/ru/post/124499/



All Articles