Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions css/css-images/image-color-basic-ref.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS reftest reference: image(&lt;color&gt;) renders as a solid color</title>
<style>
div {
width: 100px;
height: 100px;
display: inline-block;
margin: 4px;
background-color: green;
}
</style>
<p>Test passes if there are four green squares below.</p>
<div class="a"></div>
<div class="b"></div>
<div class="c"></div>
<div class="d"></div>
24 changes: 24 additions & 0 deletions css/css-images/image-color-basic.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Images Module Level 4: image(&lt;color&gt;) renders as a solid color</title>
<link rel="author" title="Jason Leo" href="mailto:cgqaq@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-images-4/#image-notation">
<link rel="match" href="image-color-basic-ref.html">
<style>
div {
width: 100px;
height: 100px;
display: inline-block;
margin: 4px;
background-color: red;
}
.opaque { background-image: image(green); }
.rgb-syntax { background-image: image(rgb(0 128 0)); }
.currentcolor { color: green; background-image: image(currentcolor); }
.transparent { background: image(transparent) green; }
</style>
<p>Test passes if there are four green squares below.</p>
<div class="opaque"></div>
<div class="rgb-syntax"></div>
<div class="currentcolor"></div>
<div class="transparent"></div>
14 changes: 14 additions & 0 deletions css/css-images/image-color-cross-fade-ref.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS reftest reference: image(&lt;color&gt;) inside cross-fade()</title>
<style>
div {
width: 100px;
height: 100px;
margin: 4px;
background-color: green;
}
</style>
<p>Test passes if there are two solid green squares.</p>
<div></div>
<div></div>
22 changes: 22 additions & 0 deletions css/css-images/image-color-cross-fade.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Images Module Level 4: image(&lt;color&gt;) inside cross-fade()</title>
<link rel="author" title="Jason Leo" href="mailto:cgqaq@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-images-4/#image-notation">
<link rel="help" href="https://drafts.csswg.org/css-images-4/#cross-fade-function">
<link rel="match" href="image-color-cross-fade-ref.html">
<style>
div {
width: 100px;
height: 100px;
margin: 4px;
}
/* cross-fade() of two image(<color>) operands should match a cross-fade()
of the bare colors: the spec treats a <color> operand as a solid-color
image, so image(<color>) and <color> are interchangeable here. */
.both-images { background-image: cross-fade(image(green), image(green)); }
.one-image { background-image: cross-fade(image(green), green); }
</style>
<p>Test passes if there are two solid green squares.</p>
<div class="both-images"></div>
<div class="one-image"></div>
15 changes: 15 additions & 0 deletions css/css-images/image-color-layered-ref.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS reftest reference: image(&lt;color&gt;) as a background-image layer</title>
<style>
div {
width: 100px;
height: 100px;
display: inline-block;
margin: 4px;
background-color: green;
}
</style>
<p>Test passes if there are two green squares below.</p>
<div class="a"></div>
<div class="b"></div>
27 changes: 27 additions & 0 deletions css/css-images/image-color-layered.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Images Module Level 4: image(&lt;color&gt;) as a background-image layer</title>
<link rel="author" title="Jason Leo" href="mailto:cgqaq@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-images-4/#image-notation">
<link rel="match" href="image-color-layered-ref.html">
<style>
div {
width: 100px;
height: 100px;
display: inline-block;
margin: 4px;
background-color: red;
}
/* The first listed background-image paints on top, so an opaque
image(green) fully covers the lower image(red) layer. */
.opaque-top {
background-image: image(green), image(red);
}
/* image(transparent) on top lets the lower image(green) layer show through. */
.transparent-top {
background-image: image(transparent), image(green);
}
</style>
<p>Test passes if there are two green squares below.</p>
<div class="opaque-top"></div>
<div class="transparent-top"></div>
Loading