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

> I don't believe there's some "proof" that width-based padding is important enough to bake in, but height-based padding isn't.

The key to thinking about this is to think about them not as “width” and “height”, but as “inline” and “block”.

These are _very_ different: predominantly, the inline dimension stays the same, while the block one grows. Adding a padding in the inline direction, in a normal flow, _reduces_ the space, available for content and does not change the inline dimension of the parent. Adding a padding in the block direction is not constrained, and makes the element and its container grow in the block direction (thus, can lead to circularity).

And, because block and inline dimensions are so different, the use-cases for the percentage in them are also different! Percentage in the inline dimension usually reflects the available space: we can make the padding bigger when we have a wider screen (or wider container). What will the padding in a block dimension reflect?

-- 
GitHub Notification of comment by kizu
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2864#issuecomment-1872339959 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 21:12:33 UTC