gitFoxCode / nuxt-icons

Module for Nuxt allowing pleasant use of svg icons
188 stars 23 forks source link

add attributes for Fill, Stroke, Width & Height #3

Closed McPizza0 closed 11 months ago

McPizza0 commented 2 years ago

❓ Type of change πŸ“– Documentation (updates to the documentation or readme) πŸ‘Œ Enhancement (improving an existing functionality like performance) ✨ New feature (a non-breaking change that adds functionality) ⚠️ Breaking change (fix or feature that would cause existing functionality to change) πŸ“š Description

πŸ“ Checklist I have updated the documentation accordingly.


What did I do?

  1. Add stroke overwrite attribute to enable changing SVG stroke colors
  2. Reverse logic on fill attribute - you must specify fill to use the SVG's original fill color - Issue: https://github.com/gitFoxCode/nuxt-icons/issues/4#issue-1271564962
  3. Add width attribute - manually specify width of SVG
  4. Add height attribute - manually specify height of SVG
  5. Set SVG aspect-ratio to 1:1
  6. Switched icon html to enable dynamic centering of icon on both axis
  7. Updated Documentation to re-shuffle order, add info about sub-folders and provide instructions/examples for attributes

BREAKING CHANGES Due to the inversion of the fill logic, this may cause some visual changes to icons. - Issue: https://github.com/gitFoxCode/nuxt-icons/issues/4#issue-1271564962 Previous Behavior: if you do not set the fill attribute, the SVG will use it's built in colors New Behavior: You must explicitly tell the SVG to use it's built in colors To Fix: remove fill from icons that already have the attribute, and add fill to icons that dont.

+Note: May require some additional CSS wizardry for edge cases*

snitovets commented 1 year ago

I hope it will be merged soon

eduayme commented 1 year ago

+1 I hope it will be merged