mirror of
https://github.com/less/less.js.git
synced 2026-05-01 03:00:22 -04:00
Relative URLs in LESS files should be relative to the file that defines them.
It is up to the parser and compiler to rewrite them when those files are imported by another LESS file. - Modified and added test cases for import and import-once rules - Fixed difference between client side and server side handling of relative urls - Added a -rootpath option to lessc to specify another base path for the url rewriting. By default, rootpath=''
This commit is contained in:
committed by
Luke Page
parent
22a4a0c874
commit
e59a93b5fd
@@ -1,6 +1,6 @@
|
||||
@import "import-test-d.css";
|
||||
@import "import/import-test-d.css";
|
||||
|
||||
@import "../import-test-d.css";
|
||||
@import "import/deeper/../import-test-d.css";
|
||||
#import {
|
||||
color: #ff0000;
|
||||
}
|
||||
|
||||
16
test/css/import.css
vendored
16
test/css/import.css
vendored
@@ -1,8 +1,10 @@
|
||||
@import "import-test-d.css";
|
||||
@import "import/import-test-d.css";
|
||||
|
||||
@import url(http://fonts.googleapis.com/css?family=Open+Sans);
|
||||
|
||||
@import url(something.css) screen and (color) and (max-width: 600px);
|
||||
|
||||
@import "import/../css/background.css";
|
||||
#import {
|
||||
color: #ff0000;
|
||||
}
|
||||
@@ -21,3 +23,15 @@
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
#logo {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
background: url('import/imports/../assets/logo.png');
|
||||
}
|
||||
@font-face {
|
||||
font-family: xecret;
|
||||
src: url('import/imports/../assets/xecret.ttf');
|
||||
}
|
||||
#secret {
|
||||
font-family: xecret, sans-serif;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user