W3C home > Mailing lists > Public > www-style@w3.org > May 2011

RE: [css3-flexbox][css3-grid] Inline replaced elements as grid items and flexbox items

From: Alex Mogilevsky <alexmog@microsoft.com>
Date: Mon, 16 May 2011 16:49:50 +0000
To: Boris Zbarsky <bzbarsky@MIT.EDU>, "www-style@w3.org" <www-style@w3.org>
Message-ID: <D51C9E849DDD0D4EA38C2E539856928411F99072@TK5EX14MBXC218.redmond.corp.microsoft.com>
You are right, computed style is whatever is specified.

Do you have an example of a replaced element being treated differently when 'display' is 'inline' vs. 'inline-block' ?

-----Original Message-----
From: www-style-request@w3.org [mailto:www-style-request@w3.org] On Behalf Of Boris Zbarsky
Sent: Monday, May 16, 2011 9:13 AM
To: www-style@w3.org
Subject: Re: [css3-flexbox][css3-grid] Inline replaced elements as grid items and flexbox items

On 5/16/11 11:37 AM, Alex Mogilevsky wrote:
> Default UA stylesheets are not normative. Whatever they say,<img>  is inline-block by default, "display:inline" on image and on other replaced elements means "display:inline-block".

No, it does not.  If you then look at the computed style, it'll come back as "inline", not "inline-block".

Now the _rendering_ is the same for replaced elements whether they're inline-block or not... mostly.  For replaced elements with nontrivial baselines, even that's not clear.  But that's a consequence of the spec explicitly having different layout rules for replaced and non-replaced display:inline elements.


Received on Monday, 16 May 2011 16:50:18 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:46 UTC