Dynamic theme-color for Safari #3484
-
Hey, I wanted to add dynamic theme-colors as done in https://pinia.vuejs.org/ for Safari. I couldn't figure out how they did it.
How can I make this dynamic? I'm looking for something like this:
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
you can use transformHead (will work only on build): here an example, return the entry you need https://github.com/vueuse/vueuse/blob/main/packages/.vitepress/transformHead.ts and https://github.com/vueuse/vueuse/blob/main/packages/.vitepress/config.ts#L189, use transformHead({ userConfig }: TransformContext) {
// userConfig.appearance
} |
Beta Was this translation helpful? Give feedback.
-
if you mean dynamic at runtime, you can try using |
Beta Was this translation helpful? Give feedback.
Thank you! This works but it is not instant (a refresh of the website is needed). But after a long time of debugging and inspecting https://pinia.vuejs.org/ , the easy solution is, to not include any
theme-color
options 😅