- From: L. David Baron via GitHub <sysbot+gh@w3.org>
- Date: Mon, 28 Jun 2021 22:18:16 +0000
- To: public-css-archive@w3.org
A bit of background here: The backgrounds spec [describes](https://drafts.csswg.org/css-backgrounds-3/#corner-shaping) how to map the rounding of the border edge to rounding of the padding edge, content edge, or margin edge. The last (margin edge) uses a more complicated formula because it has the goal of not creating a lot of curvature where there wasn't much curvature at the border. For example, with a 2px border-radius and a 10px margin, it produces curvature at the margin edge of 6.88px rather than the 12px produced by the naive formula. The [definition of box-shadow](https://drafts.csswg.org/css-backgrounds-3/#shadow-shape) separately describes the same formula. The overflow-clip-margin spec [says](https://drafts.csswg.org/css-overflow-3/#overflow-clip-margin): > The overflow clip edge is shaped in the corners exactly the same way as a box-shadow with a spread radius of the same cumulative offset from the box’s border edge. See [CSS Backgrounds 3 §4.2 Corner Shaping](https://www.w3.org/TR/css-backgrounds-3/#corner-shaping). which links to the previously-cited section about border-radius (but not the box-shadow section where the rules for box-shadow are defined, in the same way). ----- I think if this formula is generalized to apply to things involving more than one offset from the border edge, it would be best to (1) first combine the offsets and then (2) apply the border-radius adjustment formula a single time, to the combined offset. This will prevent inconsistent curvature resulting from multiple applications of the formula with different combinations of offsets that add to the same or similar results. -- GitHub Notification of comment by dbaron Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5896#issuecomment-870083423 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Monday, 28 June 2021 22:18:18 UTC