wpt / css / css-borders / border-shape / border-shape-double-shape-default.html

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-double-shape-default.html

<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Borders Test: double-shape border-shape defaults to border-box</title>
<link rel="help" href="https://drafts.csswg.org/css-borders-4/#border-shape">
<link rel="match" href="border-shape-double-shape-default-ref.html">
<style>
body {
  margin: 0;
}
.container {
  display: flex;
  gap: 40px;
  padding: 30px;
}
.box {
  width: 100px;
  height: 100px;
  background: lightblue;
  border: 20px solid rgba(255, 0, 0, 0.5);
  fill: rgba(0, 255, 0, 0.3);
}
/* Double shape - should default to border-box + padding-box */
#double-implicit {
  border-shape: circle(50%) circle(40%);
}
/* Explicit border-box should match */
#double-explicit {
  border-shape: circle(50%) border-box circle(40%) padding-box;
}
</style>
<div class="container">
  <div class="box" id="double-implicit"></div>
  <div class="box" id="double-explicit"></div>
</div>

/css/css-borders/border-shape/border-shape-double-shape-default-ref.html

<!DOCTYPE html>
<link rel="help" href="https://drafts.csswg.org/css-borders-4/#border-shape">
<style>
body {
  margin: 0;
}
.container {
  display: flex;
  gap: 40px;
  padding: 30px;
}
.box {
  width: 100px;
  height: 100px;
  background: lightblue;
  border: 20px solid rgba(255, 0, 0, 0.5);
  fill: rgba(0, 255, 0, 0.3);
}
/* Both should be identical with explicit border-box */
#double-implicit {
  border-shape: circle(50%) border-box circle(40%) padding-box;
}
#double-explicit {
  border-shape: circle(50%) border-box circle(40%) padding-box;
}
</style>
<div class="container">
  <div class="box" id="double-implicit"></div>
  <div class="box" id="double-explicit"></div>
</div>