Re: [css-gcpm] content() function doesn't allow formatting of values

On Thu, Jun 19, 2014 at 12:25 AM, Jirka Kosek <jirka@kosek.cz> wrote:
> On 18.6.2014 18:43, Tab Atkins Jr. wrote:
>>> How in your opinion should be JS integrated into CSS? By using something
>>> like IE's expression() or in a some different way?
>>
>> I already explained this. I'm talking about aligning with the JS API in our
>> own API design, not literally embedding JS into CSS. The point is to make
>> it easy for authors to transfer knowledge across domains.
>
> For CSS you don't need just API, but also syntax for invoking functions
> in this API. To my knowledge there is nothing like this in CSS so far.

I think you are fundamentally misunderstanding what I am saying.

I am saying that we can create functions in CSS that mimic the names
and arguments of the JS API, so that it's easy for people who've
learned one to use the other.  This is similar to the (purposeful)
similarity between the syntaxes of the CSS image-set() function and
the HTML srcset attribute.  (And I'm planning to extend image-set() to
mimic the additions that the <picture> element has allowed in HTML.)

~TJ

Received on Thursday, 19 June 2014 16:33:22 UTC