-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmixins
99 lines (83 loc) · 1.92 KB
/
mixins
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
$stripe-properties: to bottom, 15%, blue, white;
@mixin stripes($direction, $width-percent, $stripe-color, $stripe-background: #FFF) {
background: repeating-linear-gradient(
$direction,
$stripe-background,
$stripe-background ($width-percent - 1),
$stripe-color 1%,
$stripe-background $width-percent
);
}
@mixin transform($transformation) {
transform: $transformation;
-webkit-transform: $transformation;
-moz-transform: $transformation;
-ms-transform: $transformation;
-o-transform: $transformation;
}
@mixin photo-content {
object-fit: cover;
}
//Add your own mixins here
@mixin backface-visibility($visibility:hidden) {
backface-visibility: $visibility;
-webkit-backface-visibility: $visibility;
-moz-backface-visibility: $visibility;
-ms-backface-visibility: $visibility;
-o-backface-visibility: $visibility;
}
@mixin photo-content($file) {
content: url(#{$file}.jpg);
object-fit: cover;
}
@mixin hover-color($color) {
&:hover{
color: $color;
}
}
.notecard {
width: 300px;
height: 180px;
border: 1px solid black;
display: inline-block;
margin: 20px;
font-family: Roboto, sans-serif;
box-shadow: 1px 1px 2px 2px rgba(0,0,0,.2);
&:hover{
@include transform (rotatey(-180deg));
}
.front, .back {
width: 100%;
height: 100%;
position: absolute;
@include backface-visibility;
}
.front {
z-index: 3;
font-size: 20px;
.word {
display: block;
text-align: center;
position: relative;
top: 40%;
@include hover-color(red);
}
}
.back {
z-index: 1;
word-wrap: break-word;
line-height: 1.6;
.definition {
@include stripes($stripe-properties...);
width: 100%;
height: 100%;
.photo {
width: 60%;
margin: 0px auto;
@include photo-content('titanosaur');
width: 60%;
margin: 0px auto;
}
}
}
}