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

Re: [CSS21][css-content] Resizing pseudo-elements with content: url()

From: Simon Pieters <simonp@opera.com>
Date: Thu, 19 Feb 2015 08:52:31 +0400
To: "Boris Zbarsky" <bzbarsky@mit.edu>, "Brad Kemper" <brad.kemper@gmail.com>
Cc: "www-style@w3.org" <www-style@w3.org>
Message-ID: <op.xuan5tlyidj3kv@simons-macbook-pro.local>
On Wed, 18 Feb 2015 21:01:14 +0400, Brad Kemper <brad.kemper@gmail.com>  
wrote:

>
>
>> On Feb 18, 2015, at 6:10 AM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
>>
>>> On 2/18/15 3:58 AM, Daniel Tan wrote:
>>> However, CSS2.1 says nothing at all about replaced elements in the
>>> section on content: url(), which leads me to believe this is new to
>>> level 3.
>>
>> It is.
>>
>> CSS2.1 doesn't really clearly define the processing model of 'content'  
>> on ::before and ::after, but the informative examples in CSS 2.1, the  
>> fact that 'content' specifies a _list_ of things, and the desire for  
>> consistency has led to UA behavior being the following: the 'content'  
>> property specifies a list of things that become children of the  
>> ::before or ::after box.
>>
>> -Boris
>
> Perhaps 'image()' could include another parameter, like '200x300', to  
> specify an override of the intrinsic dimensions of the image, and then  
> we could use 'inage()' instead of url() in the 'content' property for  
> this.

image-set() can already scale the intrinsic dimensions with e.g. 2x, but  
it can't change the aspect ratio.

-- 
Simon Pieters
Opera Software
Received on Thursday, 19 February 2015 07:53:02 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:52:01 UTC