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

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".


> -----Original Message-----
> From: Tab Atkins Jr. [mailto:jackalmage@gmail.com]
> Sent: Saturday, May 14, 2011 11:22 PM
> To: Brad Kemper
> Cc: Andrew Fedoniouk; Alex Mogilevsky; David Hyatt; www-style@w3.org
> Subject: Re: [css3-flexbox][css3-grid] Inline replaced elements as grid
> items and flexbox items
> 
> On Sat, May 14, 2011 at 10:23 PM, Brad Kemper <brad.kemper@gmail.com>
> wrote:
> > I'm pretty sure the default display for img is also inline-block. Where
> do you see info saying it is inline?
> 
> <img> appears in neither the CSS2.1 default style sheet for HTML4, nor in
> the HTML5 default UA stylesheet.  Thus, it takes the initial value,
> 'inline'.
> 
> (Interestingly, HTML5 is missing the line "input, select { display:
> inline-block; }", probably because it's fairly separated from the rest of
> the display values in the CSS2.1 stylesheet.)
> 
> ~TJ

Received on Monday, 16 May 2011 15:38:09 UTC