Skip to content

feat: Use CSS variables for font-variation-settings#96

Open
tpict wants to merge 1 commit intoedjonesdev:mainfrom
tpict:main
Open

feat: Use CSS variables for font-variation-settings#96
tpict wants to merge 1 commit intoedjonesdev:mainfrom
tpict:main

Conversation

@tpict
Copy link
Contributor

@tpict tpict commented Nov 14, 2024

This PR tweaks the component so that the props are applied using CSS variables instead of the style attribute. The idea is

  • clients can adjust these styles in their CSS without needing !important to get around the specificity of style
  • clients can use the exported CSS variable names to implement e.g. "all Material Symbols of this component default to size 16px", while still getting optical sizing. Or "all Material Symbols of this component become filled when this pseudo-class is present" etc

@vercel
Copy link

vercel bot commented Nov 14, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-material-symbols ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 14, 2024 8:35pm

@tpict tpict changed the title feat: Use CSS variables for font-variation-=settings feat: Use CSS variables for font-variation-settings Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant