]> cat aescling's git repositories - mastodon.git/commitdiff
Use ~ notation in components for image references
authorDavid Yip <yipdw@member.fsf.org>
Sat, 30 Dec 2017 23:15:20 +0000 (17:15 -0600)
committerDavid Yip <yipdw@member.fsf.org>
Sat, 30 Dec 2017 23:15:20 +0000 (17:15 -0600)
This uses (more or less) absolute references to external assets, which
allows imported stylesheets (like components.scss) to work from other
locations that may not have the expected path structure (e.g. the win95
theme).

app/javascript/styles/mastodon/components.scss

index 207406cc08f4c676a45ab169a0de61ef9f3e5e9f..0366d7cba870da60501a15befa4e994b233257ee 100644 (file)
   position: absolute;
   top: 0;
   left: 0;
-  background: lighten($ui-base-color, 13%) url('../images/wave-drawer.png') no-repeat bottom / 100% auto;
+  background: lighten($ui-base-color, 13%) url('~images/wave-drawer.png') no-repeat bottom / 100% auto;
   box-sizing: border-box;
   padding: 0;
   display: flex;
   }
 
   > .mastodon {
-    background: url('../images/mastodon-drawer.png') no-repeat left bottom / contain;
+    background: url('~images/mastodon-drawer.png') no-repeat left bottom / contain;
     flex: 1;
   }
 }