Re: [csswg-drafts] New `border-radius` value for perfectly matching nested radii (#7707)

This is similar to the discussion around [`currentBackgroundColor`](#5292). `match-nearest-parent`, or `fit-parent`, or even `parallel` might not be what you want, depending on the structure of your HTML. You might want to apply this value on something that isn't an immediate child, for example:

```html
<div class="card">
  <div class="extra-layout-element-for-card-that-has-no-border-radius">
    <picture>
      <img ... >
    </picture>
    <footer>element that would get the radius, but immediate parent doesn't have border-radius</footer>
  </div>
</div>
```

+1 to @justinfagnani  - I think container queries would be useful here, and specifically matching a container's style value. That way, you can specify what value you want to use from what specific parent. But to his last question, I think something more reusable like `inherit()` is better than a built-in keyword, since its more scalable. In the same way we would look to inherit the `border-radius` and `padding` to calculate the `border-radius` of the child element, we could use the `background-color`, `border-width` (which could also affect the calculation), or any other non-inheritable property.

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


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

Received on Monday, 6 March 2023 19:18:26 UTC