📜 ⬆️ ⬇️

Future CSS


In connection with the frequent reports that in CSS they want to add variables, animation, transformation, etc., I would like to discuss a little detached on this topic.
CSS , which is already 12 years old, was originally conceived and developed as a means to describe the appearance of a document. Since then much water has flowed and technology has undergone significant changes and additions. Currently, the working version of the W3C standard, adopted in 2006 - Level 2.1 . Level 3 is in development (there is a draft), and many developers are looking forward to it.
There are a lot of rumors and assumptions going around the future of CSS, short ones are exaggerated and multiplied, resulting in discussions and disputes. After all, in fact, if at least half of the proposed changes are implemented, then CSS will turn into a (full?) Programming language for the visual component of web documents.
And everything would be good if it did not bring confusion into the ranks of developers, some of whom reasonably assert that using variables at the document level is good, as it allows you to more easily change the values ​​of certain properties, and the properties themselves. Another part of the developers does not agree with these statements and insists that the variables are evil, since there is little sense from them, they only confuse and so on.
Both those and other statements have the right to exist in certain situations, as the situation is ambiguous. But variables are nothing. What about the animation of the elements? Until now, the animation is the prerogative of Javascript'a, which can be pushed from this post, at least in part.
Moments such as the rotation of elements around its axis, the displacement in the plane and compression with stretching, can be picked up by CSS berserks and implemented in the most-non-indulgent manner. And anyone who is more or less versed in CSS, but not versed in Javascript, would say that he would be happy about that. In this situation, Javascript, as the main tool for creating dynamics in web documents, fades into the background, if not further.
In the current situation, confusion may occur in the harmonious ranks of web developers, in which the boundaries between the separation of logic, dynamics, content and design will begin to blur.
Maybe I exaggerate and everything is not so difficult. Let's consider this situation. Suppose, in theory, that the era of CSS has arrived and all the wildest plans for expanding and highlighting CSS into a new language have come true. How do i see it?
Using variables at the style file level will grow into a desire to use global variables. In each project consisting of more than 3/5/10 pages there will be a global master file of styles with variables, a style file responsible for animation, a file responsible for typography, and so on. There will be confusion with variables, since it is not clear what the priority of their application will be. Line by line, like reading a CSS file now, or not? Will it be possible to endure variables?
Javascript will become the transport of information from the client to the server and abstracts completely from the design. Since the CSS capabilities will not be enough for full control of the element (I just do not believe that this moment will come), some developers will continue to use JS to create page dynamics. This order will not add.
The markup of the documents will be simplified to a minor, in any case, a considerable part of it will be generated by JS and modified in CSS. divs (divisions) will become the basic basic markup elements. With CSS, they will take any shape, from a circle to a polygon. Opportunities will be much more and designers will not be constrained hands.
The web will benefit from all this. There will be a lot of room for activity and creativity. Reading the coffee grounds on the possible ways of CSS development, my hands are itching to create something like that!
And now a tub of ice water. Has anyone asked browser developers, particularly MSIE, about their plans for the future? Or will all progressive developers write websites exclusively for alternative browsers (and not for people)? And the rest in the old-fashioned way, will make out the content using CSS2.1 (2.9?), Where the dynamics, animation, etc. will remain the patrimony of ECMA Script?
Any fundamental changes should be clearly structured and understood; the roles of the leading players must be distributed and painted, otherwise there will be confusion. And it would be good if such global things as markup, programming and design languages ​​cease to be Recommendations and turn into Standards, behind which stands the Organization, requiring their implementation and observance.
The development of CSS is a definite boon. And it will most certainly affect other components of the Web. The only question is, what fantasy will come into reality, and what will remain unrealized dreams? Time will tell.

')

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


All Articles