W3C home > Mailing lists > Public > www-style@w3.org > March 2010

Re: vendor prefixes considered harmful (was: vendor prefix properties diverging from official properties)

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Sun, 21 Mar 2010 14:14:14 -0700
Message-ID: <dd0fbad1003211414t5439463at6fc9d28a05b20713@mail.gmail.com>
To: Glen <glen.84@gmail.com>
Cc: www-style@w3.org
On Fri, Mar 19, 2010 at 2:13 PM, Glen <glen.84@gmail.com> wrote:
> I agree that vendor prefixes require attention. If I wish to use an
> experimental property, I should not have to declare 4 or 5 variations of it
> (and it's 4 or 5 *now*, what happens when additional rendering engines are
> developed?).
>
> As mentioned by more than one person in the previous discussion regarding
> this topic, a single prefix for work-in-progress properties could be
> defined. For example:
>
> -border-radius: 10px;     (or --, or x-, etc.)
>
> This would be used by all vendors who have an implementation matching the
> current WD.
>
> A vendor prefix would then be used in the following two cases:
>
> 1. Proprietary properties (no standard exists).
> 2. Alternative syntax or behavior of a property (differing implementation).
>
> I just think that this is ridiculous:
>
>     border-top-left-radius: 8px;
>     border-top-right-radius: 8px;
>     -khtml-border-radius-topleft: 8px;
>     -khtml-border-radius-topright: 8px;
>     -moz-border-radius-topleft: 8px;
>     -moz-border-radius-topright: 8px;
>     -webkit-border-top-left-radius: 8px;
>     -webkit-border-top-right-radius: 8px;
>
> .... just to round the top of an element. If this wasn't a CR, there might
> well have been 4 extra declarations for Opera & IE. That's *6* declarations
> for every property!?

Border-radius is an extraordinary example, because of its popularity
during its experimental phase.  Most properties will not end up like
that.

> P.S. Why does border-radius: 5px 10px; affect tl/br and tr/bl, and not tl/tr
> and bl/br or tl/bl and tr/br? It seems like the least useful alternative.

It's a simple adaptation of the standard way border/padding/etc
properties work.  Rather than specifying top/right/bottom/left, you
specify the four corners in order, starting from topleft.  While for
border-radius in particular it might have been somewhat more useful to
do them in one of the ways you suggest, it would be inconsistent with
other properties, and so isn't really worth it.

~TJ
Received on Sunday, 21 March 2010 21:15:07 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:25 GMT