-
Notifications
You must be signed in to change notification settings - Fork 779
Open
Labels
Description
The specification introduces the param() function from the link-parameters property also inside url() as a modifier because the URL inside that cannot be altered to contain a parameter fragment identifier. However, with src() and string() from #542, this would be possible.
:root {
--primary-color: green;
}
.property {
background-image: url("image.svg");
link-parameters: param(--color, var(--primary-color));
}
.fragment { /* static */
background-image: url("image.svg#param(--color, green)");
}
.url {
background-image: url("image.svg"
param(--color, var(--primary-color))
);
}
.src {
background-image: src(string("image.svg#param(--color," var(--primary-color) ")"
);
}Do we really need all those different ways? Should string concatenation replace the URL modifier variant in 2.3?
I also don’t quite see why a special function, i.e. param(), would be required for the property variant in 2.1. link-parameter (should be singular) could just take a comma separated list of pairs of a dashed ident and a value. That value cannot contain a comma itself anyway.
Reactions are currently unavailable