Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Borders Test: border-shape defaults to half-border-box for single shape</title>
<link rel="match" href="border-shape-half-border-box-default-ref.html">
<style>
body {
margin: 0;
}
.container {
display: flex;
gap: 32px;
padding: 20px;
}
.target {
width: 100px;
height: 100px;
background: lightblue;
}
/* Circle with 10px border - shape should be centered in border */
#circle {
border: 10px solid red;
border-shape: circle(50%);
}
/* Ellipse with asymmetric borders */
#ellipse {
border-top: 8px solid green;
border-right: 12px solid green;
border-bottom: 8px solid green;
border-left: 12px solid green;
border-shape: ellipse(50% 50%);
}
/* Inset with uniform borders */
#inset {
border: 15px solid blue;
border-shape: inset(10% round 20%);
}
</style>
<div class="container">
<div class="target" id="circle"></div>
<div class="target" id="ellipse"></div>
<div class="target" id="inset"></div>
</div>