-
Notifications
You must be signed in to change notification settings - Fork 671
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[css-inline-3] Apply leading-trim to inlines? #3955
Labels
Comments
The CSS Working Group just discussed
The full IRC log of that discussion<fantasai> Topic: Apply leading-trim to inlines? #3955<RossenF2F> github: https://github.com//issues/3955 <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 <emilio> ... may be useful to make it apply to inlines <emilio> ... so that you can change the edge of the background boxes of inlines <emilio> ... right now people try to find padding values to make text look centered <emilio> ... this property allows to control the edge of blocks, but we could make it apply to inlines too <emilio> myles: I think it was a mistake to make line-height apply to inlines and this feels similar <emilio> fantasai: this doesn't really need to affect layout <emilio> ... right now when you add padding / borders to an inline it doesn't affect the position of the inline <RossenF2F> ack dbaron <emilio> dbaron: feels like making this apply to inlines make people use backgrounds on inlines reliably, so it seems good to me <florian> +1 <emilio> ... particularly noting that it doesn't affect the line-height calculations, only the content-box <emilio> koji: this proposal looks like we're trying to change text-top based on something which sounds like a circular dependency <emilio> ... with leading-trim <emilio> fantasai: well not really this allows to override the content edge of backgrounds, I don't think it's inconsistent or circular <emilio> koji: so leading-trim: cap will only affect the background? <emilio> fantasai: if set on a block it sets changes the position of the line <emilio> ... but I propose that when you're using it on an inline it only changes the edge of the background <RossenF2F> q? <emilio> [[ blackboard time ]] <emilio> koji: I want to ship the block part first so I'd prefer this to be a separate property <emilio> ... so that authors can detect support for it with @support <emilio> fantasai: we have the same issue with alignment properties <emilio> ... it's not great <emilio> dbaron: I think it's a little risky to do that <RossenF2F> q? <fantasai> s/that/that, but it's allowed/ <myles> s/I think it was a mistake to make line-height apply to inlines and this feels similar// <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 <RossenF2F> Image of blackboard at https://lists.w3.org/Archives/Public/www-archive/2020Jan/0009.html <emilio> koji: if the WG is fine with use shipping the block part first that's fine for me <emilio> fantasai: yeah seems better to have an awkward transition than needing a property per box type <emilio> koji: it's a bit risky... <emilio> fantasai: backgrounds on inlines are fairly uncommon <emilio> iank_: I don't think you could detect this via script <emilio> fantasai: I think it'd change getBoundingClientRecT() <emilio> ... it wouldn't change layout because the layout of an inline doesn't depend on the content area <emilio> ... but you can observe it via script <emilio> RESOLVED: leading-trim applies to inlines by changing the content box edges |
fantasai
added a commit
that referenced
this issue
May 27, 2020
fantasai
added a commit
that referenced
this issue
May 28, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We added the ability to trim not just leading, but also space within the glyph to various metrics for the first/last line boxes of a block container. Do we need this ability for inlines, too? It might help with avoiding various magic numbers when setting padding on inlines with backgrounds or borders.
The text was updated successfully, but these errors were encountered: