blob: 3621342d897d8fe11a63d6dd938ecfdeb3e17c5c [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<style type="text/css" media="screen">
h2 {
font-size: 12pt;
margin: 2px;
}
.box {
display: inline-block;
height: 100px;
width: 300px;
margin: 10px;
border: 1px solid black;
background-repeat: no-repeat;
}
.indicator {
background-color: black;
height: 20px;
width: 3em;
}
.linear1 {
background-image: linear-gradient(to right, red, green 33.33%, blue);
}
.linear2 {
background-image: linear-gradient(to right, red, green 100px, blue);
}
.linear3 {
font-size: 12pt;
background-image: linear-gradient(to right, red, green 3em, blue);
}
.linear4 {
font-size: 24pt;
background-image: linear-gradient(to right, red, green 3em, blue);
}
.linear5 {
font-size: 12pt;
background-image: linear-gradient(to right, red, green 6em, yellow 50%, blue);
}
.linear6 {
font-size: 24pt;
background-image: linear-gradient(to right, red, green 6em, yellow 50%, blue);
}
.linear7 {
background-image: linear-gradient(to right, red, green 100px, yellow 50%, blue);
}
.linear8 {
background-image: linear-gradient(to right, red, green 100px, yellow 50%, blue);
}
</style>
</head>
<body>
<h2>These should look the same</h2>
<div class="container">
<div class="linear1 box"></div>
<div class="linear2 box"></div>
</div>
<h2>Green stop should coincide with the end of the black line</h2>
<div class="container">
<div class="linear3 box"><div class="indicator" style="width: 3em;"></div></div>
<div class="linear4 box"><div class="indicator" style="width: 3em;"></div></div>
</div>
<h2>Should see a sharp green/yellow transition on the right, at the end of the line</h2>
<div class="container">
<div class="linear5 box"><div class="indicator" style="width: 6em;"></div></div>
<div class="linear6 box"><div class="indicator" style="width: 6em;"></div></div>
</div>
<h2>Should see a sharp green/yellow transition in the right box</h2>
<div class="container">
<div class="linear7 box"></div>
<div class="linear8 box" style="width: 200px;"></div>
</div>
</body>
</html>