-
Notifications
You must be signed in to change notification settings - Fork 0
/
_aero.scss
172 lines (137 loc) · 4.8 KB
/
_aero.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
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
/*! SassyAero is an open source SASS framework for an object orientated styled CSS. Developed by Aiyush Jain (MIT Licence) */
/*--------------------------------------------------------------
>>> GENERIC & HELPERS
--------------------------------------------------------------*/
%temp-bg {
background-color: #DFDBE5;
background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%239C92AC' fill-opacity='0.4' fill-rule='evenodd'%3E%3Cpath d='M0 40L40 0H20L0 20M40 40V20L20 40'/%3E%3C/g%3E%3C/svg%3E");
/* Thanks to HeroPatterns for the bg */
}
.temp-bg { @extend %temp-bg; }
/*--------------------------------------------------------------
>> Mixins
--------------------------------------------------------------*/
/*------------------ > Constructor < -------------------*/
@mixin constructor() { } /* optional, just a quick way to set up styles */
/*-------------------- > Startup < ---------------------*/
$base-size: 16px;
$btn-size: 16px; // btn font size
@mixin setBaseFontSize($size) { $base-size: $size; }
@mixin setLinkSize($size) { $btn-size: $size; }
@mixin setFont($font, $size, $color: #000000, $weight: normal) {
font-family: $font;
font-size: $size;
font-weight: $weight;
color: $color;
}
@mixin setH1Size($h1) { h1 { font-size: $h1 } }
@mixin setH1Size($h2) { h2 { font-size: $h2 } }
@mixin setH1Size($h3) { h3 { font-size: $h3 } }
@mixin setH1Size($h4) { h4 { font-size: $h4 } }
@mixin setH1Size($h5) { h5 { font-size: $h5 } }
@mixin setH1Size($h6) { h6 { font-size: $h6 } }
@mixin setHeaderSizes($size-list) {
$i: 1;
@each $size in $size-list {
h#{$i} { font-size: $size; margin: 0; }
$i: $i + 1;
}
}
@mixin setHeaderSizesPxEm($size-list) { /* Decimal Precision Error: Invalid CSS (ex. 22 / 16 px = 1.375em DNW) */
$i: 1;
@each $size in $size-list {
$size: ($size / $base-size)em;
h#{$i} { font-size: $size; }
$i: $i + 1;
}
}
/*-------------- > Layout & Structure < ----------------*/
@mixin flex($dir: row, $p-axis: flex-start, $c-axis: flex-start) {
/* Flex-Direction -- $dir (flex-direction) */
@if($dir == "col") {
$dir: column;
}
display: flex; // row = row (DEFAULT)
flex-direction: $dir; // col = column
/* Justify-Content -- $p-axis (primary axis) */
@if($p-axis == "fs") { $p-axis: flex-start; } // fs = flex-start (DEFAULT)
@else if($p-axis == "fe") { $p-axis: flex-end; } // fe = flex-end
@else if($p-axis == "c") { $p-axis: center; } // c = center
@else if($p-axis == "sb") { $p-axis: space-between; } // sb = space-between
@else if($p-axis == "sa") { $p-axis: space-around; } // sa = space-around
@else if($p-axis == "se") { $p-axis: space-evenly; } // se = space-evenly
justify-content: $p-axis;
/* Align-Items -- $c-axis (cross axis) */
@if($c-axis == "fs") { $c-axis: flex-start; } // fs = flex-start (DEFAULT)
@else if($c-axis == "fe") { $c-axis: flex-end; } // fe = flex-end
@else if($c-axis == "c") { $c-axis: center; } // c = center
@else if($c-axis == "b") { $c-axis: baseline; } // b = baseline
@else if($c-axis == "s") { $c-axis: stretch; } // s = stretch
align-items: $c-axis;
}
@mixin full-w { width: 100%; }
@mixin full-h { height: 100vh; }
@mixin row { display: flex; }
@mixin col { @include row; flex-direction: column; }
@mixin bg-image($imgpath, $position: 0 0, $size: cover, $repeat: no-repeat) {
background: {
image: url($imgpath);
position: $position;
repeat: $repeat;
}
background-size: $size;
}
@mixin btn($color, $bg-color, $border: none, $font-size: $btn-size,) {
font-size: $font-size;
text-decoration: none;
text-align: center;
color: $color;
background-color: $bg-color;
border: $border;
}
@mixin rect($width, $height, $bg-color) {
width: $width;
height: $height;
background-color: $bg-color;
}
@mixin rotate($deg) {
transform: rotate($deg);
-webkit-transform: rotate($deg);
-moz-transform: rotate($deg);
-ms-transform: rotate($deg);
-o-transform: rotate($deg);
}
/*--------------------------------------------------------------
>> Classes
--------------------------------------------------------------*/
.full-w { @include full-w; }
.full-h { @include full-h; }
.row { @include row; }
.col { @include col; }
/*--------------------------------------------------------------
>> Defaults
--------------------------------------------------------------*/
::-moz-selection {
background: #b3d4fc;
text-shadow: none;
}
::selection {
background: #b3d4fc;
text-shadow: none;
}
hr { /* A better looking default horizontal rule */
display: block;
height: 1px;
border: 0;
border-top: 1px solid #ccc;
margin: 1em 0;
padding: 0;
}
fieldset { /* Remove default fieldset styles. */
border: 0;
margin: 0;
padding: 0;
}
textarea { /* Allow only vertical resizing of textareas. */
resize: vertical;
}