Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-images/conic-gradient-line-height-relative-units-003.html - WPT Dashboard Interop Dashboard
<!doctype html>
<title>conic-gradient() with line-height relative unit <position> (horizontal)</title>
<link rel="match" href="radial-gradient-line-height-relative-units-ref.html">
<style>
.base {
position: absolute;
width: 200px;
height: 200px;
background: green;
z-index: -2;
}
.ref {
position: absolute;
width: 200px;
height: 200px;
mask-image: conic-gradient(from 45deg at 100px 50px, green 25%, transparent 0);
background: green;
z-index: 0;
}
.box {
position: absolute;
z-index: -1;
width: 200px;
font-size: 50px;
line-height: 2;
aspect-ratio: 1;
mask-image: conic-gradient(from 45deg at 1lh 50px, green 25%, transparent 0);
background: red;
}
</style>
<div class="base">
<div class="ref"></div>
<div class="box"></div>
</div>