- From: MURAKAMI Shinyu <murakami@antenna.co.jp>
- Date: Wed, 09 Jun 2010 02:54:37 +0900
- To: Hakon Wium Lie <howcome@opera.com>
- Cc: "Tab Atkins Jr." <jackalmage@gmail.com>, John Daggett <jdaggett@mozilla.com>, Boris Zbarsky <bzbarsky@mit.edu>, www-style list <www-style@w3.org>
Håkon Wium Lie <howcome@opera.com> wrote on 2010/06/08 16:16:02
> > - cannot write basic default stylesheet.
> > for example, in CSS2.1 Appendix D. Default style sheet for HTML 4:
> >
> > h1 { font-size: 2em; margin: .67em 0 }
> > h2 { font-size: 1.5em; margin: .75em 0 }
> > h3 { font-size: 1.17em; margin: .83em 0 }
> > h4, p, blockquote, ul, fieldset, form, ol, dl, dir,
> > menu { margin: 1.12em 0 }
> > blockquote { margin-left: 40px; margin-right: 40px }
> > ol, ul, dir,
> > menu, dd { margin-left: 40px }
>
> You can use 3) and 4) to write a default style sheet. E.g.:
>
> h1:lrt, h1:rtl { font-size: 2em; margin: .67em 0 }
> h1:ttb { font-size: 2em; margin: 0 .67em }
> dir:lrt horizontal writing is supported and @dir has been set to 'lrt'
> dir:rtl horizontal writing is supported and @dir has been set to 'rtl'
> dir:ttb vertial writing is supported and the initial value of
> 'writing-mode' is 'tb-rl'
See the following example:
table { writing-mode: lr-tb }
...
<h1>...</h1>
<table>
...
<h1>...</h1>
...
</table>
When the initial value of 'writing-mode' is 'tb-rl', the h1:ttb
{margin: 0 .67em} is used. It is ok for the first h1,
but the second h1 inside the table, same h1:ttb {margin: 0 .67em}
is used although the writing mode is changed.
The results will be miserable.
Another case, when the initial value of 'writing-mode' is 'lr-tb'
and {writing-mode: tb-rl} is specified in the author style sheet,
we expect :ttb { ... } of the default style sheet is enabled,
but the :ttb selector is not affected by the real writing-mode.
The results will be miserable too.
So we cannot write a default style sheet without logical properties.
--
村上 真雄 (MURAKAMI Shinyu)
http://twitter.com/MurakamiShinyu
Antenna House Formatter:
http://www.antenna.co.jp/AHF/
http://www.antennahouse.com
Received on Tuesday, 8 June 2010 17:55:22 UTC