Normalize zero-length repeating gradients to a solid average color before painting code expands or tiles their stops. CSS Images defines this case as an average over the same color stops with an arbitrary non-zero distance, avoiding division by a zero repeat length while painting. Add a reduced crash test covering zero-length repeating linear, radial, and conic gradients.
10 lines
387 B
HTML
10 lines
387 B
HTML
<!doctype html>
|
|
<style>
|
|
.gradient {
|
|
width: 100px;
|
|
height: 100px;
|
|
}
|
|
</style>
|
|
<div class="gradient" style="background: repeating-linear-gradient(red 0%, blue 0%)"></div>
|
|
<div class="gradient" style="background: repeating-radial-gradient(circle, red 0%, blue 0%)"></div>
|
|
<div class="gradient" style="background: repeating-conic-gradient(red 0deg, blue 0deg)"></div>
|