Don't worry, I'm not breaking the web :P
I'm annoyed by some stuff in CSS, and I'm going to fix it. It'll be syntactic sugar only, my language will be server-side compiled to regular CSS, so there's no need for special software on the client side.
My current ideas:
- Variables (actually, they're constants). You will be able to define colours and other things at the top (or anywhere) of the file and then refer to them from anywhere.
- Server-side includes. The @import statement does this as well, but it requires more HTTP requests. If CSS files are concatenated on the server, it's faster.
- Nested CSS blocks:
My code block:
#newsBlock {
background-color: red;
ul.items {
list-style: none;
li {
float: left;
}
}
}
Would be equivalent to normal CSS:
#newsBlock {
background-color: red;
}
#newsBlock ul.items {
list-style: none;
}
#newsBlock ul.items li {
float: left;
}
Comments and other suggestions?