Instagram filter library in Sass and CSS.
There are currently 2 ways to consume this library:
- Link to the cssgram library:
<link rel="stylesheet" href="css/cssgram.min.css">
or any individual css file (i.e.<link rel="stylesheet" href="css/aden.min.css">
) - Add a class to your image element with the name of the filter you would like to use
For example:
<!-- HTML -->
<figure class="aden">
<img src="../img.png" alt="">
</figure>
- Include
scss/cssgram.scss
or any individual file (i.e.scss/aden.scss
) into your Sass manifest - Extend the silent placeholder selector
@extend %aden;
in your element.
For example:
<!-- HTML -->
<figure class="viz--beautiful">
<img src="../img.png" alt="">
</figure>
// Sass
.viz--beautiful {
@extend %aden;
}
- Aden
- Reyes
- Perpetua
- Inkwell
- Earlybird
- Toaster
- Walden
- Hudson
- Gingham
- Mayfair
- Lo-fi
- X Pro II
- 1977
- Brooklyn
This library uses CSS Filters and CSS Blend Modes. This features are supported in the following browsers:
43+ ✔ | 38+ ✔ | Nope ✘ | 32+ ✔ | 8+ ✔ |
For more information, check on Can I Use.
- Fork this repo
- Clone the fork onto your system
npm install
dependancies (must have Node installed)- Run
gulp
to compile CSS and the site - Make changes (see file structure outline below)
- Submit a PR with a smile 😄
source/css/cssgram.css
contains each of the css classes you can apply to your<img>
to give it the filter. You should usesource/css/cssgram.min.css
for production if you want access to all of thesource/scss/
contains the source files for individual classes and placeholder selectors you can use to extend CSS classes in Sass- site is the public facing website
Note: this will also have mixin options and a PostCSS Component.