mirror of
https://github.com/wagtail/wagtail.git
synced 2024-12-01 11:41:20 +01:00
Use relative paths for static-root / css-root - fixes #134
Using paths like /static/wagtailadmin/images/ in our SCSS breaks when a STATIC_URL other than /static/ is in use - for example, when static assets are hosted on an external domain. However, django-compressor consistently puts the compiled CSS at ${STATIC_URL}/CACHE/css/ regardless of operation mode, so we can reliably use ../../ to reach the correct STATIC_URL.
This commit is contained in:
parent
c2185dd6d2
commit
39566a898d
@ -1,6 +1,12 @@
|
||||
/* paths */
|
||||
$static-root: "/static/wagtailadmin/images/";
|
||||
$css-root: "/static/wagtailadmin/scss/";
|
||||
|
||||
/* We can't use absolute paths here, because those are dependent on Django's
|
||||
STATIC_URL setting. However, django-compressor consistently places the compiled
|
||||
CSS into ${STATIC_URL}/CACHE/css/ regardless of compilation mode, so we can
|
||||
reliably use relative paths to get back to STATIC_URL. */
|
||||
|
||||
$static-root: "../../wagtailadmin/images/";
|
||||
$css-root: "../../wagtailadmin/scss/";
|
||||
|
||||
/* grid settings */
|
||||
$grid-columns: 12;
|
||||
|
Loading…
Reference in New Issue
Block a user