Status: PASS | Duration: 5ms | Subtests: 1/1 | Open test on wpt.live | Open ref on wpt.live | wpt.fyi
/css/css-borders/border-shape/border-shape-circle-extent-keywords.html
<!doctype html> <title>CSS Borders: border-shape circle() radial-extent keywords</title> <link rel="help" href="https://drafts.csswg.org/css-borders-4/#border-shape"> <link rel="help" href="https://drafts.csswg.org/css-images-3/#typedef-radial-size"> <link rel="match" href="border-shape-circle-extent-keywords-ref.html"> <meta name="assert" content="circle() radial-extent keywords resolve to the distance to the closest/farthest side or corner."> <style> .box { width: 300px; height: 400px; margin: 50px; background: green; } #closest-side { border-shape: circle(closest-side at 60px 80px); } #farthest-side { border-shape: circle(farthest-side at 60px 80px); } #closest-corner { border-shape: circle(closest-corner at 60px 80px); } #farthest-corner { border-shape: circle(farthest-corner at 60px 80px); } </style> <div id="closest-side" class="box"></div> <div id="farthest-side" class="box"></div> <div id="closest-corner" class="box"></div> <div id="farthest-corner" class="box"></div>
/css/css-borders/border-shape/border-shape-circle-extent-keywords-ref.html
<!doctype html> <title>CSS Borders: border-shape circle() radial-extent keywords reference</title> <link rel="help" href="https://drafts.csswg.org/css-borders-4/#border-shape"> <style> .box { width: 300px; height: 400px; margin: 50px; background: green; } /* closest side is the left edge: min(60, 300-60, 80, 400-80) = 60 */ #closest-side { border-shape: circle(60px at 60px 80px); } /* farthest side is the bottom edge: max(60, 300-60, 80, 400-80) = 320 */ #farthest-side { border-shape: circle(320px at 60px 80px); } /* closest corner is (0,0): hypot(60, 80) = 100 */ #closest-corner { border-shape: circle(100px at 60px 80px); } /* farthest corner is (300,400): hypot(240, 320) = 400 */ #farthest-corner { border-shape: circle(400px at 60px 80px); } </style> <div id="closest-side" class="box"></div> <div id="farthest-side" class="box"></div> <div id="closest-corner" class="box"></div> <div id="farthest-corner" class="box"></div>