W3C home > Mailing lists > Public > www-style@w3.org > February 2014

Re: [css] about vertical-align on display:block elements.

From: Andrew Fedoniouk <news@terrainformatica.com>
Date: Sat, 1 Feb 2014 16:16:14 -0800
Message-ID: <CALRQH7_k1ezwNmaK6U8Kb2AuovLAPgz1rDSJEDP2w0-gQGnN1A@mail.gmail.com>
To: Simon Sapin <simon.sapin@exyr.org>
Cc: "www-style@w3.org" <www-style@w3.org>
On Sat, Feb 1, 2014 at 3:03 PM, Simon Sapin <simon.sapin@exyr.org> wrote:
> On 01/02/2014 21:46, Andrew Fedoniouk wrote:
>> (Sorry about revitalizing the horse)
>> For display:block elements,
>> what conceptually stops us from treating `vertical-align`
>> exactly in the same way as in display:table-cell ?
> Backward compatibility with existing content that may rely on vertical-align
> doing nothing in this case.

I'd like to see any content that relies on the fact that vertical-align
does nothing. Something tells me that it will be hard to find such a content.
In 99.99% of cases it will be just a bug I think.

In the same way we can say: we cannot add any new values to, say,
'display' as someone already relied on the fact that non-recognizable values are
not parsed. I mean that any new feature we add may potentially break something.

>> I believe this functionality is so basic and asked for
>> so frequently that we should do something about it.
> Use Flexbox.
> http://philipwalton.github.io/solved-by-flexbox/demos/vertical-centering/

display:flexbox has pretty much the same set of problems as display:table-cell

Like: what about vertical-align in display:list-item?
Vertical and horizontal alignment is not specific to flexbox only.
E.g. it can be used with display:grid, or some other layout manager that
we don't know yet.

But even flexbox has no concept of alignment in overflow cases
that I was talking about.

Consider this http://terrainformatica.com/w3/transition-with-vertical-align.gif

Markup used there:
<div style="width:50%;margin:4px auto;" >
    <header>Click me!</header>
      Lorem ipsum dolor sit amet, ...

Something tells me that without use of heavy artillery like position:absolute
that case above is not solvable.

Andrew Fedoniouk.

Received on Sunday, 2 February 2014 00:16:42 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:18 UTC