diff --git a/site/filters.json b/site/filters.json index f9aab7e..e6f51a8 100644 --- a/site/filters.json +++ b/site/filters.json @@ -92,7 +92,7 @@ }, { "name": "Kelvin", - "is_done": false, + "is_done": true, "usage": "kelvin" }, { diff --git a/source/scss/cssgram.scss b/source/scss/cssgram.scss index d05975e..46904ea 100644 --- a/source/scss/cssgram.scss +++ b/source/scss/cssgram.scss @@ -20,4 +20,5 @@ @import 'willow'; @import 'rise'; @import 'slumber'; -@import 'brannan' \ No newline at end of file +@import 'brannan'; +@import 'kelvin'; \ No newline at end of file diff --git a/source/scss/kelvin.scss b/source/scss/kelvin.scss new file mode 100644 index 0000000..cebab31 --- /dev/null +++ b/source/scss/kelvin.scss @@ -0,0 +1,43 @@ +/* + * + * Kelvin + * + */ + +@import 'shared'; + +// mixin to extend kelvin filter +// @mixin kelvin +// @param $filters... {filter} - Zero to many css filters to be added +// @example +// img { +// @include kelvin; +// } +// or +// img { +// @include kelvin(blur(2px)); +// } +// or +// img +// @include kelvin(blur(2px)) { +// /*...*/ +// }; +// } +@mixin kelvin($filters...) { + @extend %filter-base; + filter: sepia(0.4) saturate(2.4) brightness(1.3) contrast(1); + -webkit-filter: sepia(0.4) saturate(2.4) brightness(1.3) contrast(1); + + &::after { + background: linear-gradient(to right, rgba(66, 10, 14, .2), transparent); + mix-blend-mode: darken; + } + + @content; +} + +// kelvin Instagram filter +%kelvin, +.kelvin { + @include kelvin; +}