A SUIT component for SVG Icons
Read more about SUIT's design principles.
Icon
- The core class
<svg class="Icon">...</svg>
By default the Icon's fill
is set to currentColor
.
There are two ways to change the Icon's color:
- Override its
fill
property - Set its parent's
color
to something else
N.B. you must strip out all of the fill
attributes from your SVG images otherwise what described above won't work (including default color).
There are two ways to scale Icons:
- Override its
height
- Override the
font-size
of the Icon or its parent
By default the bottom of the Icons is aligned with the bottom of the parent element's font.
Different alignments can be achieved with flexbox or by overriding the Icon's vertical-align
property.
Read More about vertical alignment.
Install Node (comes with npm).
npm install
To generate a build:
npm run build
To generate the testing build.
npm run build-test
Basic visual tests are in test/index.html
.
To pre-process:
npm run preprocess
To pre-process the tests:
npm run preprocess-test
- Google Chrome 4+
- Opera 10.1+
- Firefox 3+
- Safari 3.2+
- Internet Explorer 9+
- Android Browser 3+