- From: 一丝 <yiorsi@gmail.com>
- Date: Thu, 23 Jul 2015 18:47:55 +0800
- To: Xidorn Quan <quanxunzhen@gmail.com>
- Cc: public-html-ig-zh <public-html-ig-zh@w3.org>
- Message-ID: <CA+-d5ZrMnB7k6v35b648YBr-nSP1bGr8+z-3uDm2xE+Kfu49Hw@mail.gmail.com>
@Xidorn
我测试了你在 Firefox 实现的 @counter-style 内不支持 !important, 棒棒哒!
以上
一丝
2015-07-23 18:28 GMT+08:00 一丝 <yiorsi@gmail.com>:
> @Xidorn
>
> 之前版本的 Chrome,以及现在的 Firefox 都是支持 !important 的。
>
> 并没有导致整条@rule 规则失效,因为 Demo 中 如果 .iconfont{} 中的 font-family 换成 foo 后就显示字体图标了。
>
> 另外,@viewport 中允许 !important
> http://www.w3.org/TR/css-device-adapt/#the-viewport-rule
>
>
> 以上
> 一丝
>
> 2015-07-23 18:02 GMT+08:00 Xidorn Quan <quanxunzhen@gmail.com>:
>
>> On Thu, Jul 23, 2015 at 7:48 PM, 一丝 <yiorsi@gmail.com> wrote:
>> > @font-face {
>> > font-family: iconfont !important;
>> > font-family: foo;
>> > font-weight: 300;
>> > font-style: normal;
>> > src: url("http://t.tbcdn.cn/apps/e/brix/fonts/uxiconfont.eot");
>> > src:
>> > url("http://t.tbcdn.cn/apps/e/brix/fonts/uxiconfont.eot?#iefix")
>> > format("embedded-opentype"),
>> > url("http://t.tbcdn.cn/apps/e/brix/fonts/uxiconfont.woff")
>> > format("woff"),
>> > url("http://t.tbcdn.cn/apps/e/brix/fonts/uxiconfont.ttf")
>> > format("truetype"),
>> >
>> > url("http://t.tbcdn.cn/apps/e/brix/fonts/uxiconfont.svg#iconfont")
>> > format("svg");
>> > }
>> >
>> > Demo:http://jsbin.com/baveqahobu/edit?html,output
>> >
>> > Demo 中的字符在 Chrome 44 之后版本没有渲染成指定字体图标,不符合用户预期。
>> >
>> > 测试发现 !important 会导致整条规则失效(没找到相关 bug,如果有找到的麻烦告知一下)。类似的,Opera 在12.1
>> > 版本中也是同样如此。然而,规范中并没有描述关于 @font-face 中关于 !important 规则的作用。
>>
>>
>> 这难道不是因为font-family语法错误解析失败,然后没有font-family的@font-face整条无效导致的么……我好像没有见到过哪个@rule的descriptor语法是接纳“!important”的……
>>
>> 另外那个标准现在用的前缀是“[css-fonts]”,css3这种命名方式已经全部被改掉了。
>>
>> - Xidorn
>>
>
>
Received on Thursday, 23 July 2015 10:48:42 UTC