为什么浏览器厂商要制作自己的 CSS 属性?
- 为什么浏览器厂商要开发自己的浏览器 css 属性,即使他们知道这些属性 在w3c批准并添加之前不会通过w3c验证吗?
- 目的是什么?是为了自己 测试,或用于网络开发人员,或 展示浏览器功能 致全世界和 W3C 组织 以及 W3C 的 CSS 开发团队?
- 它像测试版吗 示范?
- 如果我现在使用任何特定的浏览器 他们可以删除该财产吗 未来版本的支持。将来我是否必须编辑我的 css
例如:
https://developer .mozilla.org/en/CSS_Reference/Mozilla_Extensions
- Why do browser vendors make their own
css properties, even they know these properties
will not pass the w3c validation before approved and added by w3c? - What is the purpose? Is for their own
testing, or for web developers, or to
demonstrate browser capabilities
to the world and to the W3C organizations
and to CSS development team of W3C? - is it like a beta version of
demonstration? - if i use any browser specific for now
can they remove that property's
support from future versions.will i have to edit my css in future
For example:
https://developer.mozilla.org/en/CSS_Reference/Mozilla_Extensions
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
W3C 正在考虑的是语法。让我们以梯度为例:
这两个代码生成相同的梯度。正如您所看到的,没有标准的过程,对于基于 webkit 和 mozilla 的浏览器来说,语法既令人困惑又不同。
但让我们想象一下,两三年后,实施就完成了。现在您只需为标准添加另一行代码即可。
现在两个引擎都会理解梯度语句,如果它是在扩展语句之后指定的,那么最后一个将是要解释的。
What the W3C is thinking about is the syntaxis. Let's take gradient for an example:
Both these codes generate the same gradient. As you can see, there's no standard procedure, the syntaxis is both confusing and different for webkit and mozilla based browsers.
But let's imagine in two or three years, the implementation is done. Now you just have to add another line of code for the standard.
Now both engines will understand the gradient statment and if it's specified after the extension ones, this last one will be the one to interpret.
标准流程不会这样运行:
就像任何 IT 项目一样,规范已编写,然后实现了其中的一些部分,然后更改了规范基于实施过程中吸取的经验教训。正如罗伯特·奥卡拉汉所说,这是一种微妙的舞蹈。
使用供应商前缀进行初始实现意味着,如果稍后更改规范,针对现有实现编写的现有代码不会中断。
供应商前缀还允许浏览器制造商进行尝试,这可能会产生非常好的结果,例如 Safari 的渐变。
The standards process doesn’t run like this:
Like any IT project, the spec is written, then bits of it are implemented, then the spec is changed based on lessons learned during implementation. It’s a delicate dance, as Robert O’Callahan said.
Doing initial implementations with vendor prefixes means that if the spec is changed later, existing code written against the existing implementations won’t break.
Vendor prefixes also allow browser-makers to experiment just for the heck of it, which can result is quite nice things like Safari’s gradients.
它们大多是正在进行中的,例如 css2->css3,但由于浏览器尚不支持它(如 css3),因此它以不同的名称公开。
they are mostly work-in-progress from for example css2->css3, but since a browser doesn't yet support it (like css3), it is exposed with different names.
他们这样做有几个原因:
是的,遗憾的是这些属性可能会在未来的版本中发生变化甚至消失,从而需要更改代码。底线:坚持标准,或者至少要意识到当前任何闪亮的功能都有未来的价格。
They do it for several reasons:
And yes, sadly those properties may change or even disappear in future versions, necessitating code changes. Bottom line: stick to standards, or at least be aware that any current shiny feature has a future price.
mozilla 的扩展很可能会出现在下一个 css 标准中,只是为了领先一步。当这些属性成为标准时,使用它们时不带 moz 前缀,以便支持多个浏览器。
mozilla has extensions which are likely to be in the next css standard just to be one step ahead. when these properties will be standard, use them without the moz prefix, in order to support more than just one browser.
我不了解CSS标准演变的具体情况,可以猜测以下是制造商“跳出标准”的主要原因。
虽然有效地规避了既定的标准化流程,但上述驱动因素可能是善意的并且考虑到更大的利益。不幸的是,还有一些不那么高尚的原因:
I'm not privy to the specifics of the CSS standards evolution, one can guess that following are the main reasons for manufacturers to "draw outside of the lines" of the standards.
While effectively circumventing the established standardization process, the above drivers are probably well meaning and mindful of the greater good. There are unfortunately less noble reasons: