forked from mystiq/hydrogen-web
Use two url() in test
This commit is contained in:
parent
f897e5132c
commit
3ae2b4dab4
1 changed files with 7 additions and 0 deletions
|
@ -31,14 +31,21 @@ module.exports.tests = function tests() {
|
||||||
"url is replaced with variable": async (assert) => {
|
"url is replaced with variable": async (assert) => {
|
||||||
const inputCSS = `div {
|
const inputCSS = `div {
|
||||||
background: no-repeat center/80% url("../img/image.png");
|
background: no-repeat center/80% url("../img/image.png");
|
||||||
|
}
|
||||||
|
button {
|
||||||
|
background: url("/home/foo/bar/cool.jpg");
|
||||||
}`;
|
}`;
|
||||||
const outputCSS =
|
const outputCSS =
|
||||||
`div {
|
`div {
|
||||||
background: no-repeat center/80% url(var(--icon-url-0));
|
background: no-repeat center/80% url(var(--icon-url-0));
|
||||||
|
}
|
||||||
|
button {
|
||||||
|
background: url(var(--icon-url-1));
|
||||||
}`+
|
}`+
|
||||||
`
|
`
|
||||||
:root {
|
:root {
|
||||||
--icon-url-0: "../img/image.png";
|
--icon-url-0: "../img/image.png";
|
||||||
|
--icon-url-1: "/home/foo/bar/cool.jpg";
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
await run( inputCSS, outputCSS, { }, assert);
|
await run( inputCSS, outputCSS, { }, assert);
|
||||||
|
|
Loading…
Reference in a new issue