• Stars
    star
    119
  • Rank 297,930 (Top 6 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created about 9 years ago
  • Updated over 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

πŸ“· PostCSS plugin for using Instagram filters in CSS

postcss-instagram

Build Status NPM version Dependency Status

This is a PostCSS plugin for adding Instagram filters to your photos.

Install

With npm do:

npm install postcss-instagram --save

Example

Input

<div class="boo">
  <img src="..." alt="">
</div>
.boo {
  filter: earlybird;
}

Output

.boo:after {
  box-shadow:inset 0 0 3em #222;
  position:absolute;
  top:0;
  right:0;
  bottom:2px;
  left:0;
  z-index:1;
  content:'';
}

.boo img{
  filter:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg"><filter id="filter"><feColorMatrix type="matrix" color-interpolation-filters="sRGB" values="0.7572 0.30760000000000004 0.0756 0 0 0.1396 0.8744000000000001 0.06720000000000001 0 0 0.10880000000000001 0.2136 0.6524 0 0 0 0 0 1 0" /><feColorMatrix type="matrix" color-interpolation-filters="sRGB" values="1.6296000000000002 -0.572 -0.0576 0 0 -0.17040000000000002 1.246 -0.0576 0 0 -0.17040000000000002 -0.572 1.7424000000000002 0 0 0 0 0 1 0" /><feComponentTransfer color-interpolation-filters="sRGB"><feFuncR type="linear" slope="1.1" intercept="-0.050000000000000044" /><feFuncG type="linear" slope="1.1" intercept="-0.050000000000000044" /><feFuncB type="linear" slope="1.1" intercept="-0.050000000000000044" /></feComponentTransfer><feComponentTransfer color-interpolation-filters="sRGB"><feFuncR type="linear" slope="0.9" /><feFuncG type="linear" slope="0.9" /><feFuncB type="linear" slope="0.9" /></feComponentTransfer></filter></svg>#filter');
  -webkit-filter:sepia(0.4) saturate(1.8) contrast(1.1) brightness(0.9) hue-rotate(-20deg);
  filter:sepia(0.4) saturate(1.8) contrast(1.1) brightness(0.9) hue-rotate(-20deg);
}

.boo {
  position:relative;
  display:inline-block;
}

Filters

Here is a full list of plugin filters:

  • 1977
  • amaro
  • brannan
  • earlybird
  • inkwell
  • kalvin
  • lo-fi
  • nashville
  • toaster

You can look filter examples here.

Contributing

Pull requests are welcome.

License

MIT Β© Azat S.

More Repositories

1

you-dont-know-js-ru

πŸ“š Russian translation of "You Don't Know JS" book series
8,260
star
2

eslint-plugin-perfectionist

β˜‚οΈ ESLint plugin for sorting various data such as objects, imports, types, enums, JSX props, etc.
TypeScript
1,788
star
3

atom-language-postcss

:atom: Atom language support for PostCSS
CoffeeScript
54
star
4

eyecons

🦎 Advanced VS Code icon theme with adaptive icon colors that match the editor’s color theme
TypeScript
54
star
5

postcss-tatar-stylesheets

🐝 PostCSS plugin for writing Tatar Style Sheets
JavaScript
41
star
6

eslint-config

πŸ§šβ€β™€ ESLint sharable configs
TypeScript
20
star
7

atom-robin-hood-syntax

πŸ€ Robin Hood's syntax theme for Atom editor
CSS
12
star
8

azat-io

πŸ’› My personal blog
Astro
8
star
9

postcss-responsive

πŸ“ PostCSS plugin that improves developer experience of responsive design
TypeScript
7
star
10

observer-bot

πŸ€– Telegram bot for monitoring elections
JavaScript
6
star
11

vuepress-plugin-umami-analytics

πŸ“— VuePress v2 plugin for injecting Umami analytics script into your app code
TypeScript
6
star
12

scroogie

πŸ¦† Scroogie Telegram bot
TypeScript
5
star
13

postcss-roman-numerals

🍝 PostCSS plugin that allows to use roman numerals in your CSS code
JavaScript
3
star
14

environment-old

πŸ”§ My home config
Vim Script
3
star
15

vuepress-plugin-remove-html-extension

πŸ“— VuePress v2 plugin for generating clean urls without .html extension.
TypeScript
3
star
16

vscode-gruvbox-icon-theme

πŸ– Gruvbox style icons for VS Code
TypeScript
3
star
17

azat-io-old

πŸ¦₯ Personal blog
Vue
3
star
18

vuepress-plugin-open-graph

πŸ“— VuePress v2 plugin for generating open graph meta tags to improve SEO
TypeScript
2
star
19

shri-msk-2016-task-2

πŸ’‘ Task No. 2 of Yandex frontend school
JavaScript
1
star
20

fuck-qr

πŸ™Š QR code generator
1
star
21

environment

My home config
Shell
1
star
22

stylelint-config

JavaScript
1
star
23

shri-msk-2016-task-1

πŸ“Ί Task No. 1 of Yandex frontend school
CSS
1
star
24

shri-msk-2016-task-3

πŸ”§ Task No. 3 of Yandex frontend school
JavaScript
1
star
25

vuepress-plugin-mermaid-wrapper

πŸ“— VuePress v2 plugin provides a global component wrapping Mermaid
TypeScript
1
star