Skip to content

theme assets folder during watch and production #54

Answered by gregsullivan
phoheisel asked this question in Q&A
Discussion options

You must be logged in to vote

No problem at all! I understand now.

For fonts and images declared in CSS, I use relative links. Keeping in mind that the CSS all compiles into ./theme/style.css, you can use something like url('assets/fonts/font-name.woff2'). Here's an example from a project I'm working on:

@font-face {
	font-family: "Freight Sans Pro";
	src: url("fonts/freight-sans-pro-book.woff2") format("woff2"),
	     url("fonts/freight-sans-pro-book.woff") format("woff");
	font-weight: 400;
	font-style: normal;
}

Replies: 1 comment 8 replies

Comment options

You must be logged in to vote
8 replies
@phoheisel
Comment options

@gregsullivan
Comment options

Answer selected by phoheisel
@phoheisel
Comment options

@gregsullivan
Comment options

@andrew0g
Comment options

@gregsullivan
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants