Greetings all,
Several times lately, while reviewing various parts of CSS, I have
found myself saying "why does it work like this?" There are several
things that seem overly complex, or things that seem obvious to me
but aren't there. I'm new at this, and the guys at the W3C are very
smart, so I'm sure there's a reason--I would just like to know what
it is. Anyone have any thoughts?
Three things in particular:
1) For absolute positioning, wouldn't it make sense to allow the
author to specify the containing element/(positioning context)
directly in the CSS? Something like this:
/* Put the navbar near the top left corner, keep it fixed as
you scroll */
#navbar { position: 1em auto auto 1em viewport fixed; }
/* Put a dropshadow on the image (actually, it would be easier
to have an actual CSS keyword for dropshadows, but you get the idea */
#dropshadow { position: 5px 5px auto auto #image; }
2) A way to express units using mixed-unit expressions. For example,
maybe you want to have a menu where the individual items are indented
from their headings by 2em, and the menu has a 1px border around it.
When you hover over it, you would like the border to "thicken up" and
turn red, but you don't want the text to jump around. No problem:
#nav a {
padding-left: 1em;
border-left: 1px solid black;
}
#nav a {
padding-left: 1em - 4px;
border-left: 5px solid red;
}
In some cases, you could have problems with these expressions coming
out negative...although font size is the only one I can think of
offhand. The simple way to handle it is that, for the places where
it could be an issue, it clips to 1.
3) Some way to do columns straightforwardly:
div { display: column; }
div#first, div#last { width: 10%; }
<div id="first">
I will be 10% of the width of my parent element (probably
the <body>)
</div>
<div>
I will be 80% of the width of my parent element (probably
the <body>)
</div>
<div id="last">
I will be 10% of the width of my parent element (probably
the <body>)
</div>
--Dks
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/