Fonts and Lit 3 (WebView vs Chrome), and some routing #4021
Unanswered
precisionpete
asked this question in
Q&A
Replies: 1 comment
-
This is the kind of question that is generally answered quickly in discord |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am trying to get a Lit 3 app working inside Wails 2.9.2. I have a couple of problems that I cannot solve. I want to ask what the "Correct" way to do this is... This is related to Web Components and WebView.
I am having trouble accessing fonts within the web components. e.g. I include the fonts in a global-styles.css. Then, refer to it within the component. The generic "monospace" font gets through, but not the font file. It works pretty well with Chrome (http://localhost:34115/). But not with Wails. If I get it to work with Wails, it's broken in Chrome.
Routing in Lit seems to break the wails runtime. i.e. it works on the initial load. But once you route, the runtime is gone. I hacked it to load it in index.html, but that does not seem to be the correct way to do it.
For some reason, with Lit, I cannot control the default background colour. It's always black. The only way I can get back to white is to hard code it in index.html. Again, this seems like a hack. It's not respecting the colour in the wails options in go.
I did not have any of these problems with Sveltekit in Wails. But I'm not sure what it's doing behind the scenes.
I looked at the wails lit template, which does not deal with routing. Any advice here would be most appreciated!
global-styles.css:
index.html:
Beta Was this translation helpful? Give feedback.
All reactions