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

> `<property>` can be any property name of the containing block which has a length value.

Seems important to note that, technically speaking, the containing block is just a rectangle. Yes, it's typically established by an element, and we can refer to the properties of that element. But for example, sometimes the containing block is established by the content area, and sometimes by the padding area. What should `of width` refer to, the computed value of `width`, whose final meaning depends on `box-sizing`? May be a bit confusing if `width: 100% of width` and `width: 100%` mean slightly different things. And what if the computed value is not a `<length-percentage>`?

I'm also not sure if there are clear usecases for `of padding-left`, etc. that are not already covered by `inherit()`. It seems to me that, when referring specifically to the containing block, we are basically interested in its width and height (and by this I mean the actual size of the rectangle, not the properties of the establishing element).

So, rather than a `of <property>` syntax, maybe we should have new units for that? I think that's what #1645 proposes.

BTW, there are units for query containers https://drafts.csswg.org/css-contain-3/#container-query-length

-- 
GitHub Notification of comment by Loirooriol
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/6814#issuecomment-968114694 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 18:33:38 UTC