Dynamically setting mode based on icon

108 Views Asked by At

Using unocss, I need to mask most of my icons so I am enabling it in settings. Is there any way to disable masking for few icons?

// uno.config.css
presetIcons({
            collections: {
                myicons: FileSystemIconLoader(
                    './src/icons/',
                    (svg) => svg
                ),
                myiconsorginal: FileSystemIconLoader(
                    './src/icons/',
                    (svg) => svg
                ),
            },
            mode: 'mask',
        }),

So if its class="i-myicons-star" it should show a masked icon (which it is showing).
But if its class="i-myiconsorginal-star" then I want to show the original start which have some custom colors.

0

There are 0 best solutions below