Giter Site home page Giter Site logo

Comments (5)

cyberalien avatar cyberalien commented on September 27, 2024 1
  1. You can already do that by wrapping icon in <g stroke-width="1.5"> and </g>
  2. It affects only small subset of icons that use stroke and do not have stroke-width set. I can't think of any icons that it would apply to. Tabler Icons mentioned in linked issue has <g stroke-width="1.5"> inside icon, so attribute on <svg> element will have no effect.

Since you are already passing icon data to getIconCSS, you can do all replacements and/or wrapping before passing icon data. That gives you full control, including replacing existing values,.

from iconify.

cyberalien avatar cyberalien commented on September 27, 2024 1

Added option customise to new version of plugin.

Docs show this very specific use case - changing stroke width in Tabler icons.

New plugin: https://iconify.design/docs/usage/css/tailwind/iconify/customise.html
Plugin with dynamic selectors: https://iconify.design/docs/usage/css/tailwind/dynamic/customise.html

You can use multiple instances of plugin with different settings to have the same icons with different stroke width.

from iconify.

cyberalien avatar cyberalien commented on September 27, 2024

What would be the use case for it?

from iconify.

hyoban avatar hyoban commented on September 27, 2024

Because egoist/tailwindcss-icons#42

I'm trying to find a way to provide basic support for custom stroke-width.

  1. For icons that do not contain stroke-width in the body, this seems to be achieved by adding attributes on the SVG tag.
  2. For icons that have a same stroke-width in the body, I can replace them globally.

from iconify.

hyoban avatar hyoban commented on September 27, 2024

Oh!!! Thank you very much for your reply. I should know how to deal with it.

from iconify.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.