Open R4YM3 opened 2 years ago
For now i fixed the issue by creating a stylesheet for each theme, each stylesheet contains @font-face definitions related to the theme. Then sourced the required stylesheet depending on theme.
I prefered it not to be sourced because this adds another request, but it's fine for now. I am keeping bug open since I did got stuck on this.
I would like to preload the fonts, if i want to have it now then I have two bookkeepings of the fonts.
One in the stylesheet and the other in my <head/>
to preload the fonts, which is not nice.
Environment
linaria: "2.3.1" @linaria/babel-preset: "3.0.0-beta.15", @linaria/shaker: "3.0.0-beta.15", @callstack/react-theme-provider": "3.0.7",
implemented in nextjs: 12.0.4 Node: 16.13.0 OS: MacOS 11.6 (Arm)
Static font face does work, example:
I noticed in the output that url is written dirrectly in url(..)
Dynamic font-face does not work example
src: url("${woff}") format('woff2'), url("${woff2}") format('woff');
I noticed in the output that url is written dirrectly as a variable in url(..)