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

Change on logo and filter #288

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions site/css/calven.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion site/css/cssgram.min.css

Large diffs are not rendered by default.

42 changes: 42 additions & 0 deletions site/css/demo-site.css
Original file line number Diff line number Diff line change
Expand Up @@ -1412,3 +1412,45 @@ img {
#snapshot:hover {
background: #c63082;
color: white; }
/*
*
* Calven
*
*/

.calven {
position: relative;
-webkit-filter: contrast(0.9) brightness(1.1);
filter: contrast(0.9) brightness(1.1); }

.calven img {
width: 100%;
z-index: 1; }

.calven:before {
content: '';
display: block;
height: 100%;
width: 100%;
top: 0;
left: 0;
position: absolute;
pointer-events: none;
z-index: 2; }

.calven:after {
content: '';
display: block;
height: 100%;
width: 100%;
top: 0;
left: 0;
position: absolute;
pointer-events: none;
z-index: 3; }

.calven::after {
filter: brightness(99%) hue-rotate(25deg) saturate(238%) contrast(96%);
-webkit-filter: brightness(99%) hue-rotate(25deg) saturate(238%) contrast(96%);
-moz-filter: brightness(99%) hue-rotate(25deg) saturate(238%) contrast(96%); }

2 changes: 1 addition & 1 deletion site/css/demo-site.min.css

Large diffs are not rendered by default.

7 changes: 6 additions & 1 deletion site/filters.json
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,13 @@
"name": "X-pro II",
"is_done": true,
"usage": "xpro2"
},
{
"name": "Calven",
"is_done": true,
"usage": "calven"
}
],

"images": ["atx", "bike", "cacti", "lakegeneva", "tahoe"]
}
}
Binary file added site/img/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 8 additions & 2 deletions site/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</head>
<body class="home">
<section class="title-section">
<img class="title--logo" src="img/cssgram-logo.svg" alt="CSSgram">
<img class="title--logo" src="img/logo.png" alt="CSSgram">
<h2 class="title--top-sub">A tiny (&lt;1kb gzipped!) library for recreating <a href="http://instagram.com">Instagram</a> filters with CSS filters and blend modes.</h2>
</section>

Expand Down Expand Up @@ -212,6 +212,12 @@ <h2 class="title--top-sub">A tiny (&lt;1kb gzipped!) library for recreating <a h
<img>
<figcaption>X-pro II</figcaption>
</figure>
</li>
<li class="demo__item">
<figure class="calven">
<img>
<figcaption>Calven</figcaption>
</figure>
</li>
</ul>
</section>
Expand Down Expand Up @@ -519,4 +525,4 @@ <h3>Available Mixins</h3>
});
</script>
</body>
</html>
</html>
41 changes: 41 additions & 0 deletions source/css/calven.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/*
*
* Calven
*
*/

.calven {
position: relative;
-webkit-filter: contrast(0.9) brightness(1.1);
filter: contrast(0.9) brightness(1.1); }

.calven img {
width: 100%;
z-index: 1; }

.calven:before {
content: '';
display: block;
height: 100%;
width: 100%;
top: 0;
left: 0;
position: absolute;
pointer-events: none;
z-index: 2; }

.calven:after {
content: '';
display: block;
height: 100%;
width: 100%;
top: 0;
left: 0;
position: absolute;
pointer-events: none;
z-index: 3; }

.calven::after {
filter: brightness(99%) hue-rotate(25deg) saturate(238%) contrast(96%);
-webkit-filter: brightness(99%) hue-rotate(25deg) saturate(238%) contrast(96%);
-moz-filter: brightness(99%) hue-rotate(25deg) saturate(238%) contrast(96%); }
1 change: 1 addition & 0 deletions source/css/calven.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

42 changes: 42 additions & 0 deletions source/scss/calven.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*
*
* Calven
*
*/
@import 'shared';

// mixin to extend calven filter
// @mixin calven
// @param $filters... {filter} - Zero to many css filters to be added
// @example
// img {
// @include calven;
// }
// or
// img {
// @include calven(blur(2px));
// }
// or
// img {
// @include calven(blur(2px)) {
// /*...*/
// };
// }
@mixin calven($filters...) {
@include filter-base;
filter: contrast(.9) brightness(1.1) $filters;

&::after {
filter: brightness(99%) hue-rotate(25deg) saturate(238%) contrast(96%);
-webkit-filter: brightness(99%) hue-rotate(25deg) saturate(238%) contrast(96%);
-moz-filter: brightness(99%) hue-rotate(25deg) saturate(238%) contrast(96%);
}

@content;
}

// calven Instagram filter
%calven,
.calven {
@include calven;
}