Re: [csswg-drafts] [css-inline-3] Apply leading-trim to inlines? (#3955)

The CSS Working Group just discussed `Apply leading-trim to inlines? #3955`, and agreed to the following:

* `RESOLVED: leading-trim applies to inlines by changing the content box edges`

<details><summary>The full IRC log of that discussion</summary>
&lt;fantasai> Topic: Apply leading-trim to inlines? #3955<br>
&lt;RossenF2F> github: https://github.com/w3c/csswg-drafts/issues/3955<br>
&lt;emilio> fantasai: the purpose of leading-trim is to change the bottom edge of a block so that you can make more useful alignment of block<br>
&lt;emilio> ... may be useful to make it apply to inlines<br>
&lt;emilio> ... so that you can change the edge of the background boxes of inlines<br>
&lt;emilio> ... right now people try to find padding values to make text look centered<br>
&lt;emilio> ... this property allows to control the edge of blocks, but we could make it apply to inlines too<br>
&lt;emilio> myles: I think it was a mistake to make line-height apply to inlines and this feels similar<br>
&lt;emilio> fantasai: this doesn't really need to affect layout<br>
&lt;emilio> ... right now when you add padding / borders to an inline it doesn't affect the position of the inline<br>
&lt;RossenF2F> ack dbaron<br>
&lt;emilio> dbaron: feels like making this apply to inlines make people use backgrounds on inlines reliably, so it seems good to me<br>
&lt;florian> +1<br>
&lt;emilio> ... particularly noting that it doesn't affect the line-height calculations, only the content-box<br>
&lt;emilio> koji: this proposal looks like we're trying to change text-top based on something which sounds like a circular dependency<br>
&lt;emilio> ... with leading-trim<br>
&lt;emilio> fantasai: well not really this allows to override the content edge of backgrounds, I don't think it's inconsistent or circular<br>
&lt;emilio> koji: so leading-trim: cap will only affect the background?<br>
&lt;emilio> fantasai: if set on a block it sets changes the position of the line<br>
&lt;emilio> ... but I propose that when you're using it on an inline it only changes the edge of the background<br>
&lt;RossenF2F> q?<br>
&lt;emilio> [[ blackboard time ]]<br>
&lt;emilio> koji: I want to ship the block part first so I'd prefer this to be a separate property<br>
&lt;emilio> ... so that authors can detect support for it with @support<br>
&lt;emilio> fantasai: we have the same issue with alignment properties<br>
&lt;emilio> ... it's not great<br>
&lt;emilio> dbaron: I think it's a little risky to do that<br>
&lt;RossenF2F> q?<br>
&lt;fantasai> s/that/that, but it's allowed/<br>
&lt;myles> s/I think it was a mistake to make line-height apply to inlines and this feels similar//<br>
&lt;emilio> ... but I think once you have it working for one type it shouldn't be a lot of work to have it working for inlines too<br>
&lt;RossenF2F> Image of blackboard at https://lists.w3.org/Archives/Public/www-archive/2020Jan/0009.html<br>
&lt;emilio> koji: if the WG is fine with use shipping the block part first that's fine for me<br>
&lt;emilio> fantasai: yeah seems better to have an awkward transition than needing a property per box type<br>
&lt;emilio> koji: it's a bit risky...<br>
&lt;emilio> fantasai: backgrounds on inlines are fairly uncommon<br>
&lt;emilio> iank_: I don't think you could detect this via script<br>
&lt;emilio> fantasai: I think it'd change getBoundingClientRecT()<br>
&lt;emilio> ... it wouldn't change layout because the layout of an inline doesn't depend on the content area<br>
&lt;emilio> ... but you can observe it via script<br>
&lt;emilio> RESOLVED: leading-trim applies to inlines by changing the content box edges<br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3955#issuecomment-578101837 using your GitHub account

Received on Friday, 24 January 2020 11:57:16 UTC