Re: [csswg-drafts] [css-values-4] inherit() function: like var() for parent value, for any property (#2864)

> I really think those are just container query length units use cases. Exposing them without the containment could lead to > > since padding percentages are based off of the current element's size, and not the parent
> 
> No. Percentages refer to the inline size of the containing block (which is typically established by the parent, but not necessarily). See https://drafts.csswg.org/css-box-4/#propdef-padding

You're absolutely right on this -- don't know why I mixed these up!

> I think you first need to figure out what you are actually trying to do, and then, if if your use case would benefit from new functionality, open a new issue.

Not sure if you are asking for a specific reduction here or what, but in my experience this is generally difficult to do for cases like this (especially since there's always *some* workaround). I think just referring to the large number of questions around how to get padding to be a percentage of height should demonstrate a need for wanting to have the same existing functionality as we currently get with percentage, but for height as well as width. In a world where `padding`  percentages were based on height instead of width, I'd now be asking for some way to base it off of `width`. I don't believe there's some "proof" that width-based padding is important enough to bake in, but height-based padding isn't. 


-- 
GitHub Notification of comment by tolmasky
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2864#issuecomment-1872330010 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Friday, 29 December 2023 20:46:30 UTC