Re: [csswg-drafts] [css-box] Suggestion: Add "of <property>" syntax for percentage values of padding and margin properties (#6814)

@Loirooriol Thank You for the hint to #2864. I didn't know that an `inhert()` function is planned. I also dont find a specification text for [css-values-5] already, and the [[css-values-4] specification text](https://www.w3.org/TR/css-values) seem not to mention an `inherit()` function.

As `inherit()` relates to a parent element and not the containing block, `inherit()` will solve slightly different positioning and sizing problems in CSS. My suggestion relates percentage values to property values of the containing block. As documented on [MDN about Containing Block](https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block), the containing block can be a different box than the context box of the the nearest block-level ancestor.

I also thought once again about cycles, especially using expressions like `10% of height`, and I realized that relating to the height of the containing block is already possible for the `height` property: Using `height: 10%;` means exactly the same as `height: 10% of height;`. Therefore, relating the `margin` or `padding` properties to the `height` value of the containing block should also be possible.

Thank You once again for the link to [css-sizing-3].

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


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

Received on Saturday, 13 November 2021 10:17:07 UTC