html %3cstyle%3e 标签,[css-text-3][css-fonts-3][css-text-decor-3] Distinguish applying to text vs appl...

The CSS Working Group just discussed Distinguish applying to text vs applying to boxes, and agreed to the following:

RESOLVED: inheritable properties that apply to inlines also apply to text

The full IRC log of that discussion

Topic: Distinguish applying to text vs applying to boxes

github: istinguish applying to text vs applying to boxes

github: https://github.com//issues/5303

fantasai: it's not super clear which property apply to text, and which apply to inline boxes

fantasai: the specs sometimes says one when they mean the other

testcase from oriol showing off the distinction:

https://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%0A%3Cstyle%3E%0Asection%20%7B%20border%3A%201px%20solid%20%7D%0Adiv%20%7B%20line-height%3A%204%3B%20display%3A%20contents%20%7D%0A%3C%2Fstyle%3E%0A%3Csection%3E%3Cdiv%3Eline-height%20inherited%20by%20text%3C%2Fdiv%3E%3C%2Fsection%3E%0A%3Csection%3E%3Cdiv%3E%3Cspan%3Eline-height%20inherited%20by%20inline%20box%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2Fsection%3E

fantasai: but for some properties we need a distinction

chrome renders the two boxes the same, firefox doesn't apply line-height to the first (where there is no box to apply to, only text)

fantasai: I propose to make a mass update to say "text" vs "inline boxes" vs "inline boxes and text"

fantasai: text decoration, color, etc...

fantasai: this will require some auditing of the existing propdef tables

florian: I initially agreed

seems good to me, I think it is clearer

florian: but oriol made a test case and it confused me

florian: because content makes an anonymous inline

florian: so what's the difference between the two concepts, I am not sure

fantasai: is there an anonymous inline? really?

TabAtkins: as far as I know, there is not

florian: ah ok, then we need to specify

emilio: webkit allows display:contents on text, but we don't in gecko

TabAtkins: do you think this makes a different except line-height?

emilio: no, apart from that, I don't think there is a difference

florian: and the whitespace property?

florian: if there is no inline box? how would that work?

emilio: I would have to test

emilio: I remember we used to apply only the closest inline container

emilio: and we changed this, but I don't recall the specifics

q

oriol: one of the principles we should try to follow is to use inheritance as a rule

oriol: otherwise there could be differences if you have or not the inline

TabAtkins: that sounds like a reasonable rule to me

TabAtkins: and whitespace works in firefox

Rossen_: so could line-height be a bug in gecko?

florian: did the list you made match oriol rule?

fantasai: I think so, but the list was very rough I didn't take a full look

fantasai: there might be issues with alignment

fantasai: but we can take a look later

florian: I support resolving oriol rule then

florian: and we can revisit if needed later

Rossen_: and we need to add this rule?

florian: yes, we should indeed do that, there is no text now

Rossen_: ok, sounds go

Rossen_: who will do that?

florian: it could be me, but I am not sure when

fantasai: ok I will take this

Rossen_: ok, thanks

Rossen_: do we need a resolution for oriol's rule?

fantasai: yes, if we need exceptions we will revisit?

Rossen_: ok, any objections to add this rule?

fantasai: and update the propdef tables

RESOLVED: inheritable properties that apply to inlines also apply to text

s/ but I am not sure when/ but it doesn't have to/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值