Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TailwindCSS v4: Support configuring in CSS #54

Closed
svelterust opened this issue Jan 23, 2025 · 3 comments
Closed

TailwindCSS v4: Support configuring in CSS #54

svelterust opened this issue Jan 23, 2025 · 3 comments
Labels

Comments

@svelterust
Copy link

Hey, it would be nice to support using this package with just the CSS config file introduced in TailwindCSS v4. It seems the developers of the Iconify package have something working: iconify/iconify-tailwind#1

There's an example of creating plugin with options from daisyUI here: https://github.com/saadeghi/daisyui/blob/v5/packages/daisyui/index.js

Would be cool to support something like this:

@plugin "@egoist/tailwindcss-icons" {
    collections: "mdi", "lucide";
}

Then collections can be passed in the plugin to getIconCollections I suppose.

@boussadjra
Copy link

boussadjra commented Jan 24, 2025

Right now I'm using the legacy config to just configure the icons plugin:

@config "../../tailwind.config.js";

Then in tailwind.config.js

const { iconsPlugin, getIconCollections } = require('@egoist/tailwindcss-icons')

/** @type {import('tailwindcss').Config} */
module.exports = {
  plugins: [
    require('tailwindcss-animate'),
    iconsPlugin({
      prefix: 'i',
      scale: 1.5,
      collections: {
        ...getIconCollections(['mdi', 'flag', 'flagpack', 'ph']),
      },
    }),
  ],
}

@hyoban hyoban closed this as completed in 1936589 Jan 24, 2025
Copy link

🎉 This issue has been resolved in version 1.9.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@Gerbuuun
Copy link

So, how exactly do I specify the collections to use with CSS config?

I tried

@plugin '@egoist/tailwindcss-icons' {
  collections: 'simple-icons', 'lucide';
}

but it doesn't work.

There is no example for it or any note that it isn't supported. What is the situation?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants