What's the point of "-safari" and "-webkit"?

  • mindfullsilence
  • Professor
  • Professor
  • User avatar
  • Posts: 854

Post 3+ Months Ago

With all the new css3 properties, it seems kind of pointless for mozilla and safari to require us to type their engine kit in front of the property before declaring it. Why not just set it up to be the actual property?

Instead of this:
CSS Code: [ Select ]
div {
-webkit-border-radius: 5px;
-safari-border-radius: 5px;
border-radius: 5px /*future proofing*/
}
 
  1. div {
  2. -webkit-border-radius: 5px;
  3. -safari-border-radius: 5px;
  4. border-radius: 5px /*future proofing*/
  5. }
  6.  


Why not just all of them be this:
CSS Code: [ Select ]
div {
border-radius: 5px;
}
 
  1. div {
  2. border-radius: 5px;
  3. }
  4.  


Seems like it would be a lot easier for both the browser developers and the site designer. They wouldn't have to change it later down the road, and we wouldn't have to write 3 lines of code instead of 1. Anyone know what the point is?
  • tastysite
  • Proficient
  • Proficient
  • User avatar
  • Posts: 349
  • Loc: Brighouse, West Yorkshire, England

Post 3+ Months Ago

safari is a webkit browser so -webkit should work for it, and does Ive done it.
Mabie they are just trying to make a huge point of the fact they support it and IE does not!:)
What bugs me is the fact that -webkit and -moz have different way for each level eg
-webkit-border-radius-top-left:20px;
but for moz you have to have
-moz-top-left-border-radius:20px;
mad!!!
  • digitalMedia
  • a.k.a. dM
  • Genius
  • User avatar
  • Posts: 5148
  • Loc: SC-USA

Post 3+ Months Ago

I don't know if this is true anymore, but definitions preceded by a hyphen were once consider proprietary switches and not actually intended for public use.
  • mindfullsilence
  • Professor
  • Professor
  • User avatar
  • Posts: 854

Post 3+ Months Ago

well, not sure they aren't intended for public use...I mean, they list them openly for the public to see:

https://developer.mozilla.org/En/CSS_Reference/Mozilla_Extensions
  • digitalMedia
  • a.k.a. dM
  • Genius
  • User avatar
  • Posts: 5148
  • Loc: SC-USA

Post 3+ Months Ago

I mean they're not intended to be standard conformant. The last time I encountered them was when IE6 was still being used and people wanted to use the border-box.

Code: [ Select ]
  -moz-box-sizing:  border-box;
  -webkit-box-sizing: border-box;
  1.   -moz-box-sizing:  border-box;
  2.   -webkit-box-sizing: border-box;


...at the time, Mozilla's literature said the switches were created for internal developmental use.
  • mindfullsilence
  • Professor
  • Professor
  • User avatar
  • Posts: 854

Post 3+ Months Ago

oooooooh. Okay, well my question still stands. Why give it the prefix?
  • mk27
  • Proficient
  • Proficient
  • User avatar
  • Posts: 334

Post 3+ Months Ago

Possibly to disambiguate this:

Quote:
What bugs me is the fact that -webkit and -moz have different way for each level eg
-webkit-border-radius-top-left:20px;
but for moz you have to have
-moz-top-left-border-radius:20px;
mad!!!


BUT, also, it's not unusual for an API to use prefixes (like this) denoting new functions in development, when they are introduced in a new release. As DM points out, they start out known only to the developers, then when they are happy with it they make them public, and then later they may or may not drop the prefix.

Post Information

  • Total Posts in this topic: 7 posts
  • Users browsing this forum: No registered users and 19 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.