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

On Sat, Feb 1, 2014 at 3:03 PM, Simon Sapin <> 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.

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

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