DEV Community

Cover image for What is the future of CSS?
Ben Halpern
Ben Halpern

Posted on

What is the future of CSS?

Utility-first CSS is all the rage these days. Does anybody have feelings about what the next evolution of CSS (or web styling in general) will be?

What is on the horizon? Or, at least, what problems still need solving?

Latest comments (49)

Collapse
 
blicat profile image
float • Edited

HTML and CSS are two computer languages that are considered to be "old." They are, nonetheless, still quite important for coders in 2022. HTML and CSS knowledge benefits not just experienced programmers, but also individuals in a range of occupations by providing them with fundamental web page building skills.

Collapse
 
jeremybrett profile image
JeremyBrett
Collapse
 
vickalchev profile image
Vic

I'm surprised to see only one mention of utility libraries like Tailwind. I don't think such libraries are the only way forward but it's interesting to observe how they try to solve existing programs with CSS.

I'd like to see more logic introduced to CSS. We already have that with pseudo-classes but those are pre-written. What if we could create our own logic just like in any other programming languages?

Collapse
 
racheal profile image
Racheal Walker

Hey, I feel this is the future of CSS
Web developers who know CSS are in high demand for businesses. In fact, according to the Bureau of Labor Statistics, web development is a profession expected to grow much faster than the average occupation over the next decade.

Collapse
 
nikhilroy2 profile image
Nikhil Chandra Roy

For some situation, we have to rely svg, canvas but if css new features give us a way to make something like wave effect, clip-path (a better way) it can help us a lot.

Collapse
 
blindfish3 profile image
Ben Calder

Hopefully people actually bothering to learn it properly; instead of relying on the CSS equivalent of JQuery :D

Collapse
 
jaeming profile image
jaeming • Edited

I haven't heard methodologies like BEM and SMACSS mentioned in years. I get the appeal of Tailwind as I like using utility classes in bootstrap. Having stuff like preset padding/margin values is good for consistency. Anyone that has experience with design tokens would probably appreciate Tailwind to a certain extent. But I don't like bloating my HTML with scores of combined classes personally. CSS-in-JS is a big movement that a lot of people are adapting. I'm interested to see in what ways it could impact the way people write and use css in any case.

Collapse
 
fjones profile image
FJones

The quick rise and fall of BEM in particular is fascinating. I'm not sure what killed it. CSS-in-JS? Preprocessing so heavy it made no sense to structure things that way anymore? Frameworks that just broke through with no adherence to BEM? It's an odd one.

Collapse
 
darkwiiplayer profile image
𒎏Wii 🏳️‍⚧️

With Layers and Scope coming to CSS (hopefully soon), the only thing I feel is missing would be CSS Nesting.

Collapse
 
alohci profile image
Nicholas Stimpson

I wouldn't be surprised if CSS Nesting didn't make it to interoperable implementation before Scope. I think there's far more open questions and implementation complexity to Scope than to Nesting.

Collapse
 
darkwiiplayer profile image
𒎏Wii 🏳️‍⚧️

Yes; nesting is really just syntax sugar (as underlined by the fact that many preprocessors have this feature without any hacks to make it work), so it could be implemented relatively quickly.

Collapse
 
sakethkowtha profile image
sakethk • Edited

I feel in future CSS may come up with css components similar to styled-components. We can maintain UI logic and functional logic separate.

Collapse
 
jaeming profile image
jaeming

Exactly. I'm working on a design system with the UX where I work and separating design logic from business logic has a huge appeal in building the component library. It also makes extending/overriding components easy and yet explicit.

Collapse
 
sakethkowtha profile image
sakethk

Awsome @jaeming good to here. Let me know once it come to mature state i will try it.

Collapse
 
liviufromendtest profile image
Liviu Lupei

Junior Developer mentioning Tailwind CSS in 3, 2, 1 ...

Collapse
 
molydoly profile image
Molydoly

HTML and CSS are relatively 'old' coding languages. However, they are still highly relevant for coders in 2022. Knowledge of HTML and CSS not only helps professional programmers, but also helps individuals in a variety of professions by giving them basic web page development knowledge.

Collapse
 
murdercode profile image
Stefano Novelli

I dream a world where the hamburger menus are all made in CSS

Collapse
 
lil5 profile image
Lucian I. Last

But you can already make hamburger menus in pure css, using the checkbox input element

Collapse
 
murdercode profile image
Stefano Novelli

I know, that's why I said "all".

Collapse
 
spiderpig86 profile image
Stanley Lim

Until CSS adopts the utility and feature-set of Sass, it will remain a primitive and repetitive way to style anything.

Collapse
 
leob profile image
leob

Compared to styling/layout mechanisms used e.g. in Android or iOS, you can argue that CSS often feels somewhat "low level" and unintuitive, which can largely be attributed to its origins (it was not originally designed with application development in mind) ... maybe this is totally unrealistic, but if you view CSS as "the assembly language of layout/styling" (I came across this notion in one of the other comments), then I could imagine that someday someone might invent a new "higher level" layout/styling language, which generates CSS under the hood.

Collapse
 
alaindet profile image
Alain D'Ettorre
  • SASS will be fully integrated into CSS (nesting, more functions etc)
  • There will be an easier way to style web components
  • Maybe people will re-discover that naming classes the right way then style them is better than drowning HTML and SASS with utility-only classes, who knows