W3C home > Mailing lists > Public > public-html@w3.org > February 2009

Re: Default (informal) Style Sheet

From: Ian Hickson <ian@hixie.ch>
Date: Tue, 10 Feb 2009 10:52:32 +0000 (UTC)
To: public-html@w3.org
Cc: whatwg@whatwg.org
Message-ID: <Pine.LNX.4.62.0902101040270.28232@hixie.dreamhostps.com>
On Sun, 1 Apr 2007, Kempen, E.J.F. van wrote:
> >
> > [mailto:whatwg-bounces@lists.whatwg.org] On Behalf Of Asbjørn Ulsberg
> >
> > While HTML is a semantic markup language, it's not something to ignore 
> > that it's mostly used for visual rendering of content, often 
> > accompanied by a CSS document. While I'm a strong believer of 
> > separation between structure (HTML), presentation (CSS) and 
> > functionality (JavaScript), I think it could be useful for the HTML 
> > specification to -- within limits -- define how each and every 
> > element's default CSS properties and values should be like.
> 
> I totally agree with you at the point of the importance of layer 
> separation, but I'm not sure about specifying the default CSS values. 
> There are a few options:
> 
> * let the CSS be built from scratch *
> No styles are defined, so by default the CSS values are empty. I don't 
> think this a good option, because people won't define their styles from 
> scratch, resulting in vendors still needing to define default styles. So 
> that's no solution.
> 
> * Vendors keep defining the default values for every element *
> If a web developer disagrees with the vendors, he will just define it in 
> his CSS.
> 
> * the HTML WG defines default values for every element *
> This can be a solution for HTML as web representation. Defining defaults 
> can result in vendors implementing the same defaults, so it looks the 
> same in every browser by default. I think it's good to think about these 
> things, but I wonder if it would change anything.
> 
> What exactly are you looking for? Defining that 'normal' text is black 
> by default and links are blue-ish? Because that's done already, most 
> default styles are uniformly, but maybe informally, defined. As the new 
> HTML spec is gradually being developed, a new document could be written 
> about default styles, but I don't think this should be in the new HTML 
> spec. I personally think such a complementary document, about the 
> default styles, is a good idea. These issues should certainly be 
> addressed in cooperation with the CSS WG.

The rendering section now does a mixture of the above.


On Sun, 1 Apr 2007, Martin Atkins wrote:
> 
> One example that springs to mind is that the default CSS rules for 
> unordered and ordered lists differ between browsers. Some implement the 
> bullets with padding and list-style, while others use margins and 
> god-knows-what. I can't really remember anymore. I've just learned that 
> the way to get rid of the bullets across all popular browsers is:
> 
> ul, ul li {
> margin: 0;
> padding: 0;
> list-style: none;
> }
> 
> If you don't set both margin and padding, you'll see inconsistent 
> results.

The spec now picks one.


On Mon, 2 Apr 2007, Asbjørn Ulsberg wrote:
> 
> With CSS2.1, how would you style the button you get from an <input 
> type="file"> for instance?

<input type=file> is a special case, due to the security aspects.

In general, though, XBL is the only way to get to the bits of a widget, 
and that isn't implemented yet.


> > I personally think such a complementary document, about the default 
> > styles, is a good idea. These issues should certainly be addressed in 
> > cooperation with the CSS WG.
> > 
> > Any other thoughts?
> 
> If the HTML spec is going to contain informal fragments of Relax-NG, I 
> believe there's a place for informal fragments of CSS as well.

It isn't going to have the former. :-) The latter aren't really informal, 
they're a kind of half-way-required level.


On Sun, 1 Apr 2007, Sander Tekelenburg wrote:
> >
> > http://www.whatwg.org/specs/web-apps/current-work/#rendering
> 
> That saying "when scrolling a page to a fragment identifier, align the 
> top of the viewport with the target element's top border edge", seems to 
> emphasize my argument. This is a silly requirement.

This is now gone.


On Mon, 2 Apr 2007, Asbjørn Ulsberg wrote:
> 
> Speaking of <hr>, having a default style for it would increase 
> interoperability (if only in the presentation layer) a great deal. 

Done.


This thread discussed a number of philosophical topics and it wasn't clear 
what a lot of it translated to, in terms of practical changes to the spec. 
I didn't reply to those bits. Please let me know if I missed some 
important feedback that should affect the spec.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Tuesday, 10 February 2009 10:53:08 UTC

This archive was generated by hypermail 2.3.1 : Monday, 29 September 2014 09:39:01 UTC