Re: [css-lists] size of images used as list-style-image

Le 27/06/2013 05:02, Nick Cameron a écrit :
> The css-lists spec does not (as far as I can see) say anything about the
> size of images used for the list-style-image property. It probably
> should, but I don't have a proposal for what.
> Currently Firefox and Chrome use the size of the image referred to by
> the url if a url is used. Chrome looks like it uses 1em by 1em if a
> gradient is specified. I am currently implementing non-url images in
> Firefox, I'll probably use 1em by 1em for now unless anyone has a better
> suggestion..


The css-images spec defines how to determine the size of images. 
(css-lists should probably refer to it.)

This involves a 'specified size' (which is not set for anonymous images 
in the 'content' property), the 'intrinsic size' of the image (gradients 
don’t have any) and the 'default size' which depends on the context, 1em 
by 1em for list markers.

If you’re also implementing css-images, the above actually determines 
the size of the "replaced CSS box". The size and position of the actual 
image inside that depend on the 'object-fit' and 'object-position' 

Simon Sapin

Received on Friday, 28 June 2013 08:12:46 UTC