Giter Site home page Giter Site logo

svg-icons's Introduction

Practical SVG Icons

Everyone loves icons and everyone loves SVGs (and rightly so, they are the indisputable winner of the SVG vs Icon Font war).

That said, SVGs are not as easy to work with nor as flexible as Icon Fonts.

For example: You can't easily change the color of an externally referenced SVG icon. Sure, you could inline all SVGs but then your icons are not cacheable and if you use a lot of icons it becomes a tedious task to copy-paste or update them.

The best way seems to <use> icons from an external SVG source wich gives you caching and allows for manipulation of the icon, but you have to create the sprite from your icons manually, and this method doesn't work in CSS at all.

This is a monorepo containing two packages to be used in conjunction that aim to solve these issues:

  • node-svg-sprite

    Node module wich generates a SVG sprite from a folder of icons

  • sass-svg-icon (Sass only, for now)

    Function for setting icons as background-image, allows passing styling to the icon

svg-icons's People

Contributors

nicolasmn avatar

Watchers

 avatar

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.