RE : Re: [cssom] Question about multiple key pair values

Ok, it confirms my thoughts. I think the only solution would be to serialize the multiple property using a single property definition and a function  :

property: first-of(value1, value2);

An editing software could then apply a transformation to split that single rule into several ones.

The problem is that it requires support for that firstOf function in the rendering engine.

François

-----Message d'origine-----
De : Daniel Glazman
Envoyé le : samedi 30 juillet 2011 06:04
À : www-style@w3.org
Objet : Re: [cssom] Question about multiple key pair values

Le 29/07/11 21:28, François REMY a écrit :

> A small question : how will the "ideal" vNext CSS Object Model handle
> the case where a property is defined two or more time in the same rule?
>
> This happens often when it's needed to maintain compatibility with
> browsers which support a property but not all its possible values.
>
> Dealing with this case seems not so easy at first glance and, while
> support for it seems needed for editing software, I'm wondering whether
> general WebPages would benefit from a too complete OM or if the memory
> overhead would be prohibitive. I'm also wondering if it wouldn't be
> better to have specific programs that need granular control over
> stylesheets build their own modules for it.

Even for editing software, that's difficult to handle, please trust me
on that. FWIW, BlueGriffon does what you suggest above. It has its own
CSS parser, serializer and OM (not _the_ CSS OM). But dealing with
multiple valid declarations for the same property - because that's what
we're discussing here - is of a complexity magnitude I'm not sure it's
doable.

Note: I needed my own parser for unknownrules and comments.

</Daniel>

Received on Saturday, 30 July 2011 07:37:33 UTC