Skip to content
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
13,929 changes: 13,929 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
"name": "cssgram",
"version": "0.1.12",
"style": "source/css/cssgram.css",
"dependencies": {},
"dependencies": {
"latest": "^0.2.0",
"node-sass": "^6.0.1"
},
"author": {
"name": "Una Kravets",
"email": "una.kravets@gmail.com",
Expand Down
1 change: 1 addition & 0 deletions site/css/niro.min.css

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

5 changes: 5 additions & 0 deletions site/filters.json
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,11 @@
"name": "X-pro II",
"is_done": true,
"usage": "xpro2"
},
{
"name": "Niro",
"is_done": true,
"usage": "niro"
}
],

Expand Down
2 changes: 1 addition & 1 deletion site/img/cssgram-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added site/img/cssgram-logo2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion 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/cssgram-logo2.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
41 changes: 41 additions & 0 deletions source/css/niro.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/*
*
* Niroshan
*
*/

.niro {
position: relative;
-webkit-filter: contrast(0.7) brightness(1.1);
filter: contrast(0.7) brightness(1.1); }

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

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

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

.niro::after {
filter: brightness(99%) hue-rotate(25deg) saturate(218%) contrast(96%);
-webkit-filter: brightness(99%) hue-rotate(25deg) saturate(218%) contrast(96%);
-moz-filter: brightness(99%) hue-rotate(25deg) saturate(218%) contrast(96%); }
1 change: 1 addition & 0 deletions source/css/niro.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/niro.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*
*
* Niroshan
*
*/
@import 'shared';

// mixin to extend niro filter
// @mixin niro
// @param $filters... {filter} - Zero to many css filters to be added
// @example
// img {
// @include niro;
// }
// or
// img {
// @include niro(blur(2px));
// }
// or
// img {
// @include niro(blur(2px)) {
// /*...*/
// };
// }
@mixin niro($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;
}

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