O'Reilly logo

Mastering Ember.js by Mitchel Kelonye

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Serving images and fonts

Images and fonts specified in styles can be referenced using their corresponding relative paths, as shown in the first line of the game component's style sheet:

@import url(fonts/clear-sans.css);

Component automatically resolves these paths:

@import url("game/styles/fonts/clear-sans.css");

Notice that the assets are symbolically linked to the build folder. If needed, we can prefix these paths with the required static root. For example, if Django was used to server these files, we would add a prefix flag to the build command:

component build –prefix /static

This would result in a path such as this:

@import url("/static/game/styles/fonts/clear-sans.css");

On some platforms, symbolical links may cause problems, so you can pass ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required