Skip to content

Dynamic Theming with StyleX - just looking for confirmation 🙏 #959

Closed Answered by BMCwebdev
BMCwebdev asked this question in Q&A
Discussion options

You must be logged in to vote

Going with the dynamic approach with inline style attribute for now. Originally thought I could avoid it, but its fine for now (company Content Security Policy really want to get rid of style attributes, but they are so ubiquitous)

I'm still curious about the work that has been mentioned in some other discussions about Reactive Variables in the future.

If useful for anyone else I will share some of my code. I am curious if you could add something like this to the recipes in the StyleX documentation. The ability to do this wasn't something I would have known by looking there.

Thanks for all the help @nmn

import * as React from 'react';
import * as stylex from '@stylexjs/stylex';
import { c…

Replies: 5 comments 10 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@zaydek
Comment options

@BMCwebdev
Comment options

Comment options

You must be logged in to vote
8 replies
@nmn
Comment options

nmn May 5, 2025
Collaborator

@BMCwebdev
Comment options

@BMCwebdev
Comment options

@BMCwebdev
Comment options

@BMCwebdev
Comment options

Comment options

You must be logged in to vote
0 replies
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
3 participants