Comments (5)
- You can already do that by wrapping icon in
<g stroke-width="1.5">
and</g>
- 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.
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.
What would be the use case for it?
from iconify.
Because egoist/tailwindcss-icons#42
I'm trying to find a way to provide basic support for custom stroke-width
.
- For icons that do not contain
stroke-width
in the body, this seems to be achieved by adding attributes on the SVG tag. - For icons that have a same
stroke-width
in the body, I can replace them globally.
from iconify.
Oh!!! Thank you very much for your reply. I should know how to deal with it.
from iconify.
Related Issues (20)
- ESM import issues HOT 6
- please add information about attribute `observer` and `noobserver` in the offcial site document HOT 1
- How do you guarantee icons don't change HOT 3
- Iconify - Definitely the easiest! Why not the fastest? HOT 6
- Feature Request: A SDK to pick icons
- Show API link for icons HOT 2
- Tailwind plugin: allow non-square icons HOT 1
- [@iconify-icon/react] Not show in next-app-dir HOT 1
- When I want to achieve offline on-demand loading need to use the icon, when packaged online, there will be some icons appear, some icons do not appear HOT 3
- Add "Atlas Icons" set HOT 6
- Consider supporting root attributes for icons in JSON format HOT 1
- Nuxt Error while using @iconify-json/fluent-emoji HOT 2
- Add "Iconsax" set HOT 1
- error import cheerio HOT 3
- once the animation done it doesnt restart HOT 5
- Imports with "assert" keyword are not supported anymore HOT 5
- Solid start error HOT 1
- [BUG?] @iconify/utils `getIconCss` does not respect transformations HOT 1
- Vite build warning with `@iconify/tailwind` package HOT 2
- Feature Request: Official Iconify Package for Flutter HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from iconify.