|
2 | 2 | // Globals |
3 | 3 | // ============================================================================= |
4 | 4 |
|
5 | | -// |
6 | | -// Helper functions |
7 | | -// -------------------------------------------------- |
8 | | - |
9 | | -// Pow function, used in the type scale. |
10 | | -@function pow($number, $exponent) { |
11 | | - $value: 1; |
12 | | - |
13 | | - @if $exponent > 0 { |
14 | | - @for $i from 1 through $exponent { |
15 | | - $value: $value * $number; |
16 | | - } |
17 | | - } @else if $exponent < 0 { |
18 | | - @for $i from 1 through -$exponent { |
19 | | - $value: $value / $number; |
20 | | - } |
21 | | - } |
22 | | - |
23 | | - @return $value; |
24 | | -} |
25 | | - |
26 | | -// |
27 | | -// Base |
28 | | -// -------------------------------------------------- |
29 | | - |
30 | | -// Font size for small devices |
31 | | -$font-size: 16 !default; |
32 | | - |
33 | | -// Font size for big devices |
34 | | -$font-size-secondary: 18 !default; |
35 | | - |
36 | | -// Tracking |
37 | | -$letter-spacing: 0.05em !default; |
38 | | - |
39 | | -// Font families |
40 | | -$font-primary: "Helvetica", "Arial", sans-serif !default; |
41 | | -$font-secondary: "Helvetica", "Arial", sans-serif !default; |
42 | | -$font-mono: "Consolas", monospace !default; |
43 | | -$font-print-primary: "Georgia", "Times New Roman", "Times", serif !default; |
44 | | -$font-print-secondary: "Georgia", "Times New Roman", "Times", serif !default; |
45 | | - |
46 | | -// Enable margins to all the elements |
47 | | -// except the first one in each nesting level |
48 | | -$automargin: true !default; |
49 | | - |
50 | | -// ^ How much margin for those elements |
51 | | -$block-margin: 1lh !default; |
52 | | - |
53 | | -// Transition duration |
54 | | -$transition-duration: 150ms !default; |
55 | | - |
56 | | -// Custom media queries |
57 | | -// Use as @media (--medium) { … } |
58 | | -@custom-media --extra-small (width <= 480px); |
59 | | -@custom-media --small (width >= 480px); |
60 | | -@custom-media --medium (width >= 768px); |
61 | | -@custom-media --large (width >= 960px); |
62 | | -@custom-media --extra-large (width >= 1100px); |
63 | | -@custom-media --only-small (480px < width <= 768px); |
64 | | -@custom-media --only-medium (768px < width <= 980px); |
65 | | -@custom-media --only-large (980px < width <= 1100px); |
66 | | - |
67 | | -// Spacing variables |
68 | | -$spacing-xs: 0.5lh !default; |
69 | | -$spacing-s: 1lh !default; |
70 | | -$spacing-m: 2lh !default; |
71 | | -$spacing-l: 3lh !default; |
72 | | -$spacing-xl: 4lh !default; |
73 | | - |
74 | | -// |
75 | | -// Type Scale |
76 | | -// -------------------------------------------------- |
77 | | - |
78 | | -// Suggested ratios |
79 | | -// Source: http://type-scale.com/ |
80 | | -$_minor-second: 1.067 !default; |
81 | | -$_major-second: 1.125 !default; |
82 | | -$_minor-third: 1.200 !default; |
83 | | -$_major-third: 1.250 !default; |
84 | | -$_perfect-fourth: 1.333 !default; |
85 | | -$_augmented-fourth: 1.414 !default; |
86 | | -$_perfect-fifth: 1.500 !default; |
87 | | -$_golden-ratio: 1.618 !default; |
88 | | - |
89 | | -// Ratio for primary scale |
90 | | -$scale-ratio: $_minor-third !default; |
91 | | - |
92 | | -// Ratio for secondary scale |
93 | | -$scale-ratio-secondary: $_perfect-fourth !default; |
94 | | - |
95 | | -// Function to easily retrieve sizes from a scale. |
96 | | -@function typeScale($size, $ratio: $scale-ratio) { |
97 | | - @return pow($ratio, $size - 2) * 1rem; |
98 | | -} |
99 | | - |
100 | | -// |
101 | | -// Grid |
102 | | -// -------------------------------------------------- |
103 | | - |
104 | | -// Enable grid styles |
105 | | -$enable-grid: true !default; |
106 | | - |
107 | | -// Enable x-*, sm-*, md-*, lg-*, xl-* columns and offsets |
108 | | -$full-grid: false !default; |
109 | | - |
110 | | -// Max width for container |
111 | | -$container-width: 1200px !default; |
112 | | - |
113 | | -// Gutter size |
114 | | -$gutter: 2rem !default; |
115 | | - |
116 | | -// Number of columns in a row |
117 | | -$num-columns: 12 !default; |
118 | | - |
119 | | -// Prefix for attributes |
120 | | -$prefix: '' !default; |
121 | | - |
122 | | -// Create columns and offsets above this breakpoint |
123 | | -$breakpoint: --small !default; |
124 | | - |
125 | | -// |
126 | | -// Color Palette |
127 | | -// -------------------------------------------------- |
128 | | -// Use the getColor() function to use those values in |
129 | | -// your stylesheets. Example: getColor(base, primary) |
130 | | - |
131 | | -$colors: ( |
132 | | - base: ( |
133 | | - "primary": #C65146, |
134 | | - "selection": #EBE1D3, |
135 | | - "lines": #DCDCDC |
136 | | - ), |
137 | | - |
138 | | - text: ( |
139 | | - "primary": #444, |
140 | | - "secondary": #777, |
141 | | - "heading": #222, |
142 | | - "inverted": white |
143 | | - ), |
144 | | - |
145 | | - background: ( |
146 | | - "dark": #32373d, |
147 | | - "light": #f5f5f5, |
148 | | - "body": white |
149 | | - ), |
150 | | - |
151 | | - state: ( |
152 | | - "muted": #eee, |
153 | | - "success": #10a887, |
154 | | - "warning": #F17F42, |
155 | | - "error": #da3c3c |
156 | | - ), |
157 | | - |
158 | | - blue: ( |
159 | | - "darker": #1573b6, |
160 | | - "dark": #1e80c6, |
161 | | - "base": #2b90d9, |
162 | | - "light": #3fa2e9, |
163 | | - "lighter": #4eb1f9 |
164 | | - ), |
165 | | - |
166 | | - green: ( |
167 | | - "darker": #089073, |
168 | | - "dark": #0b9d7d, |
169 | | - "base": #10a887, |
170 | | - "light": #1eb896, |
171 | | - "lighter": #28ceaa |
172 | | - ), |
173 | | - |
174 | | - red: ( |
175 | | - "darker": #653131, |
176 | | - "dark": #b73333, |
177 | | - "base": #da3c3c, |
178 | | - "light": #f25a5a, |
179 | | - "lighter": #fa8181 |
180 | | - ), |
181 | | - |
182 | | - gray: ( |
183 | | - "darker": #333333, |
184 | | - "dark": #4d4d4d, |
185 | | - "base": #666666, |
186 | | - "light": #808080, |
187 | | - "lighter": #999999 |
188 | | - ) |
189 | | -) !default; |
190 | | - |
191 | | -// |
192 | | -// getColor Function |
193 | | -// -------------------------------------------------- |
194 | | -// Easily retrieve colors from the $colors map. |
195 | | -// |
196 | | - |
197 | | -@function getColor($color, $value: "base") { |
198 | | - @return map-get(map-get($colors, $color), $value); |
199 | | -} |
| 5 | +@import 'globals/pow-function'; |
| 6 | +@import 'globals/settings'; |
| 7 | +@import 'globals/getColor-function'; |
| 8 | +@import 'globals/typeScale-function'; |
0 commit comments