Hacker News new | past | comments | ask | show | jobs | submit login

Not.

How would you handle the case of pre-standard implementations?

Like:

    -webkit-gradient(<type>, <point> [, <radius>]?, <point> [, <radius>]? [, <stop>]*)
vs:

    -moz-linear-gradient([ [ [top | bottom] || [left | right] ],]? <color-stop>[, <color-stop>]+);
which eventually became:

    linear-gradient( [ [ <angle> | to <side-or-corner> ,]? <color-stop> [, <color-stop>]+ )
In CSS, the vendor prefixes are exactly what we need. They help bootstrapping, discussing, and proofing standards by having pre-standard implementations in the wild.

CSS is vastly more complex than HTTP headers which are most of the time, key-value(s).




You can have pre-standard implementations without vendor prefixes. Here's an argument against them:

    http://www.quirksmode.org/blog/archives/2010/03/css_vendor_pref.html
And here's some further discussion:

    http://www.quirksmode.org/blog/archives/2010/03/css_vendor_pref_1.html
Personally I think vendor prefixes are an awful hack. We've already got browser-conditional comments in HTML, why not use them? Hell, browser-specific stylesheets would be a better option from where I'm sitting.


>> We've already got browser-conditional comments in HTML

You mean the `conditional statements` introduced and only used by IE?

http://en.wikipedia.org/wiki/Conditional_comment


Yep. It's a better plan than vendor prefixes.

Edited to clarify: I mean that browser-conditional comments should be implemented across browsers, not that we should rely on features already implemented.


vender prefixes are broken. What happens if the same vendor wants to implement another version of the same (still experimental) property?

What we need is draft prefixes. WebKit implements one type of gradient? Great, they define a prefix/property (which could be something as simple/silly as -webkit1-gradient), and anyone who implements the same API is free to use the same property name.


In this particular case, handling the pre-standard implementations would have been trivial because they all have different syntax. So you'd just write them all in there, and the ones that don't apply in the UA in question would just fail to parse and get dropped.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: