properties
changelog

SVG Fill Color and Opacity

Set SVG element's fill color and opacity.

Usage:

  • @svg fill-*;
  • @svg fill-opacity-*;

Reference

shilp.config.js
/** @type {import('shilpcss/types').ShilpConfig} */
const shilpConfig = {
  source: "react",

  properties: {
    svg: {
      fill: {
        DEFAULT: {
          property: "fill: <v><i>;",
          resolve: "color",
          themeKey: "colors",
          variant: true,
          values: {},
        },

        opacity: {
          property: "fill-opacity: <v><i>;",
          themeKey: "fractions",
          values: {},
        },
      },
    },
  },
};

export default shilpConfig;

Published at:

Last updated at: