On Tue, Sep 4, 2012 at 4:36 PM, Alan Stearns <stearns@adobe.com> wrote:
> I have two questions about the use of <shape> in various CSS
> specifications. It first shows up in CSS 2.1 [1]. It also occurs in CSS3
> Images [2] with a different definition, and CSSOM [3] for serializing the
> 2.1 version. Finally, CSS3 Exclusions and Shapes [4] extends the 2.1
> version to allow some new shape types.
>
> Both of my questions arise because I am wondering about how different
> definitions of <shape> can interact.
>
> First, if I'm considering the use of <shape> in CSS3 Exclusions and Shapes
> (with rectangle() etc.) to be an extension of CSS2.1 <shape> (that only
> has rect()) do I need to accept a rect() value in CSS3 Exclusions and
> Shapes usage, or is it OK to limit this new usage to the new value list?
> If rect() is not allowed as a value for shape-outside, do I need to use a
> different term?
It's fine to amend the definition of a property in a later draft. In
particular, you can change the definition of <shape> to just be your
new functions, and then make 'clip' accept <shape> or rect(), so you
don't need to worry about rect() at all otherwise.
(But it might be useful to have rect() in addition to rectangle(),
despite the possibility of confusion.)
> Second, should CSS3 Images use some other term - since the serialization
> of the keywords in that spec will not match the 2.1 serialization?
I'm fine with renaming our use of <shape> to <rg-shape> or similar, to
uniquify the production. It's not intended to interact with the 2.1
or Exclusions definitions of <shape>, just to shorten the grammar of
radial-gradient().
More generally, should we define a generic prefix for grammar
productions that are "local", and only intended to be used within a
particular spec? For example, radial-gradient() could instead use a
<~shape> production, which doesn't interact with the <shape>
production, or with other definitions of <~shape> in other specs.
(You can still explicitly refer to a particular spec's local
production, for example if you want to extend it, but in the absence
of anything to the contrary, local-prefixed productions are assumed to
be unique to the spec they're defined in.)
~TJ