- From: Matthew Brealey <webmaster@richinstyle.com>
- Date: Thu, 27 Apr 2000 13:52:12 -0700
- To: www-html@w3.org, www-style@w3.org
- Message-ID: <3908A87C.4AEE@richinstyle.com>
Nir Dagan wrote: > At 02:29 PM 2/22/00 -0500, Matthew Brealey wrote: > >Section 8.2.6 of HTML seems to me to be illogical, and doesn't seem to > >work with CSS' cascading rules. > ... > > > >When an inline element that does not have a dir attribute is transformed > >to the style of a block-level element by a style sheet, it inherits the > >dir attribute from its closest parent block element to define the base > >direction of the block. > > > >| This is not fine, because an inline element has [implied - these are the > >initial values] INLINE ELEMENT {display: inline; unicode-bidi: normal}. > >Specifying display: block according to the above results in inheritance of > >the dir attribute, which is equivalent to setting unicode-bidi: embed, so > >display: block also sets unicode-bidi: embed. > > The "trick" is that "unicode-bidi: embed" has the same semantics as > "unicode-bidi: normal" for an element with "display: block" > this is because Unicode doesn't embed blocks. > > The reason that CSS2 suggests that the default (informative?) HTML style sheet > have "unicode-bidi: embed" for blocks is to accommodate for the case where > a <p> for example is "converted" to "display: inline" in which case > the "Unicode-bidi" better be set to "embed". > > > > >This totally screws up the cascade. It appears to me that this section is > >a a hangover from the time when CSS didn't support bidi; but now it does > >it seems that this section is totally unnecessary and should be excised > >from HTML. > > > >In the mean time however, what effect does this bizarre 'display: block > >implies unicode-bidi: embed' (it's as absurd saying color: black implies > >background: white) have? For example, is this 'inheritance' forced or can > >it be overridden; e.g., does unicode-bidi: normal suppress it or not. > > It has no effect. Since for an element with "display: block" > "Unicode-bidi: embed" and "Unicode-bidi: normal" have identical > semantics. "Unicode-bidi: embed" is a "conditional style" that is > different from "normal" only when the element has "display: inline". I don't think this is right, given that the CSS specification includes the following normative statement: 'The following example shows an XML document with bidirectional text. It illustrates an important design principle: DTD designers should take bidi into account both in the language proper (elements and attributes) and in any accompanying style sheets. The style sheets should be designed so that bidi rules are separate from other style rules. The bidi rules should not be overridden by other style sheets so that the document language's or DTD's bidi behavior is preserved.' This necessarily implies that although the Unicode algorithm states that block-level elements should have behaviour equivalent to unicode-bidi: embed, the author is responsible for setting this. ------------------ Please visit http://RichInStyle.com. Featuring: MySite - offer your users customizable styles. AlwaysWork style - style sheets that always work. Browser bug table covering all of CSS2 with links to full descriptions. Lists of more than 1000 browser bugs, plus demonstrations of each. Websafe Colorizer - view all foreground colors with all backgrounds. CSS2, CSS1 and HTML4 tutorials. CSS masterclass - how to write better style sheets. CSS2 test suite with 5000++ tests and 300+ test pages.
Received on Thursday, 27 April 2000 08:47:40 UTC