Skip to content

Using dynamic styles and CSP #475

Answered by nmn
BMCwebdev asked this question in Q&A
Mar 2, 2024 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

Dynamic styles are well, ... dynamic. So they are generated at runtime with JS and applied as inline styles. They can't be hashed because they aren't known ahead of time.

That said, in the VAST, VAST majority of cases you don't need dynamic styles at all. So, perhaps look into alternatives to avoid using dynamic styles and use more expressive static CSS instead?

Some very interesting things can be achieved with CSS and Math.

Replies: 1 comment 1 reply

Comment options

nmn
Mar 2, 2024
Collaborator

You must be logged in to vote
1 reply
@BMCwebdev
Comment options

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