mirror of
https://github.com/less/less.js.git
synced 2026-02-09 06:25:24 -05:00
Add failing test for imported mixin with wrong path
When relative URLs are on, and there's an image referenced via url(...), if the URL is unquoted, the generated CSS duplicates the base path
This commit is contained in:
@@ -40,3 +40,7 @@
|
||||
#secret {
|
||||
font-family: xecret, sans-serif;
|
||||
}
|
||||
#imported-relative-path {
|
||||
background-image: url(folder\ \(1\)/../../data/image.jpg);
|
||||
border-image: url('folder (1)/../../data/image.jpg');
|
||||
}
|
||||
|
||||
@@ -44,6 +44,14 @@
|
||||
#secret {
|
||||
font-family: xecret, sans-serif;
|
||||
}
|
||||
#imported-relative-path {
|
||||
background-image: url(import/../../data/image.jpg);
|
||||
border-image: url('import/../../data/image.jpg');
|
||||
}
|
||||
#relative-url-import {
|
||||
background-image: url(import/../../data/image.jpg);
|
||||
border-image: url('import/../../data/image.jpg');
|
||||
}
|
||||
#data-uri {
|
||||
uri: url('data:image/jpeg;base64,bm90IGFjdHVhbGx5IGEganBlZyBmaWxlCg==');
|
||||
}
|
||||
|
||||
@@ -4,3 +4,14 @@
|
||||
@import "imports/logo";
|
||||
@import "imports/font";
|
||||
|
||||
.unquoted-relative-path-bg() {
|
||||
background-image: url(../../data/image.jpg);
|
||||
}
|
||||
.quoted-relative-path-border-image() {
|
||||
border-image: url('../../data/image.jpg');
|
||||
}
|
||||
|
||||
#imported-relative-path {
|
||||
.unquoted-relative-path-bg;
|
||||
.quoted-relative-path-border-image;
|
||||
}
|
||||
@@ -34,6 +34,11 @@
|
||||
|
||||
@import "import/import-and-relative-paths-test";
|
||||
|
||||
#relative-url-import {
|
||||
.unquoted-relative-path-bg;
|
||||
.quoted-relative-path-border-image;
|
||||
}
|
||||
|
||||
#data-uri {
|
||||
uri: data-uri('image/jpeg;base64', '../data/image.jpg');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user