DEV Community

Discussion on: What if CSS was imperative?

Collapse
 
isaachagoel profile image
Isaac Hagoel

I think css is hard to master because:

  1. There is a lot of it (a lot of attributes, selectors etc)
  2. Non locality: there are a lot of explicit and implicit relationships potentially between seemingly unrelated parts of the page
Collapse
 
alvaromontoro profile image
Alvaro Montoro

I think point 1 should not count. JavaScript (or any language for that matter) has a ton of classes and properties, they are just distributed differently.

Point 2 is a good one. With the cascading and the value inheritance, it is not obvious what some things are going to do. CSS has specs for nested rules (a la Sass/Less) which could help with that, but they are not supported yet.