Page 1 of 1
CSS Wishlist
Posted: Sat Oct 21, 2006 2:36 pm
by Chris Corbyn
Just thinking of CSS and some drawbacks I often think about. Apart from the obvious things like all browsers sticking to standards what would you like to see available in CSS in the future?
Maybe the things I think of are already available and I don't know about it so if they are I'd love to know
Two major things I think about are:
Class inheritance
Rather than specifying a whitespace separated list of classes in the class attrribute to allow an element to take the properties of two different classes, allow it to be done in the stylesheet.
e.g.
Rather than:
Code: Select all
<style type="text/css">
.one {
width: 100%;
}
.two {
background: #eeee88 url(myimage.png) repeat-x;
}
</style>
<div class="one two">
..
</div>
Allow:
Code: Select all
<style type="text/css">
.one {
width: 100%;
}
.two extends .one {
background: #eeee88 url(myimage.png) repeat-x;
}
</style>
<div class="two">
..
</div>
Ability to perform mathematics the browser already clearly does itself
Code: Select all
<style type="text/css">
.example {
width: math(100% - 200px);
}
</style>
<div class="example">
..
</div>
Vertical text for table headings (Internet explorer has this)
(No example needed)
Posted: Sat Oct 21, 2006 2:51 pm
by feyd
- (quality) rounded corners (CSS 3)
- unified opacity (CSS 3, I believe)
- percentage height
- the standards board release a fully compliant API that can both parse arbitrary strings of style information and have interfaces to help browsers correctly render how they're supposed to
- (better) expression support
Posted: Sun Oct 22, 2006 11:35 am
by Maugrim_The_Reaper
More intuitive positioning - I know standard CSS when adhered to by browsers works, but it's spread across too many styles. A little unification would do no harm.
Posted: Mon Oct 23, 2006 2:46 am
by CoderGoblin
Newspaper columns (CSS3 although I would also like the ability to define the ability to keep text together in a paragraph and set widow and orphan levels).
Every browser to follow the same standard.

Posted: Mon Oct 23, 2006 3:02 am
by nickvd
Variables...
Think about changing the colours of your site by editing 5 variables at the top of the stylesheet, or being able to seperate them into their own file and changing them by including the appropriate "theme" file...
Posted: Mon Oct 23, 2006 3:33 am
by onion2k
Scrap it and use LaTeX/PostScript instead.
Posted: Mon Oct 23, 2006 5:34 am
by Chris Corbyn
nickvd wrote:Variables...
Think about changing the colours of your site by editing 5 variables at the top of the stylesheet, or being able to seperate them into their own file and changing them by including the appropriate "theme" file...
You could manipulate class inheritance that way. Place the colors you need in some base class and have all the classes which use that scheme extend it.
Posted: Mon Oct 23, 2006 6:19 am
by onion2k
d11wtq wrote:You could manipulate class inheritance that way. Place the colors you need in some base class and have all the classes which use that scheme extend it.
What advantage does class inheritance have over using two classes? I can't see it. Besides a small reduction in the amount of code I see no advantage of inheriting in the stylesheet over 'inheriting' using two classes on one element.
Posted: Mon Oct 23, 2006 6:27 am
by Chris Corbyn
onion2k wrote:d11wtq wrote:You could manipulate class inheritance that way. Place the colors you need in some base class and have all the classes which use that scheme extend it.
What advantage does class inheritance have over using two classes? I can't see it. Besides a small reduction in the amount of code I see no advantage of inheriting in the stylesheet over 'inheriting' using two classes on one element.
It just means that currently you have to use more markup and more repitition to acheive the same task. Just my personal wishlist item

Posted: Mon Oct 23, 2006 11:29 am
by RobertGonzalez
nickvd wrote:Variables...
Think about changing the colours of your site by editing 5 variables at the top of the stylesheet, or being able to seperate them into their own file and changing them by including the appropriate "theme" file...
This is doable now, you just have to use two different stylesheets (actually, you can get away with one, but separating the layout from the colors has its advantages). Basically you set your layout scheme, then include another stylesheet with the colors for each element you want to color.
Posted: Mon Oct 23, 2006 11:38 am
by nickvd
Everah wrote:nickvd wrote:Variables...
Think about changing the colours of your site by editing 5 variables at the top of the stylesheet, or being able to seperate them into their own file and changing them by including the appropriate "theme" file...
This is doable now, you just have to use two different stylesheets (actually, you can get away with one, but separating the layout from the colors has its advantages). Basically you set your layout scheme, then include another stylesheet with the colors for each element you want to color.
But if you're using the same 4 or 5 colours in say, 20 locations throughout a 30kb stylesheet, changing the colours at the top will change all occurences. Yeah, there's find/replace, but this is neater, and can be used for width, height, font's etc... I think it could be very very useful..
Posted: Mon Oct 23, 2006 11:56 am
by hawleyjr
You can also have your .css file be a php file and set the colors via php...
