Re: Proposal to enable -css- prefix on transform and appearance

On Thu, Feb 23, 2012 at 1:57 PM, Alan Stearns <stearns@adobe.com> wrote:
> On 2/23/12 1:44 PM, "David Singer" <singer@apple.com> wrote:
>> When vendors *intend* to be implementing the same spec., I think the pressure
>> should be on them to fix their bugs; relieving that pressure by writing
>> vendor-specific rules only alleviates the pressure.
>>
>> However, one obvious alternative is to have each vendor implement both their
>> prefix and the 'group' prefix,m as suggested above, and evangelize the public
>> 'group' prefix, so web pages can be written using the common definition.
>
> One possibility that just popped into my mind is to have the group prefix be
> '-test-'
>
> So for new property 'bleen' WebKit could implement -webkit-bleen and
> -test-bleen. Mozilla would implement -moz-bleen and -test-bleen.
>
> When evangelizing, we'd encourage experiments with the -test- version, and
> the word 'test' seems to me more of a red flag on production use than any
> proposal I've seen yet.

I'll be more explicit: a shared prefix solves a minor problem with
prefixes, makes the major problem worse, and introduces entirely new
and exciting problems.  Its positives are well outweighed by its
negatives.

In particular, the major problem with prefixes is that a combination
of the time features stay prefixed and the way authors use prefixes
means that prefixes commonly become "fixed" (particularly for WebKit
since multiple browsers use the same prefix and the market-share in
some contexts is interesting).  A shared prefix makes this *worse*,
because while current prefixes are fragmented across pages, this would
make *every* use of an experimental feature look the same, which means
the "are we stuck with it yet?" accumulator shoots up way faster.
-webkit- is already frozen on the web for compat now.  This would make
virtually *every* prefixed feature freeze due to compat.

The small problem it fixes is authors being annoyed at writing 2-4
prefixed versions of a property.  This is largely a result of us, the
CSSWG, being slow and kinda being assholes (myself included) about not
moving things quickly when they're obviously stable.  This is a
fixable problem on the process side without having to change anything
outward.

The new problem it introduces is that the shared prefix may be
interpreted differently on different browsers, or have bugs in
different browsers that require different hacks in how you write it.
This is not helped by simultaneously supporting vendor-specific
prefixes - if the web depends on a particular behavior of the shared
prefix, new browsers will have to match that behavior anyway (or just
cause authors pain).


> Tests could be written using -test-bleen, which is a solution for the
> currently unresolved issue of how to write and run tests when only
> vendor-prefixed versions exist. Once we get to the point of dropping
> prefixes, the test suite could be converted to drop -test- as well.

This does not need a change to the language's syntax.  You just need
to use JS to sniff the appropriate prefix in your test and use it.

~TJ

Received on Thursday, 23 February 2012 22:43:05 UTC