[css3-background] Margin-radius edge case

Hi there,

I just wanted to mention an edge case that might need clarification for corner-shaping the margin corner radii [1]. My interpretation of the rule would cause a negative margin to yield a ratio less than one, and therefore trigger the smoothing case [2], leading to odd results. For example, a border-radius of 10px and margin of -1px might lead to a margin radius of 1340px.

This is one interpretation, but the text could probably be more clear in terms of what happens with negative margins. I would suggest either using the absolute value of the ratio, or not using the smoothing function with negative margins. The terms 'margin' and 'margin-thickness' might also be confusing in the case of negative margins. Perhaps just an example in this case is necessary, or just a little clarification in the text.

Thanks for your time,
-Bear Travis

[1] http://dev.w3.org/csswg/css-backgrounds/#corner-shaping
[2] margin-radius = border-radius + margin * (1 + (r - 1)^3) when border-radius / margin < 1

Received on Monday, 28 April 2014 23:34:07 UTC