Skip to content

Loading Font from twind.config #440

Answered by sastan
sbonnick asked this question in Q&A
Jan 20, 2023 · 1 comments · 3 replies
Discussion options

You must be logged in to vote

Rules are for class bases style injection (a class name is used and then its styles are added to the stylesheet). What you want to use is the preflight option. Something like the following should work (not tested):

install({
	preflight: {
		'@font-face': {
        	'font-family': 'Some Sans',
	        src: "url('SomeSans-Regular.woff2')"
    	 }
	}
})

Edit: Here is an example: https://twind.run/slum-logo-saddle?file=config&result=css

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@sbonnick
Comment options

@sbonnick
Comment options

@sbonnick
Comment options

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