W3C home > Mailing lists > Public > www-svg@w3.org > October 2008

Re: [1.2T-LC] Inheritance of display-align

From: Erik Dahlström <ed@opera.com>
Date: Thu, 30 Oct 2008 11:01:13 +0100
To: fantasai <fantasai.lists@inkedblade.net>
Cc: www-style@w3.org, www-svg <www-svg@w3.org>
Message-ID: <op.ujt0sbuygqiacl@gnorps.linkoping.osa>

On Wed, 29 Oct 2008 19:19:44 +0100, fantasai <fantasai.lists@inkedblade.net> wrote:

> Erik Dahlström wrote:
>> On Tue, 28 Oct 2008 21:29:56 +0100, fantasai <fantasai.lists@inkedblade.net> wrote:
>>> Hello SVGWG,
>>> Wrt http://www.w3.org/TR/SVGMobile12/text.html#DisplayAlignProperty
>>> The CSS Working Group has been discussing a property that does exactly
>>> what's described in the SVG draft here (and also has an 'auto' initial
>>> value), but we would need the property to not inherit.
>> It is useful for it to inherit in certain scenarios, such as when you have
>> a number of 'textArea' elements that you want to have the same alignment
>> on. This may be more of a problem for SVG 1.2 Tiny since it doesn't mandate
>> support for CSS stylesheets and CSS selectors.
> I see what you mean. You want to set it on the container and have all the
> child textArea elements to inherit that setting.
> In CSS we often have nested blocks, so the inheritance would really become
> a problem. Setting the alignment on an element would inherit through the
> entire tree. I'm guessing you aren't seeing this problem because textArea
> elements directly contain only text.

A textArea may contain other elements as well as text, but the textArea element cannot be nested[1].

I would personally not mind so much if the property didn't inherit, since usually there are only few textArea elements in svg content and it would be a small pain to duplicate attributes if necessary. If the CSS use-cases were satisfied by using the same property that would obviously be a good thing. To me this is only a question of what is most intuitive to authors, and what's the most common scenario in which the property is used. I'd prefer to make it easy for the most common use-case(s).

This would need some discussion in the SVG WG.

>> Please elaborate on why the CSSWG thinks the property should not inherit.
> If you're aligning the contents of a box to the bottom, you rarely want
> that alignment to nest. (Not inheriting is also consistent with the way
> 'vertical-align' works on table cells.)

Right, and this isn't a problem for SVG (yet) since textAreas are not nestable in SVG 1.2 Tiny.

> For another thing, the values other than 'auto' have, in CSS, the side
> effect of turning the block into a block formatting context. (This affects
> float containment, margin collapsing, and other things.) This side effect
> would then inherit through the entire element.
> Imagine, for instance, that I have a page layout with several component
> boxes and I want the contents of one box to align to the bottom. Inheriting
> the alignment property would cause all of its contents to have strange
> behavior, turning all boxes into block formatting contexts and causing the
> contents of any descendant boxes to also bottom-align.

Ok, I understand what you mean.

>>> Also, we've heard feedback that "before" and "after" are easily confused
>>> with "start" and "end". Not sure what to do about that.
>>> The CSSWG hasn't discussed SVG's display-align yet (I only just noticed
>>> its existence on my way home from TPAC), but I think it would be a good
>>> idea for us to do a little coordination here.
>> Coordination sounds good to me, although the SVG WG hasn't discussed it
>> either yet.
> So.. how'd it get into SVG 1.2 Tiny? :)

Sorry, the smiley must have fallen off or something, I only meant that the SVG WG hasn't yet discussed coordination with CSS ;)

>> Just curious, what CSS module wants to include this functionality?
> CSS3 Box Module is the current top candidate. There's a sketch of a property
> based on our discussions in Bert's draft:
>    http://www.w3.org/Style/Group/css3-src/css3-box/#the-child-align

What's the publication schedule for that?


[1] http://www.w3.org/TR/SVGMobile12/elementTable.html

Erik Dahlstrom, Core Technology Developer, Opera Software
Co-Chair, W3C SVG Working Group
Personal blog: http://my.opera.com/macdev_ed
Received on Thursday, 30 October 2008 10:00:07 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:54:20 UTC