You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using standard CSS variables var(--your-varible-name) in the primary and secondary data attributes works.
Might be helpful to include this tip in the documentation as it makes swapping colors globally for icons in a non-destructive manner possible, without editing the Vivid Icon source in node_modules/vivid-icon/src/config.js and then rebuilding from source every time a change is made.
Example for those unfamiliar with CSS variables: <i data-vi="flame" data-vi-size="90" data-vi-primary="var(--primary)" data-vi-accent="var(--secondary)" data-vi-prop="var(--tertiary)"></i>
Then, set up your variables: :root { --primary: #010101; --secondary: #333; --tertiary: #dbdbdb; }
And that's it! Hope this helps someone.
The text was updated successfully, but these errors were encountered:
Using standard CSS variables
var(--your-varible-name)
in the primary and secondary data attributes works.Might be helpful to include this tip in the documentation as it makes swapping colors globally for icons in a non-destructive manner possible, without editing the Vivid Icon source in
node_modules/vivid-icon/src/config.js
and then rebuilding from source every time a change is made.Example for those unfamiliar with CSS variables:
<i data-vi="flame" data-vi-size="90" data-vi-primary="var(--primary)" data-vi-accent="var(--secondary)" data-vi-prop="var(--tertiary)"></i>
Then, set up your variables:
:root { --primary: #010101; --secondary: #333; --tertiary: #dbdbdb; }
And that's it! Hope this helps someone.
The text was updated successfully, but these errors were encountered: