commit 619379f7a836163d77a32b71c41d0db40a8278a2 parent 21c146331d708aa910140da5c08ec265c7f394f0 Author: Divyansh Mangal <36193441+goldenboy777@users.noreply.github.com> Date: Fri, 31 Oct 2025 08:54:01 +0000 Bug 1995996 [wpt PR 55617] - WPTs for CSS Linked Parameters, a=testonly Automatic update from web-platform-tests WPTs for CSS Linked Parameters (#55617) * New wpts for css linked parameters * remove circle-greem.svg as not required --------- Co-authored-by: Divyansh Mangal <dmangal@microsoft.com> -- wpt-commits: 16a860d5cbc2caf21c1d7d46c60a5b87cd3aa164 wpt-pr: 55617 Diffstat:
11 files changed, 108 insertions(+), 0 deletions(-)
diff --git a/testing/web-platform/tests/svg/styling/css-linked-parameters/circle-green-ref.html b/testing/web-platform/tests/svg/styling/css-linked-parameters/circle-green-ref.html @@ -0,0 +1,4 @@ +<!DOCTYPE html> +<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"> + <circle cx="50" cy="50" r="48" fill="green" stroke-width="2"/> +</svg> diff --git a/testing/web-platform/tests/svg/styling/css-linked-parameters/circle-green-with-stroke-ref.html b/testing/web-platform/tests/svg/styling/css-linked-parameters/circle-green-with-stroke-ref.html @@ -0,0 +1,4 @@ +<!DOCTYPE html> +<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"> + <circle cx="50" cy="50" r="48" fill="green" stroke-width="2" stroke="blue"/> +</svg> diff --git a/testing/web-platform/tests/svg/styling/css-linked-parameters/circle-with-parameters.svg b/testing/web-platform/tests/svg/styling/css-linked-parameters/circle-with-parameters.svg @@ -0,0 +1,3 @@ +<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"> + <circle cx="50" cy="50" r="48" fill="param(--color, black)" stroke="param(--stroke)" stroke-width="2"/> +</svg> diff --git a/testing/web-platform/tests/svg/styling/css-linked-parameters/css-linked-parameters-precedence-1.html b/testing/web-platform/tests/svg/styling/css-linked-parameters/css-linked-parameters-precedence-1.html @@ -0,0 +1,13 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS Link Parameters - URL fragment takes precedence over link-parameters property</title> +<link rel="author" title="Divyansh Mangal" href="mailto:dmangal@microsoft.com"> +<link rel="help" href="https://drafts.csswg.org/css-link-params/#setting"> +<link rel="match" href="circle-green-ref.html"/> +<style> + img { + link-parameters: param(--color, red); + } +</style> + +<img src="circle-with-parameters.svg#param(--color, green)"> diff --git a/testing/web-platform/tests/svg/styling/css-linked-parameters/css-linked-parameters-precedence-2.html b/testing/web-platform/tests/svg/styling/css-linked-parameters/css-linked-parameters-precedence-2.html @@ -0,0 +1,14 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS Link Parameters - url function with modifier take precedence over URL fragment identifier</title> +<link rel="author" title="Divyansh Mangal" href="mailto:dmangal@microsoft.com"> +<link rel="help" href="https://drafts.csswg.org/css-link-params/#setting"> +<link rel="match" href="circle-green-ref.html"/> +<style> + .image-with-params { + width:100px; + height:100px; + background-image: url("circle-with-parameters.svg#param(--color,red)" param(--color, green)); + } +</style> +<div class="image-with-params"></div> diff --git a/testing/web-platform/tests/svg/styling/css-linked-parameters/img-with-linked-parameters-1.html b/testing/web-platform/tests/svg/styling/css-linked-parameters/img-with-linked-parameters-1.html @@ -0,0 +1,13 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS Link Parameters - img element with link-parameters property</title> +<link rel="author" title="Divyansh Mangal" href="mailto:dmangal@microsoft.com"> +<link rel="help" href="https://drafts.csswg.org/css-link-params/#link-param-prop"> +<link rel="match" href="circle-green-ref.html"/> +<style> + img { + link-parameters: param(--color, green); + } +</style> + +<img src="circle-with-parameters.svg"> diff --git a/testing/web-platform/tests/svg/styling/css-linked-parameters/img-with-linked-parameters-2.html b/testing/web-platform/tests/svg/styling/css-linked-parameters/img-with-linked-parameters-2.html @@ -0,0 +1,13 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS Link Parameters - img element with multiple link-parameters</title> +<link rel="author" title="Divyansh Mangal" href="mailto:dmangal@microsoft.com"> +<link rel="help" href="https://drafts.csswg.org/css-link-params/#link-param-prop"> +<link rel="match" href="circle-green-with-stroke-ref.html"/> +<style> + img { + link-parameters: param(--color, green), param(--stroke, blue); + } +</style> + +<img src="circle-with-parameters.svg"> diff --git a/testing/web-platform/tests/svg/styling/css-linked-parameters/img-with-url-fragment-identifiers-1.html b/testing/web-platform/tests/svg/styling/css-linked-parameters/img-with-url-fragment-identifiers-1.html @@ -0,0 +1,7 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS Link Parameters - img element with url fragment identifier</title> +<link rel="author" title="Divyansh Mangal" href="mailto:dmangal@microsoft.com"> +<link rel="help" href="https://drafts.csswg.org/css-link-params/#url-frag"> +<link rel="match" href="circle-green-ref.html"/> +<img src="circle-with-parameters.svg#param(--color, green)"> diff --git a/testing/web-platform/tests/svg/styling/css-linked-parameters/img-with-url-fragment-identifiers-2.html b/testing/web-platform/tests/svg/styling/css-linked-parameters/img-with-url-fragment-identifiers-2.html @@ -0,0 +1,7 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS Link Parameters - img element with multiple url fragment identifiers</title> +<link rel="author" title="Divyansh Mangal" href="mailto:dmangal@microsoft.com"> +<link rel="help" href="https://drafts.csswg.org/css-link-params/#url-frag"> +<link rel="match" href="circle-green-with-stroke-ref.html"/> +<img src="circle-with-parameters.svg#param(--color, green), param(--stroke, blue)"> diff --git a/testing/web-platform/tests/svg/styling/css-linked-parameters/img-with-url-function-1.html b/testing/web-platform/tests/svg/styling/css-linked-parameters/img-with-url-function-1.html @@ -0,0 +1,15 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS Link Parameters - img element with url function and url modifier</title> +<link rel="author" title="Divyansh Mangal" href="mailto:dmangal@microsoft.com"> +<link rel="help" href="https://drafts.csswg.org/css-link-params/#setting-url"> +<link rel="help" href="https://www.w3.org/TR/css-values/#url-values"/> +<link rel="match" href="circle-green-ref.html"/> +<style> + .image-with-params { + width:100px; + height:100px; + background-image: url("circle-with-parameters.svg" param(--color, green)); + } +</style> +<div class="image-with-params"></div> diff --git a/testing/web-platform/tests/svg/styling/css-linked-parameters/img-with-url-function-2.html b/testing/web-platform/tests/svg/styling/css-linked-parameters/img-with-url-function-2.html @@ -0,0 +1,15 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS Link Parameters - img element with url function and multiple url modifiers</title> +<link rel="author" title="Divyansh Mangal" href="mailto:dmangal@microsoft.com"> +<link rel="help" href="https://drafts.csswg.org/css-link-params/#setting-url"> +<link rel="help" href="https://www.w3.org/TR/css-values/#url-values"/> +<link rel="match" href="circle-green-with-stroke-ref.html"/> +<style> + .image-with-params { + width:100px; + height:100px; + background-image: url("circle-with-parameters.svg" param(--color, green) param(--stroke, blue)); + } +</style> +<div class="image-with-params"></div>