Search code examples
csssafariwebkitvendor-prefix

What compatibility do I lose when dropping the -khtml- vendor prefix?


I have bits and pieces of CSS that use the -webkit- vendor prefix. For compatibility with "older" versions of Safari, I have the same rule with the -khtml- vendor prefix. I am actively uninterested in compatibility with Konqueror and other true KHTML browsers.

For example, I may have the following rules:

.menuItem {
  -khtml-user-select: none;
  -webkit-user-select: none;
}

I understand that modern WebKit browsers internally rewrite all -khtml- and -apple- rules to be -webkit- rules instead. However, that leaves me with the following question:

In what version of Safari did -webkit- become available? That is, what is the version before which Safari would completely ignore my rules?

I plan to use this information to find out whether my individual rules (such as -khtml-user-select) are actually supported by this early version of Safari.


Solution

  • The -webkit- prefix has been around since Safari 3. The -khtml- references in Safari 2 were replaced from that point on.

    References