W3C home > Mailing lists > Public > www-style@w3.org > October 2010

Re: [css3-writing-modes] a third option for implementing logical properties

From: David Hyatt <hyatt@apple.com>
Date: Sun, 24 Oct 2010 17:04:49 -0500
Cc: John Daggett <jdaggett@mozilla.com>, "L. David Baron" <dbaron@dbaron.org>, www-style@w3.org
Message-id: <23A7784F-9722-49F4-9D41-2534D80F4127@apple.com>
To: Håkon Wium Lie <howcome@opera.com>
On Oct 24, 2010, at 12:14 PM, Håkon Wium Lie wrote:

> 
> We'd end up with very many properties, though. And long discussions
> about which properties/values to duplicate: background-position?
> caption-side? clear? float? text-align? vertical-align? top? right?
> bottom? left?
> 
> I would favor solution that doesn't incread the number of property in
> the hundreds.

What about allowing named sub-blocks within a declaration block?  Then everything could cascade properly.  Maybe via a new @-rule.

@writing-mode p {
	horizontal {
		margin: 1em 0;
	}
	vertical {
		margin: 0 1em;
	}
}

In other words

@writing-mode <selector> {
	<decls that apply to all directions>
	
	and then blocks of "horizontal", "vertical", or fully-qualified, e.g., "horizontal-tb", "vertical-rl", etc.
}

This sort of solution would be able to cascade properly, e.g., you'd resolve your writing-mode and then be able to resolve other properties using the contents of matching sub-blocks.

If the writing-mode is going to be specified in CSS, you need a solution similar to the one above in order to have the styles resolved on the element itself.  A pseudo-element solution just isn't going to cut it.  I'd rather have no logical properties at all than have to implement a pseudo-element solution.

As for UA defaults, I think some good points were made that arguably the current UA defaults don't even apply well to Japanese horizontal text right now.  They're already somewhat language-biased, and the defaults for rotated English paragraphs should obviously continue to use the same margins.

I understand the desire to avoid an explosion of properties though.  I think the best way to do that is with a solution that can be used in the same rules and part of the same cascade (declared together like in the sub-blocks above).

dave
(hyatt@apple.com)
Received on Sunday, 24 October 2010 22:05:24 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:33 GMT