diff options
author | Dan Bornstein <danfuzz@milk.com> | 2016-09-09 12:59:02 -0700 |
---|---|---|
committer | Dan Bornstein <danfuzz@milk.com> | 2016-09-09 12:59:02 -0700 |
commit | 0a9d02562d7e14ecc9f9f1d929a65cc64924857a (patch) | |
tree | c8618f056dcf851b82d0ec78e1f2efeffb87d9a7 /src | |
parent | d7940cf8c50acbd7cddef1fb1b9b6400a2a69caa (diff) | |
download | etherpad-lite-0a9d02562d7e14ecc9f9f1d929a65cc64924857a.zip |
Handle relative paths properly, when `@import`ing.
Diffstat (limited to 'src')
-rw-r--r-- | src/node/utils/Minify.js | 3 | ||||
-rw-r--r-- | src/static/css/iframe_editor.css | 2 | ||||
-rw-r--r-- | src/static/css/timeslider.css | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/src/node/utils/Minify.js b/src/node/utils/Minify.js index 101dc97a..80652310 100644 --- a/src/node/utils/Minify.js +++ b/src/node/utils/Minify.js @@ -409,7 +409,8 @@ function compressJS(content) function compressCSS(filename, content, callback) { try { - new CleanCSS({relativeTo: ROOT_DIR}).minify(content, function (errors, minified) { + var base = path.join(ROOT_DIR, path.dirname(filename)); + new CleanCSS({relativeTo: base}).minify(content, function (errors, minified) { if (errors) { // On error, just yield the un-minified original. callback(null, content); diff --git a/src/static/css/iframe_editor.css b/src/static/css/iframe_editor.css index 5eb94cf7..9aa003aa 100644 --- a/src/static/css/iframe_editor.css +++ b/src/static/css/iframe_editor.css @@ -2,7 +2,7 @@ Also see inner.css, included only in the inner one. */ -@import url('css/lists_and_indents.css'); +@import url('./lists_and_indents.css'); html { cursor: text; } /* in Safari, produces text cursor for whole doc (inc. below body) */ span { cursor: auto; } diff --git a/src/static/css/timeslider.css b/src/static/css/timeslider.css index c2e8aea7..0311b10e 100644 --- a/src/static/css/timeslider.css +++ b/src/static/css/timeslider.css @@ -1,4 +1,4 @@ -@import url('css/lists_and_indents.css'); +@import url('./lists_and_indents.css'); p.pblort { height: 100px; |