Ask Håkon About CSS or...?
Back in 1994, while working for the World Wide Web Consortium (W3C), Håkon Wium Lie (pronounced more or less "how come") proposed the idea of Cascading Style Sheets (CSS). Got a CSS question? An Ajax question? Want to know why Håkon loves Free Software so much? Or something else, related or not? Go ahead and ask -- after checking some of the links above, so you don't duplicate questions he's answered in other interviews or in articles he's written. (One question per post, please.) We hope to post his answers Friday.
What prompted you to develop the idea of Cascading Style Sheets?
Ryan - http://www.thecosmotron.com/
Did you ever think CSS would take off like it has and what do you think is the biggest misuse of CSS today in your opinion?
___ Shout Central - Crushes your nuts!
Where is CSS going in the future? Expecting anything in particular for CSS4, or will we never reach it?
Opera 9.0 seems to offer a lot of decent additions to Opera's standards pool. How satisfied are you personally with the work the team has done on implementing standards, and is there anything in there you feel is superflous and anything you would have preferred to see which wasn't in there?
My 3D Texturing Skinning work (under construction)
Why was the decision made to make padding apply outside of the width of a 'box', rather than inside, which would seem to make more sense?
CSS is a great idea, separating content from everything else. My problem with it is that it's such a horrendous beast of a thing to implement. For instance, there's nothing really good for say, putting something into "the middle" from what I can find. Now if there is, fine, don't make this question about the example. There are literally hundreds of design decisions that feel like they were implemented in a way to just make things as difficult as they can be.
Why is CSS such a pain compared to other languages?
1.) What do you think of XSLT?
2.) Would it be crazy to have CSS incorporate data selection and assembly? (using something like XPath -- alowing more complete segration of data and formatting.)
On the topic of "misues of CSS", what's your take on the mess of CSS incompatibilities between Internet Explorer, Mozilla/Firefox, Opera, W3C standards, and the like? Do you have any choice words for any of the parties involved?
The World Wide Web is dying. Soon, we shall have only the Internet.
1. What would you most like to change with CSS? That is, if you could go back in time and change one thing in the spec and have it reflected today, what would be the most important thing? 2. If you were allowed (perhaps by court order, which wouldn't be unthinkable) to force Microsoft to do one (1) change in Internet Explorer, what would that be?
(For includes)(For aliases)This way we could change colors or images for a whole webpage by editing a reduced number of lines.
Had you considered any of these ideas in the past? If so, why were they rejected?
Is the wave of webpages designed completely in CSS what you intially intended when you came up with CSS? Do you see that changing? Is that good or bad?
Meet new people, and kill them.
Where do you think standards would be if Internet Explorer never was, or more the point: where would standards be if Microsoft actually tried to compete in an open market with Internet Explorer?
Good. Cheap. Fast. Pick Two.
Why did you forget to include the ability horizontally align multiple items?
It's the main thing that's missing from CSS. Was it too hard to implement or write syntax for?
I'm thinking something like:
horizontal-align-to: .
eg: horizontal-align-to: #box middle top; Will align the top of this element to the middle of #box.
The same for vertical align would be nice as well. For horizontal elements restrict it to elements within a parent (and allow ID's (or use class name) to be duplicated within different parents, to make repeating multiple rows easier). For vertical it must be set on a block level element.
Alternate syntax:
On the reference element: horizontal-align-to: #name_me position;
On the to be aligned one: horizontal-align-from: #his_name position;
So:
horizontal-align-to: #rowman top;
horizontal-align-from: #rowman middle;
Will align the middle of the element, to the top of rowman.
-Ariel
With MS's next browser release (IE 7), you mentioned in other interviews that their decision to not supprt CSS2 was more a political decision than a mechanical one. Aside from their obvious desire to dominate the world, what politics do you think are in play that make them not want to conform to the standard, and what do you think would change that landscape so that they would have some initiative to fully support it?
We're all hypocrites. We all have hidden parts, it's the contrast between them that make us more a hypocrite than others
Is the difficulty of producing a layout that consists of three or more columns of equal height justification for adding some new feature to the specification to make this easier?
In your work at Opera, you have clearly paved a path that includes going beyond the W3C standards. Whether it is WhatWG implementations, or new functionality specific to Opera (2dgame), you are pushing into new territory.
Can you explain why W3C isn't sufficient, and why efforts at Opera to expand beyond the standards differ from Microsoft's embrace/extend model?
GPL'd web-based tradewars themed space game
There's no diphtong, as in "how", and there's an "n", not an "m" at the end
Well, the latter is obvious. But you could make an argument for the "how" diphthong.
Most "å" letters in modern Scandinavian, including the one in Håkon/Håkan correspond to the "á" diphthong in Old Norse/Modern Icelandic. Which is pronounced as "au", just like "how". So the original (or Icelandic) pronunciation would indeed be more like that.
The diphthongs were lost from the rest of the Scandinavian languages somewhere around the 12th century. In a kind of odd twist, they were reintroduced into southern Swedish dialects later, making them actually sound a bit closer to the original in that respect.
A collection of pages of Why CSS:
6 .aspx
http://www.decloak.com/Dev/CSSTables/CSS_Tables_1
"I pretty much want to kick whoever invented CSS in the nuts."
Do you think that CSS is often misused? It seems to me that it is rarely used to define presentation in media other than the screen. As for my ideal stylesheet language... 1) Why must the layout be so linear? It seems to me that it would make more sense to have it operate closer to Autodesk Inventor, if you have ever used it, such that you set up whatever constraints (equal, parallel, etc) you see fit and the agent displaying the content finds a suitable solution. As an example, the login div must be equal width as the sidebar div, the sidebar div is at the left of the screen, the navbar is at the top of the screen and above the sidebar, and the content div is below the navbar and to the right of the sidebar. If everything is in a box, it would make sense to use other boxes as a reference point, rather than the screen. Pixels and percentages are nice and all, but not altogether natural. And pixels, while tempting, often don't cater to different resolutions. 2) Why would a spec for something that needs to be pixel-precise not come with an example implementation? 3) Shouldn't you be able to affect the document tree in a small way? If you are truly separating content and presentation, then why must I change the content to get the effect I want? I do this with XML + XSL + CSS, but just being able to add a div or image here and there would be nice...
"Strangers have the best candy" -Me
I have mod privs but no one else is asking this question, at least not in a respectful manner, so here goes:
I understand the impetus behind CSS, and think it has brought some nifty things to the Web, particularly in terms of integrating with the DOM and thus helping usher in all the AJAXy goodness we're seeing lately.
But CSS also seems to have spawned an anti-HTML jihad movement of people who rail against simple but effective HTML markup, including for example the B, I and FONT tags and the TABLE. Many people seem to make the principle of separating presentation from content a religious issue.
I learned HTML in 1994 by using the View Source command in Mosaic and Netscape (beta). The simplicity of the tags made it very easy. I could keep the basic structure of a doc in my head: "<html><head><title>Home Page</title></head><body><p>Hello, <b>world</b>!</body></html>"
For all the strenghts of CSS+XHTML, they are significantly more complicated to learn than basic HTML.
Do you worry that CSS is scaring off new Web writers, espeically since basic HTML is increasingly deprecated among Web developers?
Was there any usability testing with developers performed as part of the design process? If so, how did the testing guide development of the specification? One of the complaints often heard from both critics and fans is that CSS is very difficult to learn and read. In particular the complex rules governing the Cascade are often a source of problems for even experienced developers. Another instance is the often extreme difficulty and skill required to achieve layouts that were easy and common in pre-CSS days.
Do you think HTML 5 (from the WHAT WG) will have a better chance of being accepted by the browser vendors than XHTML 2.0 or whatever else comes from the W3C? (I suppose being accepted by the dominant IE would be the most important.) As a more general question, how can we best create new standards that allow backward and forward compatibility? It seems that current browsers handle current HTML versions as special cases, by looking at the HTML version string. It seems that this would break the ability for these browsers to treat HTML 5 as if it were HTML 4.
Software sucks. Open Source sucks less.
Why the curly brackets? Those things get on my damn nerves.
Slashdot Burying Stories About Slashdot Media Owned
if you have 2 elements, eg ol#a and span#b, you need to double your selectors: ... }
... } }
... ?
ol#a *:first-child a:hover + dd, span#b *:first-child a:hover + dd {
Why is there no 'grouping' of selectors such as:
ol#a, span#b { *:first-child a:hover + dd {
And of course, there are more possibilities to greatly improve the maintainability of CSS-files; being able to define variables, or inline-calculations (eg. border-width: @var - 0.5em;
Have they not been included to keep CSS simple, or
Should it be possible to freely mix inline and block elements? In particular, place block elements inside inline elements? Basic HTML says no. CSS2 is vague, especially considering that an element's block/inline property is variable. Most browsers seem to side with HTML. But, coming from the TeX world, where \hbox and \vbox can be freely mixed to achieve any layout you like, I can see no compelling reason for prohibiting it. HTML/CSS can come across as hopelessly broken when you know that something analogous has been done for ages, and practically perfectly, elsewhere. Is the problem here with CSS, HTML, the browsers, or me?
I doubt it
As you can see from this graph, it's one of the most common names in Norway. (numbers on the left in percent)
Scully: Should we arrest David Copperfield?
Mulder: Yes we should, but not for this.
The word pixel meant "picture element", but CSS redefined it to mean something quite different (a particular subtended angle of view). This causes confusion: CSS pixels are not pixels. (Indeed, I have seen misinformed comments on Slashdot due to that confusion.)
My question is this: why call the subtended angle a "pixel", instead of something else (e.g. "subangle")? If CSS wanted to use the subtended angle for something, that is fine, but calling it a pixel seems to follow the approach of Humpty Dumpty—"When I use a word, it means just what I choose it to mean".
Why isn't there any easy way to style a table column in CSS?
If you're serving legitimate, tabular data, and you want to right-align column #3 (normal for numerical data), you either have to apply a class to each cell, use javascript to apply it after the fact, or use hacks like:
Which work, but are difficult to maintain when you get 10+ columns, and don't try to automatically re-arrange columns with javascript.
Why can't we just place styles on a <col> or <colgroup>, and have it cascade down?
Build it, and they will come^Hplain.
How do you feel about SVG (as currently specified, not as a concept)? What problems do you think it has, and why do you think those problems came about? If some other group (like the WHAT WG) were to rewrite it, would you support that?
There are 11 types of people in the world: those who can count in binary, and those who can't.
The layout paradigm used by CSS (and HTML) is quite different. If you look at `desktop GUI toolkits` - ala GTK, Qt, or even Java's AWT/Swing, they have many different layout models - flow based, border based, spring based, grid based (those are Java). The layout techniques offered by CSS dont seem to fit into any of these well (if I were forced to pick one, I would say its most like the flow layout).
My question is: how does one replicate the flexible layout ideas using CSS? I cant seem to figure out a good way to create `scalable` pages with HTML and CSS without the use of hacks. It seems like the Safari developers are giving `scalable` layouts some thought (ref: http://webkit.opendarwin.org/blog/?p=55 and http://webkit.opendarwin.org/blog/?p=56). Em's and percents do make it work somewhat, but they dont cut it IMHO.
I understand that the popular use of bitmap (as opposed to vector based images) on the web is one of the primary reasons for non-scalable designs - but desktop applications with the flexible layout techniques seem to look much better on physically small screens with high resolutions.
I do like the direction SVG is going in, and hopefully IE will one day support.
My question has to deal with selectors: why doesn't CSS have a parent selector? All too often I find myself wanting to refer to a parent or a sibling of the current element but cannot (I'm sure there are a bevy of workarounds for individual cases...)
ie Why can't I do something like this to refer to a table row (given a structure of <tr><td><a>) a:hover:parent:parent { background-color: #cff; }? It's a simple example, but there really isn't a way to do this without involving a client-side scripting language.
Thanks for your consideration.
Was nesting ever considered? For example, instead of:
something like:
Also, do you think CSS3 is too complex? Some of it seems nearly impossible to correctly implement across browsers. Is there any consideration going in to the speed and complexity of rendering? I fear that CSS3 (and beyond) are beginning to play into the assumption that all computers will be Pentium 4's with 2 GB of RAM and plenty of clock cycles to spare.