ms is wrong AGAIN

微軟的Web工程師寫了這篇文章[url=http://blogs.msdn.com/b/thebeebs/archive/2012/01/11/with-vendor-prefixes-what-is-the-javascript-equivalent-of-ms.aspx]Vendor Prefixes and JavaScript[/url],文中寫道:

[quote]In Internet Explorer, Microsoft Lowercase the first Letter, which makes it consistent with the CSS capitalisation: msTransform
[/quote]

然而ms這個拼法其實全然是 inconsistent。看看其他廠商的vendor prefix全部是首字母大寫的(webkit同時支持大寫和小寫)。

所以我在該文之後留言:

No! ms is wrong (AGAIN)!!!

The first letter of vendor prefix should be Capitalized! It follows a very simple rule that any char after dash in CSS property name should be transform to uppercase.

ms BREAK this rule, and that means you can NOT diff the vendor prefixed prop -ms-xxx with the normal prop ms-xxx. Though there is no such property named ms-xxx, but it's still a bad exception.


自己給自己翻譯如下:


扯淡!ms又錯了!!!(我爲什麼要說“又”?)

vendor前綴的第一個字母應該大寫!這規則很簡單,CSS屬性名中所有的短橫線之後的那個字母應該轉換爲大寫。

ms違背了這規則,這意味着你無法區分一個廠商前綴屬性 -ms-xxx 和一個正常屬性 ms-xxx。儘管現在並沒有屬性叫 ms-xxx,但是這仍是一個傻逼的例外。


【完】
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章