This typically takes several years and afterwards only the people who use either modern evergreen browsers or who manually update their browsers will get the new features. Standards need to go through multiple review steps and then browser vendors need to actually implement them. They can innovate fasterĬSS, and web development in general, takes a lot of time to progress because of the standardisation process. That means minifying the resulting CSS by stripping things like comments, white-space, unnecessary units and even changing values to squeeze a few more bytes out of the file (eg. Just like how compiled code is faster than interpreted code, preprocessors are compiled before usage, putting them into an ideal state for a browser to consume. Certain preprocessors even have considerably different syntax, allowing developers to customise their development workflow even more. Functions, providing convenience functions that can transform values.Extending and loops, providing more ways to reuse styles.Nesting, providing a more intuitive and structured way to construct selectors.Variables, defining constants like sizes, colours and media queries that can be used multiple times.There are many other features that improve the maintainability of styles as well, such as: No longer do you need to hack away at a single, enormous CSS file containing all the styles in the page, the styles can now be split up into whatever way makes the most sense to the developer. Easy to developīeing supersets of CSS, developing styles in a preprocessor is simply better in every way to plain CSS. scss syntax for Sass).įeatures can then be learned progressively as required. In fact the three major preprocessors are actually supersets of CSS, meaning valid CSS is valid in the preprocessors (. To simply replace CSS, preprocessors are incredibly simple to learn.
0 Comments
Leave a Reply. |