W3C home > Mailing lists > Public > www-html@w3.org > February 2004

Re: 'style' attribute

From: Orion Adrian <oadrian@hotmail.com>
Date: Mon, 23 Feb 2004 00:30:03 -0500
To: www-html@w3.org
Cc: netdemonz@yahoo.com
Message-ID: <BAY1-F131INd7mE4DXO000051a9@hotmail.com>

>I wish there were an element.ComputedCSSStyle, or something so you didn't 
>have
>to use the central style information.
>

Is it your intention that the ComputedCSSStyle construct would include all 
the various properties associated with an element given it's current 
context?  If I remember correctly, IE 6 has something similar to this called 
RuntimeStyle.

> > specifically the cascading part, it is impossible to retreive the styles
> > associated for an object (text, images, etc.) simply by grabbing the 
>style
> > attribute alone.  At best you might get some styling information, but in 
>no
> > way are you garunteed to be getting the entire set of styling key/value
> > pairs.  On a second note, using only style attributes and not central
> > styling information located in the style element or remote style sheets 
>is
> > not an option.
>
>I'm not sure if you talked about another problem I have seen, but it seems 
>you
>did. There is no inheritance when it comes to the generated CSS values when 
>it
>applies to documents.
>
>For instance (sample stylesheet):
>
>a {text-decoration: none;}
>a:hover {text-decoration: underline;}
>
>First a:
><a class="a">
>Second a:
><a class="a">
>
>I'd like it if there were to make it so that when you hover over the first 
>a,
>the second a is highlighted. As of yet, the only way that I know to do this 
>is
>to use javascript. Perhaps a new property could be defined like 
>inheritedclass?
>

I do believe you can do what you're trying to do with CSS2 selectors, 
specifically the direct sibbling selector '+'.

>A couple huge nitpicks about CSS and HTML:
>
>The biggest problem I have with CSS is that the designers assumed that all
>pages should not be fixed in size and that the layout of the page would be 
>a
>simple text-document like flow. This limited designers because there are 
>times
>where pages are not really documents but just pages containing lots of
>pictures, etc, that the authors do not want scaled.
>

First off flow and scale are different.  Also while I consider don't 
consider the "feature" of having all pages non-fixed in size a good thing I 
do feel that HTML and CSS do not properly deal with different types of media 
and different sized screens.  They have made a good start, but it is still 
lacking.  Unfortunately given Microsoft's slow progress with IE advances to 
CSS and HTML will take some time to get to the general public.

>The other big problem I have with stylesheets is that some things, like 
>using
>tables for layout, is just way harder with CSS than HTML, and tables for 
>layout
>cannot even fully be replaced with CSS and float just doesn't do the trick.
>

CSS2 does address many of these issues.

>Personally, I think that CSS is a broken standard. A lot of this can be 
>blamed
>on the slow adoption by Microsoft. The other issue is that CSS seems to be
>incredibly difficult for doing fixed layout and a lot of other things that
>developers expected with HTML. The suggestion that people should use Flash 
>when
>they want a page to look to their users like they need it to! There are 
>some
>cases where if a developer can not force a certain width, look, etc on the
>user, they could risk the user getting annoyed or at worse suing them! If 
>you
>were making a powerpoint presentation, would you want it to look 
>differently to
>everyone in the audience? I understand with web-based documents you want it 
>to
>be catered to the particular screen resolution, etc... That is not the 
>entire
>web, though!
>

Fixed layouts have their own problems and while designers tend to like them 
usability studies have shown that they actually hurt users, not help them.  
Flow layouts and writing for structure and content first and then applying 
style usually is a better approach.  Unfortunately graphic designers rarely 
think this way.  People who are visual tend to think visually seeing the end 
result and want to just write the end result.  Now which approach should be 
available to the designers is a philosophical decision.  Personally I feel 
that in the future tools should try to alleviate the burdon on designers as 
much as possible extracting structure for them.  Tools should exist that 
allow you to "draw" the page you want and the program should do the rest.

My personal gripe with HTML is that it assumes that you want things a page 
at a time.  Metaphor is nice when you have nothing better, but all HTML has 
allowed us to do is take pages and link them together.  That's the major 
advancement of HTML and that's all it's really done for data management and 
searching.  I think the advancement that has to come next is the ability to 
look at data outside of the page metaphor.  I'll post this in a bit in a 
seperate thread.

>My suggestion:
>
>We have Microsoft to thank for CSS being broken because they have not 
>adopted
>the standard fast enough to test it. Heck, you cannot even do min-width in 
>IE
>for Windows on a Web page. What's done is done, though.
>
>Therefore, I propose taking what we know about what worked and what doesn't 
>in
>CSS and starting from scratch with a new style standard. I'd say it would 
>be
>good to have it offered alongside CSS, but that would bloat current 
>browsers.
>
>Therefore... You need to really get the web community involved in a 
>large-scale
>discussion that is organized (perhaps broken down by CSS component) about 
>what
>the plusses and minusses are for each aspect of CSS. I do not think that 
>W3C
>has heard nor can remember every complaint people have about CSS.
>
>You also need more community involvement in the drafting of these 
>standards,
>and more feedback methods in other means than on mailing lists. Why doesn't 
>W3C
>have a PHP message board and a Bugzilla? Mailing lists are just not the 
>best
>place for all forms of conversations.
>

Given that Microsoft hasn't adopted CSS it is unlikely they will adopt its 
replacement.  Microsoft has its own views of proprietary languages as 
replacements for HTML and CSS (see XAML).  While rethinking CSS may or may 
not be a good idea, replacing it because Microsoft hasn't adopted it isn't a 
good idea in my opinion.

Orion Adrian

_________________________________________________________________
Dream of owning a home? Find out how in the First-time Home Buying Guide. 
http://special.msn.com/home/firsthome.armx
Received on Monday, 23 February 2004 00:30:05 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 5 February 2014 07:19:04 UTC