CSS - "initial" 是或曾经是转换转换(X、Y 或 Z)函数的有效参数?

CSS - Is, or was, "initial" a valid argument for the transform translate (X, Y, or Z) function?

我正在 CSS 扫描我们公司的一个网站。我遇到了

transform: translateX(initial);

我从来没有见过这个,并且根据 this MDN link and the transform doc here 认为只有长度和百分比值被允许作为参数。在我快速制作的 CSS/HTML 片段上尝试 initial 似乎它破坏了转换。

"initial" 曾经(或者甚至,现在仍然)是 translateX()、translateY() 或 translateZ() 的可接受参数吗?

没有。你的评估是正确的。但是,根据 W3C:

The initial keyword is used to set a CSS property to its default value.

The initial keyword can be used for any CSS property, and on any HTML element.

所以,尽管

transform: translateX(initial);

无效,

transform: initial;

完全没问题,可能是作者的意图(需要引用)。