Skip to content

Hex color #31171

Closed Answered by layershifter
rexkenley asked this question in Q&A
Apr 23, 2024 · 1 comments · 7 replies
Discussion options

You must be logged in to vote

The proper solution would be to require something like BridgeProvider (example https://stackblitz.com/edit/jzxava-j8xopl) or create a custom React context and pass down theme through it.

We intentionally removed all ways to access exact values to ensure that they are never referenced in styles and won't break theming (#21257).


Technically, you can still do .getComputedStyle(), but it's fragile as it won't react on theme changes, https://stackblitz.com/edit/jzxava-wzh5gr.

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@rexkenley
Comment options

@layershifter
Comment options

@rexkenley
Comment options

@layershifter
Comment options

Answer selected by rexkenley
@rexkenley
Comment options

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