SnowdogApps / magento2-frontools

Set of front-end tools for Magento 2 based on Gulp.js
MIT License
430 stars 142 forks source link

Add svg inline support #408

Closed kpitn closed 3 years ago

kpitn commented 3 years ago

Base on https://www.npmjs.com/package/m2-sass-inlinesvg

After using gulp svginline All files under /web/icons/*.svg are compile into one file in /styles/_default_sass-inline-svg-data.scss Another file is create /styles/_default_sass-inline-svg.scss who need to be import in your styles.scss (@import "svg/default_sass-inline-svg";)

Igloczek commented 3 years ago

Hi @kpitn thanks for the contribution, glad you like the project and want to make it better, really appreciate it 🙇

Unfortunately, the presented solution while might be easy to use, since all icons will be always available in every place of the project, it's not good for performance and caching because:

Apart from that, Frontools already have a tool for creating SVG sprite that is a better and a bit more modern approach for using SVG on the web.

So since I'm not convinced about this solution, I had to reject your proposal.

Best, Bartek

kpitn commented 3 years ago

Ok so svg sprite is a better solution for you but :