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

久未见 提交于 2019-12-06 19:55:07

问题


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.


回答1:


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

References

  • Webkit 63854 Changelog

  • Chromium Changelog

  • Webkit Bug 42990

  • Unforking of KHTML and WebKit

  • Interview with Lars Knoll, creator of KHTML

  • Companies and Organizations that have contributed to WebKit

  • konqueror/kcmcss.cpp at master · KDE/konqueror




回答2:


The only browser that uses the -khtml- prefix now is a Konqueror, since it have a very little market share (less than 1%), you can drop it safely.




回答3:


Basically very less people uses Konqueror, So it is not necessary to use -khtml- prefix

But if required you, can only use this with the -khtml- prefix



来源:https://stackoverflow.com/questions/6687680/what-compatibility-do-i-lose-when-dropping-the-khtml-vendor-prefix

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!