CSS is moribund
By glazou on Friday 19 November 2004, 11:20 - Standards - Permalink
Chris Lilley, who I have immense respect for, explains why and why SVG using CSS was probably a mistake.
By glazou on Friday 19 November 2004, 11:20 - Standards - Permalink
Chris Lilley, who I have immense respect for, explains why and why SVG using CSS was probably a mistake.
Comments
C'est clair, dommage que ce ne soit pas du XML. Mais pour moi, l'avantage d'utiliser CSS dans SVG, c'est pour styler en une seule fois du contenu mixe HTML/SVG.
Sinon, ou serait la difficulte pour transformer la syntaxe CSS actuelle en sytaxe XML ?
What makes me anxious is his assertion that we're *nowhere* near completion of CSS3. I mean, most critical modules have been CR'd for a while, and I would expect they be REC'd anytime soon! Of course, numerous aspects have trod in the swamps of WD for ages (just look at CSS3 Columns, for crying out loud), but there are signs of progress. CSS3 Selectors was just REC'd.
So yeah, ok, many modules are scheduled for REC in '05 or even '06. Still, I want to believe sorely lacking possibilities in CSS 2.1 ARE going to be addressed for real and REC'd. SOON.
Let me hope!
Obi: Les hacks pour corriger MSIE ?
I'll let you in on a little secret CSS implementors obviously have no idea on:
Programmers don't write CSS, designers do. That's how corporations work. Designers implement the design. Programmers implement the backend. Programmers insert their content into the design. That's about as much interaction with the design as most have.
HTML was easy. So designers picked it up. Very intuitive, and instant gratification.
CSS on the other hand is anti-intuitive. It's for true geeks. Not designers.
Want to make something that people will actually make good use of? Remember that. CSS is for programmers. Programmers don't build websites. Designers do. Designers want instant gratification, and don't want to learn tough things like CSS.
Designers don't want to spend time figuring out why a 2 column liquid layout with a height of 100% is a pain in the @$$. They want instant. a <table><tr><td></td><td></td></tr></table> does that instantly, no questions.
Want to revolutoinize the web? Figure out how to make CSS easy. CSS at this point will never be fully adopted. Simply because the people who ultimately have to use it: can't.
It's that simple. Know your audience!
CSS with an XML syntax? *shudder*
Well, I'm pretty sure most people here already looked at MathML code, didn't you? Do you really want CSS to look like this?
Oh please, CSS should be readable. The CSS-parsing work should be left to the computer, not to the user.
I'd vote for leaving CSS non-XML like. Robert is right - designers use CSS. Someone there is specific person who binds backend code with layout writing HTML/CSS, but in most cases, designer writes CSS.
And asking him to write something CSS in XML is very sadistic.
CSS = attributtes and values for Markups.
CSS must be outside of any markup.
If not, then result is : CSS is CSSable => facit / Squental-Circuit.
One language to rule them all, makes sense.
Especially when reading this bilingual blog and having no idea what the French text are all about. And it looks like I am missing out on something.
For example,
'Notes pour les francophones : merci'
Without a translator, I guess this means Note to the french-speaking audience, Thank you for something... something...
I prefer one language, it looks ugly, but it might cut down on the learning curve. Plus, I am thinking about the tower of babel - you know, the importance of understanding each other.
Anyways, Take for example jsp tags, which are now xml-based.
On the other hand, if I am correct, I believe that James Clark, who author the XML spec or something, proposed a mechanism to describe XML documents using regular expressions which is in opposition to the XML Schema the w3 propose or something, which uses XML instead of that weird DTD notation (BNF?) thing.
I wonder if x-m-lizing regular expressions might be next.
"don't want to learn tough things like CSS."
I assume you mean to do layout. Because CSS (2.x) just makes that _way_ harder than it should be (and in some case, it's just flat out impossible to do the things you can do with tables). It should be possible to code this:
<div id="a"> <div>x</div><div>y</div><div>z</div> </div>
and then say
#a {
layout: left-to-right;
child-height: equal;
}
#a > * {
width: 1flex;
}
and you've now got intuitive table-like layout, with these advantages: you can use more semantic tags than 'div', or you can rearrange the divs, change layout to be vertical, pick out individual divs for odd styling, etc. I believe using CSS for layout *could* be a thing of beauty, but I've no idea if it's practical (because of implementation difficulties, graceful degradation in older clients, etc.) As it stands, doing layout is abysmal for all but floating the odd box here and there --- unless you want to spend forever specifying pixel accurate layout (which is bad design, anyway).
OTOH, if you mean that the CSS concept (i.e. cascading style sheets) is altogether too difficult for designers, then I will say something the likes of which I have never said before about any group of users: they should either be willing to overcome that difficulty, or stick to print layouts. CSS is not (and hopefully never will be) about deadly accurate layouts, and concerns about how _particular_ page elements will look. It *is* about giving your pages/webapp a very particular look (possibly catered to particular audiences, etc.) I'm sure it's well know why this goal is important. And I cannot think of a simpler way to reach that goal than with CSS/stylesheets. (I might be happy with an XML-based stylesheet syntax, but it should be functionally equivalent to CSS and be as syntactically concise.)
Robert says that designers can't use CSS because it's too complex, it's just for geeks. But amongst those designers who can't comprehend CSS how many actually write HTML code? Tables aren't simpler than absolutely positioned elements. If you are geek enough to write HTML code by hand, you surely can master CSS too.
I don't think it's the design that lead to a marginal adoption of CSS, but rather:
- The browser implementations that came too late or incomplete
- The lack of a good editor (thanks Daniel!)
- The lack of initiatives such as the CSS Zen Garden (www.csszengarden.com/) to introduce designers to the beauty of CSS design.
Pierre : Robert is right.
And designers don't write HTML, they use Dreamweaver to produce it. They hate to write HTML (note : programmers also hate to write HTML because it is considered as sub-par programming)
But corporations slowly begin to ask CSSized HTML (probably more because it is fashionable than for true technical reasons)... so designers are slowly begining to learn it (but they hate that).
TDD: CSS3 Selectors is not a REC www.w3.org/Style/CSS/curr...
And speaking of this.
If i dared, i would add that i tend to think that HTML ans CSS have reached a level of maturity and functionnality that make further enhancements quite useless. Everybody is happy with what we have now.
If you consider HTTP, nothing has changed since HTTP/1.1. HTTP-NG and friends are just dead.
Right now, it's just a very common tool to deliver services. It filled a miss. But now it's ok.
Some designers do write html.... because html is logical and easy to do. A simple course is really all that's necessary. It's not a very complex markup.
Again. It takes a designer a minute to create a 1, 2, 3 column fluid layout that works in all browsers using a table. Now how about CSS?
CSS was designed for programming oriented people. Fact is that programmers don't make websites. They make backends. Designers make websites.
When designing the CSS specs, they made a mistake. IMHO it's time to start looking to correct it, if you want the glory of CSS to take effect.
*Simple* ways to do things.
From a designer point of view:
Why can't I make a simple 3 column layout?
Why is it making 1 column fluid, and 1 static so difficult?
Why is my content overlapping my footer?
Why is my image on top of the content, rather than embeded in the content <div />?
Really, the best language would be like the following:
1. HTML strict like "html" page.
2. Layout goes in another file. Markup as simple as tables. Perhaps even with tables, and embedding selectors within it. ie <table><tr><td>#nav</td><td>#content</td></tr></table>.
3. Design in a 3rd CSS1 like language for things like text, color, background, etc.
That's the only way this will catch on. Need to break things up, so it goes with workflow of web development. Programmers work on the HTML layer, designers on the layout level, design itself varries (often the last stage of development).
This would like css still be able to switch styles, etc. You still separate content from layout/design.
But by using a <table /> like layout scheme, it's logical and easy to use. People would actually "get" it.
CSS sucks at layout. That's the bottom line.
Now when you ask a corporation: Do you want to spend more time and effort to use something that designers (who can be very expensive) will struggle and take longer with? Or use crummyy html.
Guess what they decide?
THAT is why the web is the way it is.
CSS in it's current state is a great geeky dream and theory. But it's going to have a hard time penetrating the corporation. Simply because the cost outweighs the benefit. And they already have something that works.
I think my second point was overlooked - that CSS would have been adopted by a much larger number of designers if an editor had been made available way earlier.
Otherwise I agree that the "Cascading Style Sheets" were primarily designed to address styling issues, not layout issues. There isn't much point to cascade layout properties anyhow.
Maybe we needed 3 languages: one for markup, one for layout, one for styling. Yippee Kai Yay.
The CSS working group recognizes that CSS has no good mechanism for doing page layout yet. But, Robert, using CSS to style the fonts and colors and borders and backgrounds of a page is *much* *much* easier than doing it with <font> and <table background="..."> et al. There's nothing majorly wrong with CSS as a styling language. It does not need to be redesigned. It just needs a good way of expressing basic layout.
fantasi: I agree it's great for fonts... but that's about it.
The layout concept in CSS is fudimentally flawed. It's not that the implementation is *bad*, but that it doesn't work for the target audience. Even if CSS2+3 are fully implemented flawlessly... it's still not going to take off.
Simply because it's not intuitive.
Again, tables were a great concept. They were simple to understand, and manipulate. Easy to work with, and adjust. That's why designers got very into web development. It became more than a geeky thing to do.
With CSS, designers don't want to deal with that. To abstract, and strange.
If the CSS WG wants to create something that will be adopted:
1. Leave CSS to *style* (color, font, etc).
2. Come up with CLS (Cascading Layout Sheet). Could be as simple as a templating system (such as I mentioned above, using tables with selectors showing where content goes i.e. <table><tr><td>#nav</td><td>#content</td></tr></table>. ).
The CSS WG needs to realize their target audience isn't developers or programmers. They create specs used by designers.