Re: Multiple Decorators

On Mon, Apr 29, 2013 at 1:07 PM, Sam L'ecuyer <sam@cateches.is> wrote:
> I noticed that there's not any clarification in the Decorations spec about applying multiple decorators to a single element.
>
> Example:
>
> .headline[access-type="premium"] {
>   decorator: url(#premium-decorator);
> }
>
> .headline[content-type="video"] {
>   decorator: url(#video-decorator);
> }
>
> <h3 class="headline" content-type="video" access-type="premium">Headline Title</h3>
>
> What would be expected?  Would the #video-decorator be applied, passing its result to the #premium-decorator in the <content> tag?  Would only one be applied?  If so, which one?

Per standard CSS rules, the latter declaration would win in the
cascade, and so only #video-decorator would be applied.  If
'decorator' can apply multiple values, they have to be done in a
single line, not across declarations like this.

(This is a common failure mode for list-valued properties.  Fixing it is hard.)

~TJ

Received on Monday, 29 April 2013 20:16:57 UTC