Skip to content

using js variables in css #5560

Answered by mustofa-id
tryggs asked this question in Q&A
Jul 15, 2022 · 1 comments · 3 replies
Discussion options

You must be logged in to vote

JavaScript variable not accessible to <style ...> scope. If you need to change css url dynamically, you can use <link ...> in <svelte:head ...> instead. Here is example: https://svelte.dev/repl/0c3e53d75e364e4a8903d1033c17f6fd?version=3.49.0

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@mustofa-id
Comment options

@tryggs
Comment options

@mustofa-id
Comment options

Answer selected by tryggs
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