macaron-css / macaron

Compiler-augmented typesafe CSS-in-JS with zero runtime, colocation, maximum safety and productivity
https://macaron.js.org/
MIT License
735 stars 16 forks source link

docs: fix vanilla api examples #59

Closed dddieon closed 2 months ago

dddieon commented 3 months ago
style={{
  ['--cssVariableName']: 'red', // correct
  ['var(--cssVariableName)']: 'red', // wrong
}}

Because the variable named colorVar has the value var(--cssVariableName), css variable was not added as in the example.

To use colorVar directly in the inline style prop, delete 'var(',')' from the colorVar string, or use it like this commit.

netlify[bot] commented 3 months ago

Deploy Preview for macaron-css ready!

Name Link
Latest commit 40b93f0ba7770b812bd7d432a52e40ba903bb1db
Latest deploy log https://app.netlify.com/sites/macaron-css/deploys/66124bc4dd2b2600080d3e87
Deploy Preview https://deploy-preview-59--macaron-css.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Mokshit06 commented 2 months ago

Thanks for the fix!