/
_glass.scss
executable file
·42 lines (39 loc) · 1.08 KB
/
_glass.scss
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
//
// Glass effect
// Use this on image for better effect render
//
// Inspired from Simurai's IMDB redisign
//
// @link http://archive.simurai.com/lab/imdb/
// @thanks Simurai @simurai
//
@import '../shared/pseudo-element';
@mixin effect-glass(
$color: rgba(#fff, .12),
$reflectDegree: -45deg,
$border-radius: .2em,
$border-color: rgba(#000, .2),
$size: 50%,
$size-fadeout: .5%
)
{
position: relative;
@include border-radius($border-radius);
&:after
{
@include pseudo-element($width: auto);
overflow: hidden;
top: 0;
right: 0;
bottom: 0;
left: 0;
border: 1px solid transparent; // transparent fallback
border-color: $border-color;
@include border-radius($border-radius);
@include box-shadow(
inset opacify($color, .6) 0 0 2px, // inner glow
inset rgba($color, .4) 0 0 10px // inner glow
);
@include background(linear-gradient($reflectDegree, $color, transparentize($color, .06) $size, transparentize($color, 1) $size + $size-fadeout));
}
}