Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Kelvin filter #203

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion site/filters.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
},
{
"name": "Kelvin",
"is_done": false,
"is_done": true,
"usage": "kelvin"
},
{
Expand Down
3 changes: 2 additions & 1 deletion source/scss/cssgram.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@
@import 'willow';
@import 'rise';
@import 'slumber';
@import 'brannan'
@import 'brannan';
@import 'kelvin';
43 changes: 43 additions & 0 deletions source/scss/kelvin.scss
Original file line number Diff line number Diff line change
@@ -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;
}