Use css-variables instead of theme + context
danieldelcore opened this issue · comments
Variables example: https://codesandbox.io/s/elated-hooks-dnhfq
export default function App() {
return (
<div className="App">
<style dangerouslySetInnerHTML={{__html: `
.foo {
--main-bg-color: brown;
}
`}} />
<h1 className="foo" style={{
color: 'var(--main-bg-color)',
}}>Hello CodeSandbox</h1>
<h2>Start editing to see some magic happen!</h2>
</div>
);
}