UNPKG

3.12 kBSCSSView Raw
1@mixin anim($prop, $basetime: 200ms) {
2 transition: $prop 2 * $basetime;
3
4 &.fast {
5 transition: $prop $basetime;
6 }
7
8 &.slow {
9 transition: $prop 3 * $basetime;
10 }
11}
12
13html {
14 font: {
15 family: sans-serif;
16 size: 20px;
17 }
18 line-height: 1.5;
19 min-height: 100vh;
20
21 color: #233;
22
23 @media (min-width: 1200px) {
24 font-size: 24px;
25 }
26}
27
28body {
29 padding: 0;
30 margin: 0;
31 overflow: {
32 x: hidden;
33 y: scroll;
34 }
35}
36
37pre {
38 background: white;
39 border: {
40 top: 1px solid #eee;
41 bottom: 1px solid #eee;
42 }
43 padding: 20px;
44 font-size: .9rem;
45 line-height: 1.2;
46 text-align: left;
47 overflow-x: auto;
48
49 @media (min-width: 1200px) {
50 padding: 25px;
51 }
52}
53
54code {
55 font: {
56 family: monospace;
57 size: .9rem;
58 }
59}
60
61h1,h2,h3,h4 {
62 color: rgb(66, 184, 166) // rgb(30, 184, 212)
63}
64
65h2 {
66 margin-top: 5vh;
67 font-size: 2rem;
68}
69
70h3 {
71 margin-top: 6vh;
72 font-size: 1.2rem;
73}
74
75h4 {
76 margin-top: 4vh;
77 font-size: 1rem;
78}
79
80p {
81 text-indent: 2rem;
82}
83
84blockquote p {
85 text-indent: 0;
86}
87
88img {
89 &.full {
90 width: 100%;
91 }
92}
93
94.key {
95 font-size: 1.2rem;
96}
97
98.light {
99 font-weight: 300;
100}
101
102.banner {
103 position: absolute;
104 left: 10vw;
105 top: 45%;
106 width: 80vw;
107 transform: translateY(-50%);
108 text-align: center;
109 margin: 0;
110
111 font: {
112 family: cursive;
113 size: 3rem;
114 weight: normal;
115 }
116
117 @media (min-width: 1200px) {
118 font-size: 3.2rem;
119 }
120}
121
122.center {
123 text-align: center;
124}
125
126.vert-span {
127 height: 2vh;
128 min-width: 1px;
129}
130
131.scen {
132 position: relative;
133 margin: 0;
134 background-color: #eee;
135 transition: background-color 1s ease;
136 padding: 10vh 8vw;
137 width: 84vw;
138 min-height: 60vh;
139
140 &.active {
141 background-color: white;
142 }
143
144 &.wide {
145 width: 96vw;
146 padding: 10vh 2vw;
147 }
148
149 &::after {
150 content: "";
151 display: table;
152 clear: both;
153 }
154
155 @media (min-width: 1200px) {
156 width: 76vw;
157 padding: 10vh 12vw;
158 }
159}
160
161@for $i from 1 through 12 {
162 $percentage: $i / 12;
163
164 .col-#{$i} {
165 float: left;
166 width: $percentage * 100%;
167 }
168}
169
170@each $name, $color in (plum, #ae81ff),
171 (chartreuse, #a6e22e),
172 (cyan, #66d9ef),
173 (tomato, #f13c1a),
174 (moccasin, #ffe4b5) {
175 .#{$name} {
176 color: $color;
177 }
178
179 .fx-#{$name} {
180 @include anim(color);
181
182 &.active {
183 color: $color !important;
184 }
185 }
186}
187
188.slide {
189 @include anim(transform, 200ms);
190 transform: translateX(-100vw);
191
192 &.active {
193 transform: translateX(0);
194 }
195}
196
197.fade {
198 @include anim(opacity);
199 opacity: 0;
200
201 &.active {
202 opacity: 1;
203 }
204}
205
206.rise {
207 @include anim(opacity);
208 @include anim(transform);
209 opacity: 0;
210 transform: translateY(10vh);
211
212 &.active {
213 opacity: 1;
214 transform: translateY(0);
215 }
216}