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?
You can sign up for the W3C's style list and search the archives or ask
them there; they are busy, so be respectful and search the archives
first. Start here: http://www.w3.org/Style/CSS/
Since many people on this list are learning CSS, people often express
their wish-list. But this list's mission is practical application of
CSS, and so I advise you (and others) interested in the theory and
development of CSS as a language to go to the W3C site. As the CSS3
modules solidify and get implemented, you will surely hear about using
them here first.
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; }
Say you created a page and laid it out with your first example. This
page gets archived, and 10 year from now re-displayed as a portion of a
larger XHTML2 page. Your viewport position would not display the way
you intended. Or someone makes an anonymizer that nests pages. Or a
cellphone rearranges your page by wrapping it in a container to help
people navigate. All of these are possible because XML is nestable
without changing your document's meaning. But your style wouldn't
accept that. Since CSS is being developed to apply to XHTML, rules must
work for all of XHTML's abilities.
Your second example is easier: where does it get positioned in
documents that do not have an element with an id of "image"? (For the
particular use of a drop-shadow, see the CSS3 proposals for drop
shadows[1], or multiple-image backgrounds[2].) The solution to this
type of need is proposed in CSS3, such that you can move content from
one area of a page to another, essentially changing the structure of
the page. See the generated and replaced content module.[3]
2) A way to express units using mixed-unit expressions.
...
#nav a {
padding-left: 1em - 4px;
border-left: 5px solid red;
}
This occasionally gets discussed on the W3 style list. Join up. Simple
calculations of mixed units are being toyed with, but I do not think
there is a concrete proposal. More complex expressions often get
suggested, but as this strays toward scripting languages it is often
disregarded.
3) Some way to do columns straightforwardly:
A current working draft.[4]
-------------
1. http://www.w3.org/TR/2005/WD-css3-background-20050216/#box-shadow
2. http://www.w3.org/TR/2005/WD-css3-background-20050216/#layering
3. http://www.w3.org/TR/2003/WD-css3-content-20030514
4. http://www.w3.org/TR/2001/WD-css3-multicol-20010118/
--
Ben Curtis : webwright
bivia : a personal web studio
http://www.bivia.com
v: (818) 507-6613
______________________________________________________________________
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/