--icon-primary
Default icon color.
Value: supplied by your design.
Modern CSS toolset
Extended tokens give icons their own color roles when inheriting text color is not enough. Use currentColor in SVGs to pick up the assigned role.
.status-icon {
color: var(--icon-success);
fill: currentColor;
}
These examples show how to consume the tokens. Assign values before using them.
--icon-primaryDefault icon color.
Value: supplied by your design.
--icon-successIcon color for success status.
Value: supplied by your design.
--icon-warningIcon color for warning status.
Value: supplied by your design.
--icon-dangerIcon color for danger/error status.
Value: supplied by your design.
--icon-infoIcon color for informational status.
Value: supplied by your design.
--icon-disabledIcon color when the control is disabled.
Value: supplied by your design.
--icon-inverseIcon color on inverse or brand-filled surfaces.
Value: supplied by your design.