garth-jekyll-theme 0.1.9 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (97) hide show
  1. checksums.yaml +4 -4
  2. data/_includes/footer.html +1 -1
  3. data/_includes/header.html +22 -6
  4. data/_includes/pagination.html +16 -12
  5. data/_includes/posts.html +2 -2
  6. data/_layouts/default.html +5 -0
  7. data/_layouts/front.html +3 -5
  8. data/_layouts/page.html +3 -5
  9. data/_layouts/post.html +4 -6
  10. data/_sass/_sassline-base.scss +7 -0
  11. data/_sass/sassline-base/_layouts.scss +282 -0
  12. data/_sass/sassline-base/_mixins.scss +420 -0
  13. data/_sass/sassline-base/_modular-scale.scss +66 -0
  14. data/_sass/sassline-base/_reset.scss +13 -0
  15. data/_sass/sassline-base/_typography.scss +363 -0
  16. data/_sass/sassline-base/_variables.scss +96 -0
  17. data/_sass/sassline.scss +1 -0
  18. data/_sass/style.scss +12 -0
  19. data/_sass/theme.scss +74 -20
  20. metadata +11 -79
  21. data/_includes/favicons.html +0 -18
  22. data/_includes/nav.html +0 -14
  23. data/_includes/scripts.js +0 -14
  24. data/_sass/base/_base.scss +0 -14
  25. data/_sass/base/_buttons.scss +0 -35
  26. data/_sass/base/_forms.scss +0 -83
  27. data/_sass/base/_layout.scss +0 -9
  28. data/_sass/base/_lists.scss +0 -19
  29. data/_sass/base/_media.scss +0 -9
  30. data/_sass/base/_tables.scss +0 -24
  31. data/_sass/base/_typography.scss +0 -42
  32. data/_sass/base/_variables.scss +0 -46
  33. data/_sass/bourbon/_bourbon.scss +0 -52
  34. data/_sass/bourbon/bourbon/helpers/_buttons-list.scss +0 -14
  35. data/_sass/bourbon/bourbon/helpers/_scales.scss +0 -27
  36. data/_sass/bourbon/bourbon/helpers/_text-inputs-list.scss +0 -26
  37. data/_sass/bourbon/bourbon/library/_border-color.scss +0 -25
  38. data/_sass/bourbon/bourbon/library/_border-radius.scss +0 -85
  39. data/_sass/bourbon/bourbon/library/_border-style.scss +0 -24
  40. data/_sass/bourbon/bourbon/library/_border-width.scss +0 -24
  41. data/_sass/bourbon/bourbon/library/_buttons.scss +0 -84
  42. data/_sass/bourbon/bourbon/library/_clearfix.scss +0 -25
  43. data/_sass/bourbon/bourbon/library/_contrast-switch.scss +0 -60
  44. data/_sass/bourbon/bourbon/library/_ellipsis.scss +0 -37
  45. data/_sass/bourbon/bourbon/library/_font-face.scss +0 -65
  46. data/_sass/bourbon/bourbon/library/_font-stacks.scss +0 -87
  47. data/_sass/bourbon/bourbon/library/_hide-text.scss +0 -24
  48. data/_sass/bourbon/bourbon/library/_hide-visually.scss +0 -65
  49. data/_sass/bourbon/bourbon/library/_margin.scss +0 -34
  50. data/_sass/bourbon/bourbon/library/_modular-scale.scss +0 -113
  51. data/_sass/bourbon/bourbon/library/_padding.scss +0 -34
  52. data/_sass/bourbon/bourbon/library/_position.scss +0 -54
  53. data/_sass/bourbon/bourbon/library/_prefixer.scss +0 -38
  54. data/_sass/bourbon/bourbon/library/_shade.scss +0 -33
  55. data/_sass/bourbon/bourbon/library/_size.scss +0 -49
  56. data/_sass/bourbon/bourbon/library/_strip-unit.scss +0 -17
  57. data/_sass/bourbon/bourbon/library/_text-inputs.scss +0 -163
  58. data/_sass/bourbon/bourbon/library/_timing-functions.scss +0 -38
  59. data/_sass/bourbon/bourbon/library/_tint.scss +0 -33
  60. data/_sass/bourbon/bourbon/library/_triangle.scss +0 -82
  61. data/_sass/bourbon/bourbon/library/_value-prefixer.scss +0 -38
  62. data/_sass/bourbon/bourbon/library/_word-wrap.scss +0 -29
  63. data/_sass/bourbon/bourbon/settings/_settings.scss +0 -51
  64. data/_sass/bourbon/bourbon/utilities/_assign-inputs.scss +0 -29
  65. data/_sass/bourbon/bourbon/utilities/_collapse-directionals.scss +0 -51
  66. data/_sass/bourbon/bourbon/utilities/_directional-values.scss +0 -58
  67. data/_sass/bourbon/bourbon/utilities/_font-source-declaration.scss +0 -52
  68. data/_sass/bourbon/bourbon/utilities/_retrieve-bourbon-setting.scss +0 -16
  69. data/_sass/bourbon/bourbon/utilities/_unpack.scss +0 -29
  70. data/_sass/bourbon/bourbon/validators/_contains-falsy.scss +0 -20
  71. data/_sass/bourbon/bourbon/validators/_contains.scss +0 -27
  72. data/_sass/bourbon/bourbon/validators/_is-color.scss +0 -13
  73. data/_sass/bourbon/bourbon/validators/_is-length.scss +0 -15
  74. data/_sass/bourbon/bourbon/validators/_is-light.scss +0 -23
  75. data/_sass/bourbon/bourbon/validators/_is-number.scss +0 -15
  76. data/_sass/bourbon/bourbon/validators/_is-size.scss +0 -18
  77. data/_sass/neat/_neat-helpers.scss +0 -8
  78. data/_sass/neat/_neat.scss +0 -23
  79. data/_sass/neat/functions/_new-breakpoint.scss +0 -49
  80. data/_sass/neat/functions/_private.scss +0 -114
  81. data/_sass/neat/grid/_box-sizing.scss +0 -15
  82. data/_sass/neat/grid/_direction-context.scss +0 -33
  83. data/_sass/neat/grid/_display-context.scss +0 -28
  84. data/_sass/neat/grid/_fill-parent.scss +0 -22
  85. data/_sass/neat/grid/_media.scss +0 -92
  86. data/_sass/neat/grid/_omega.scss +0 -87
  87. data/_sass/neat/grid/_outer-container.scss +0 -38
  88. data/_sass/neat/grid/_pad.scss +0 -25
  89. data/_sass/neat/grid/_private.scss +0 -35
  90. data/_sass/neat/grid/_row.scss +0 -52
  91. data/_sass/neat/grid/_shift.scss +0 -50
  92. data/_sass/neat/grid/_span-columns.scss +0 -94
  93. data/_sass/neat/grid/_to-deprecate.scss +0 -97
  94. data/_sass/neat/grid/_visual-grid.scss +0 -42
  95. data/_sass/neat/settings/_disable-warnings.scss +0 -13
  96. data/_sass/neat/settings/_grid.scss +0 -51
  97. data/_sass/neat/settings/_visual-grid.scss +0 -27
@@ -0,0 +1,420 @@
1
+ // SCSS mixins
2
+ // ---------------------------------------
3
+
4
+ // Global variables used in mixins.
5
+
6
+ // Number of breakpoints.
7
+ $breakpoints-limit: length($breakpoints);
8
+
9
+ // List of rootsizes, breakpoints, and max-widths.
10
+ $sizes: map-values($rootsizes);
11
+ $points: map-values($breakpoints);
12
+ $line-widths: map-values($measures);
13
+ $max-widths: map-values($maxwidths);
14
+
15
+
16
+ // Breakpoints. Either set one to one of the breakpoint variables, or use a custom value for minor breakpoints.
17
+ // Defaults to min-width, but both min->max and max-width are available too.
18
+ // Parts based on https://gist.github.com/timknight/03e6335b8816aa534cf7
19
+ @mixin breakpoint($break: 0, $max: 0) {
20
+ // Type of break variable
21
+ $value: type-of($break);
22
+
23
+ // If it is a string (i.e. a breakpoint variable).
24
+ @if $value == string {
25
+ // If using 'break-1', 'break-2' etc output the correct breakpoints from map.
26
+ @if map-has-key($breakpoints, $break) {
27
+ @media screen and (min-width: #{map-get($breakpoints, $break) / 16 * 1em} ) { @content; }
28
+ } @else {
29
+ @warn "#{$break} is not a set breakpoint variable";
30
+ }
31
+
32
+ // If it is a number, use this for the breakpoint.
33
+ } @else if $value == number {
34
+ // If using other numbers output value in ems either for min, min & max or max width breakpoints.
35
+ $query: "all" !default;
36
+ @if $break != 0 and $max != 0 { $query: "(min-width: #{$break / 16 * 1em}) and (max-width: #{$max / 16 * 1em})"; }
37
+ @else if $break != 0 and $max == 0 { $query: "(min-width: #{$break / 16 * 1em})"; }
38
+ @else if $break == 0 and $max != 0 { $query: "(max-width: #{$max / 16 * 1em})"; }
39
+ @media #{$query} { @content; }
40
+
41
+ } @else {
42
+ @warn "#{$break} is not valid to use as a breakpoint";
43
+ }
44
+ }
45
+
46
+ // Root font-size in %, outputted in correct breakpoints.
47
+ @mixin rootsize {
48
+ font-size: nth($sizes, 1) / 16 * 100%;
49
+
50
+ // Loop through breakpoints.
51
+ @for $i from 2 through $breakpoints-limit {
52
+ @media screen and (min-width: nth($points, $i) / 16 * 1em ) {
53
+ font-size: nth($sizes, $i) / 16 * 100%;
54
+ }
55
+ }
56
+ }
57
+
58
+ // Max-widths for typeset containers, outputted in correct breakpoints.
59
+ @mixin maxwidth($breakpoint: 0) {
60
+ // Type of chosen variables.
61
+ $break-value: type-of($breakpoint);
62
+
63
+ // If specifying a breakpoint to use (and breakpoint exists).
64
+ @if $break-value == number and $breakpoint <= ($breakpoints-limit - 1) and $breakpoint >= 0 {
65
+
66
+ max-width: #{nth($max-widths, ($breakpoint + 1)) / nth($sizes, ($breakpoint + 1))}rem;
67
+
68
+ } @else if $breakpoint == all {
69
+ max-width: #{nth($max-widths, 1) / nth($sizes, 1)}rem;
70
+
71
+ // Loop through breakpoints.
72
+ @for $i from 2 through $breakpoints-limit {
73
+ @media screen and (min-width: nth($points, $i) / 16 * 1em ) {
74
+ max-width: #{nth($max-widths, $i) / nth($sizes, $i)}rem;
75
+ }
76
+ }
77
+ }
78
+ }
79
+
80
+ // Set the measure for single columns, outputted in correct breakpoints.
81
+ @mixin measure($breakpoint: 0) {
82
+ // Type of chosen variables.
83
+ $break-value: type-of($breakpoint);
84
+
85
+ // If specifying a breakpoint to use (and breakpoint exists).
86
+ @if $break-value == number and $breakpoint <= ($breakpoints-limit - 1) and $breakpoint >= 0 {
87
+
88
+ max-width: #{nth($line-widths, ($breakpoint + 1)) / nth($sizes, ($breakpoint + 1))}rem;
89
+
90
+ } @else if $breakpoint == all {
91
+ max-width: #{nth($line-widths, 1) / nth($sizes, 1)}rem;
92
+
93
+ // Loop through breakpoints.
94
+ @for $i from 2 through $breakpoints-limit {
95
+ @media screen and (min-width: nth($points, $i) / 16 * 1em ) {
96
+ max-width: #{nth($line-widths, $i) / nth($sizes, $i)}rem;
97
+ }
98
+ }
99
+ }
100
+ }
101
+
102
+ // Calculate percentage width of container to get optimal measure for main text columns.
103
+ // Defaults to all breakpoints.
104
+ // Note: will not output for base breakpoint as this comes from the 'measure' mixin.
105
+ @mixin ideal-measure($breakpoint: 0, $gutter: 0, $main: true, $output: max-width) {
106
+ // Type of chosen variables.
107
+ $break-value: type-of($breakpoint);
108
+
109
+ // If specifying a breakpoint to use (and breakpoint exists and is larger than 0).
110
+ @if $break-value == number and $breakpoint <= ($breakpoints-limit - 1) and $breakpoint > 0 {
111
+
112
+ @if $gutter == small {
113
+ $gutter: map-get($gutterwidths, small) * 2 / 1rem;
114
+ } @else if $gutter == medium {
115
+ $gutter: map-get($gutterwidths, medium) * 2 / 1rem;
116
+ } @else if $gutter == large {
117
+ $gutter: map-get($gutterwidths, large) * 2 / 1rem;
118
+ } @else {
119
+ $gutter: 0;
120
+ }
121
+
122
+ $rootsize: map-get($rootsizes, rootsize-#{$breakpoint});
123
+ $ideal-measure: map-get($measures, measure-#{$breakpoint});
124
+ $gutter-size: ($gutter * $rootsize);
125
+ $container-width: map-get($maxwidths, width-#{$breakpoint});
126
+
127
+ $percentage: percentage(($ideal-measure + $gutter-size) / $container-width);
128
+
129
+ @if $percentage < 55 {
130
+ $percentage: 55%;
131
+ } @else if $percentage > 65 {
132
+ $percentage: 65%;
133
+ }
134
+
135
+ @if $main == false {
136
+ $percentage: 100 - $percentage;
137
+ }
138
+
139
+ #{$output}: $percentage;
140
+ }
141
+ }
142
+
143
+ // Value in scale in $modular-scale?
144
+ // Used in following fontsize mixin.
145
+ @function in-modular-scale($scale, $key) {
146
+ $map: map-get($modular-scale, $scale);
147
+ $output: map-has-key($map, $key);
148
+ @return $output;
149
+ }
150
+
151
+ // Font-size in rems. Either set per breakpoint or for all.
152
+ // Use values as you would for pixels i.e. 16 or use values from the modular scale.
153
+ @mixin fontsize($fontsize, $breakpoint: 0) {
154
+ // Type of chosen variables.
155
+ $font-value: type-of($fontsize);
156
+ $break-value: type-of($breakpoint);
157
+
158
+ // Check if value exists in scale.
159
+ $in-scale: in-modular-scale(scale-0, $fontsize);
160
+
161
+ // If specifying a breakpoint to use (and breakpoint exists).
162
+ @if $break-value == number and $breakpoint <= ($breakpoints-limit - 1) and $breakpoint >= 0 {
163
+
164
+ // If using a number for fontsize.
165
+ @if $font-value == number {
166
+ font-size: #{$fontsize / nth($sizes, ($breakpoint + 1))}rem;
167
+
168
+ // If using a variable from the scale for fontsize.
169
+ } @else if $in-scale == true {
170
+ $get-scale: map-get($modular-scale, scale-#{$breakpoint});
171
+ $get-size: map-get($get-scale, $fontsize);
172
+
173
+ font-size: #{$get-size / nth($sizes, ($breakpoint + 1))}rem;
174
+
175
+ } @else {
176
+ @warn "#{$fontsize} is not a valid scale variable";
177
+ }
178
+
179
+ // If want to use value for all breakpoints.
180
+ } @else if $breakpoint == all {
181
+
182
+ // If using a number for fontsize.
183
+ @if $font-value == number {
184
+ font-size: #{$fontsize / nth($sizes, 1)}rem;
185
+
186
+ // Loop through breakpoints.
187
+ @for $i from 2 through $breakpoints-limit {
188
+ @media screen and (min-width: nth($points, $i) / 16 * 1em ) {
189
+ font-size: #{$fontsize / nth($sizes, $i)}rem;
190
+ }
191
+ }
192
+
193
+ // If using a variable from the scale for fontsize.
194
+ } @else if $in-scale == true {
195
+ $get-scale: map-get($modular-scale, scale-0);
196
+ $get-size: map-get($get-scale, $fontsize);
197
+ font-size: #{$get-size / nth($sizes, 1)}rem;
198
+
199
+ // Loop through breakpoints.
200
+ @for $i from 2 through $breakpoints-limit {
201
+ $get-scale: map-get($modular-scale, scale-#{$i - 1});
202
+ $get-size: map-get($get-scale, $fontsize);
203
+
204
+ @media screen and (min-width: nth($points, $i) / 16 * 1em ) {
205
+ font-size: #{$get-size / nth($sizes, $i)}rem;
206
+ }
207
+ }
208
+
209
+ } @else {
210
+ @warn "#{$fontsize} is not a valid scale variable";
211
+ }
212
+
213
+ } @else {
214
+ @warn "#{$breakpoint} is not valid to use as a breakpoint";
215
+ }
216
+ }
217
+
218
+ // Advanced baseline magic.
219
+ // ! Read the README to help understand what is going on here.
220
+ // Parts based on https://gist.github.com/razwan/10662500
221
+ @mixin baseline($fontsize, $font, $lineheight: 2, $below: 2, $breakpoint: 0) {
222
+ // Type of chosen variables.
223
+ $font-value: type-of($fontsize);
224
+ $break-value: type-of($breakpoint);
225
+
226
+ // Cap height
227
+ $cap-height: map-get($font, cap-height);
228
+
229
+ // Check if value exists in scale.
230
+ $in-scale: in-modular-scale(scale-0, $fontsize);
231
+
232
+ // Set the line-height (if it isn’t set at 0).
233
+ @if $lineheight != 0 {
234
+ line-height: #{$lineheight}rem;
235
+ }
236
+
237
+ // If specifying a breakpoint to use (and breakpoint exists).
238
+ @if $break-value == number and $breakpoint <= ($breakpoints-limit - 1) and $breakpoint >= 0 {
239
+
240
+ // If using a number for fontsize.
241
+ @if $font-value == number {
242
+ $rootsize: nth($sizes, ($breakpoint + 1));
243
+ $baseline-shift: #{($fontsize / 2 * (($lineheight * $rootsize / $fontsize) - $cap-height)) / $rootsize + 0.00001};
244
+ $baseline-push: #{$below - (($fontsize / 2 * (($lineheight * $rootsize / $fontsize) - $cap-height)) / $rootsize + 0.00001)};
245
+
246
+ margin-bottom: #{$baseline-push}rem;
247
+ padding-top: #{$baseline-shift}rem;
248
+
249
+ // If using a variable from the scale for fontsize.
250
+ } @else if $in-scale == true {
251
+ $get-scale: map-get($modular-scale, scale-#{$breakpoint});
252
+ $get-size: map-get($get-scale, $fontsize);
253
+ $rootsize: nth($sizes, ($breakpoint + 1));
254
+
255
+ $baseline-shift: #{($get-size / 2 * (($lineheight * $rootsize / $get-size) - $cap-height)) / $rootsize + 0.00001};
256
+ $baseline-push: #{$below - (($get-size / 2 * (($lineheight * $rootsize / $get-size) - $cap-height)) / $rootsize + 0.00001)};
257
+
258
+ margin-bottom: #{$baseline-push}rem;
259
+ padding-top: #{$baseline-shift}rem;
260
+
261
+ } @else {
262
+ @warn "#{$fontsize} is not a valid scale variable";
263
+ }
264
+
265
+ // If want to use value for all breakpoints.
266
+ } @else if $breakpoint == all {
267
+
268
+ // If using a number for fontsize.
269
+ @if $font-value == number {
270
+ $rootsize: nth($sizes, 1);
271
+ $baseline-shift: #{($fontsize / 2 * (($lineheight * $rootsize / $fontsize) - $cap-height)) / $rootsize + 0.00001};
272
+ $baseline-push: #{$below - (($fontsize / 2 * (($lineheight * $rootsize / $fontsize) - $cap-height)) / $rootsize + 0.00001)};
273
+
274
+ margin-bottom: #{$baseline-push}rem;
275
+ padding-top: #{$baseline-shift}rem;
276
+
277
+ // Loop through breakpoints.
278
+ @for $i from 2 through $breakpoints-limit {
279
+ $rootsize: nth($sizes, $i);
280
+ $baseline-shift: #{($fontsize / 2 * (($lineheight * $rootsize / $fontsize) - $cap-height)) / $rootsize + 0.00001};
281
+ $baseline-push: #{$below - (($fontsize / 2 * (($lineheight * $rootsize / $fontsize) - $cap-height)) / $rootsize + 0.00001)};
282
+
283
+ @media screen and (min-width: nth($points, $i) / 16 * 1em ) {
284
+ margin-bottom: #{$baseline-push}rem;
285
+ padding-top: #{$baseline-shift}rem;
286
+ }
287
+ }
288
+
289
+ // If using a variable from the scale for fontsize.
290
+ } @else if $in-scale == true {
291
+ $get-scale: map-get($modular-scale, scale-0);
292
+ $get-size: map-get($get-scale, $fontsize);
293
+ $rootsize: nth($sizes, 1);
294
+
295
+ $baseline-shift: #{($get-size / 2 * (($lineheight * $rootsize / $get-size) - $cap-height)) / $rootsize + 0.00001};
296
+ $baseline-push: #{$below - (($get-size / 2 * (($lineheight * $rootsize / $get-size) - $cap-height)) / $rootsize + 0.00001)};
297
+
298
+ margin-bottom: #{$baseline-push}rem;
299
+ padding-top: #{$baseline-shift}rem;
300
+
301
+ // Loop through breakpoints.
302
+ @for $i from 2 through $breakpoints-limit {
303
+ $get-scale: map-get($modular-scale, scale-#{$i - 1});
304
+ $get-size: map-get($get-scale, $fontsize);
305
+ $rootsize: nth($sizes, $i);
306
+
307
+ $baseline-shift: #{($get-size / 2 * (($lineheight * $rootsize / $get-size) - $cap-height)) / $rootsize + 0.00001};
308
+ $baseline-push: #{$below - (($get-size / 2 * (($lineheight * $rootsize / $get-size) - $cap-height)) / $rootsize + 0.00001)};
309
+
310
+ @media screen and (min-width: nth($points, $i) / 16 * 1em ) {
311
+ margin-bottom: #{$baseline-push}rem;
312
+ padding-top: #{$baseline-shift}rem;
313
+ }
314
+ }
315
+
316
+ } @else {
317
+ @warn "#{$fontsize} is not a valid scale variable";
318
+ }
319
+
320
+ } @else {
321
+ @warn "#{$breakpoint} is not valid to use as a breakpoint";
322
+ }
323
+ }
324
+
325
+ // Set fontsize and baseline at once. Mix of fontsize and baseline mixin.
326
+ @mixin sassline($fontsize, $font, $lineheight: 2, $below: 2, $breakpoint: 0) {
327
+ $font-value: type-of($fontsize);
328
+ $break-value: type-of($breakpoint);
329
+ $cap-height: map-get($font, cap-height);
330
+ $in-scale: in-modular-scale(scale-0, $fontsize);
331
+
332
+ line-height: #{$lineheight}rem;
333
+
334
+ @if $break-value == number and $breakpoint <= ($breakpoints-limit - 1) and $breakpoint >= 0 {
335
+
336
+ @if $font-value == number {
337
+ $rootsize: nth($sizes, ($breakpoint + 1));
338
+ $baseline-shift: #{($fontsize / 2 * (($lineheight * $rootsize / $fontsize) - $cap-height)) / $rootsize + 0.00001};
339
+ $baseline-push: #{$below - (($fontsize / 2 * (($lineheight * $rootsize / $fontsize) - $cap-height)) / $rootsize + 0.00001)};
340
+ font-size: #{$fontsize / nth($sizes, ($breakpoint + 1))}rem;
341
+ margin-bottom: #{$baseline-push}rem;
342
+ padding-top: #{$baseline-shift}rem;
343
+
344
+ } @else if $in-scale == true {
345
+ $get-scale: map-get($modular-scale, scale-#{$breakpoint});
346
+ $get-size: map-get($get-scale, $fontsize);
347
+ $rootsize: nth($sizes, ($breakpoint + 1));
348
+ $baseline-shift: #{($get-size / 2 * (($lineheight * $rootsize / $get-size) - $cap-height)) / $rootsize + 0.00001};
349
+ $baseline-push: #{$below - (($get-size / 2 * (($lineheight * $rootsize / $get-size) - $cap-height)) / $rootsize + 0.00001)};
350
+ font-size: #{$get-size / nth($sizes, ($breakpoint + 1))}rem;
351
+ margin-bottom: #{$baseline-push}rem;
352
+ padding-top: #{$baseline-shift}rem;
353
+
354
+ } @else {
355
+ @warn "#{$fontsize} is not a valid scale variable";
356
+ }
357
+
358
+ } @else if $breakpoint == all {
359
+
360
+ @if $font-value == number {
361
+ $rootsize: nth($sizes, 1);
362
+ $baseline-shift: #{($fontsize / 2 * (($lineheight * $rootsize / $fontsize) - $cap-height)) / $rootsize + 0.00001};
363
+ $baseline-push: #{$below - (($fontsize / 2 * (($lineheight * $rootsize / $fontsize) - $cap-height)) / $rootsize + 0.00001)};
364
+ font-size: #{$fontsize / nth($sizes, 1)}rem;
365
+ margin-bottom: #{$baseline-push}rem;
366
+ padding-top: #{$baseline-shift}rem;
367
+
368
+ @for $i from 2 through $breakpoints-limit {
369
+ $rootsize: nth($sizes, $i);
370
+ $baseline-shift: #{($fontsize / 2 * (($lineheight * $rootsize / $fontsize) - $cap-height)) / $rootsize + 0.00001};
371
+ $baseline-push: #{$below - (($fontsize / 2 * (($lineheight * $rootsize / $fontsize) - $cap-height)) / $rootsize + 0.00001)};
372
+ @media screen and (min-width: nth($points, $i) / 16 * 1em ) {
373
+ font-size: #{$fontsize / nth($sizes, $i)}rem;
374
+ margin-bottom: #{$baseline-push}rem;
375
+ padding-top: #{$baseline-shift}rem;
376
+ }
377
+ }
378
+
379
+ } @else if $in-scale == true {
380
+ $get-scale: map-get($modular-scale, scale-0);
381
+ $get-size: map-get($get-scale, $fontsize);
382
+ $rootsize: nth($sizes, 1);
383
+ $baseline-shift: #{($get-size / 2 * (($lineheight * $rootsize / $get-size) - $cap-height)) / $rootsize + 0.00001};
384
+ $baseline-push: #{$below - (($get-size / 2 * (($lineheight * $rootsize / $get-size) - $cap-height)) / $rootsize + 0.00001)};
385
+ font-size: #{$get-size / nth($sizes, 1)}rem;
386
+ margin-bottom: #{$baseline-push}rem;
387
+ padding-top: #{$baseline-shift}rem;
388
+
389
+ @for $i from 2 through $breakpoints-limit {
390
+ $get-scale: map-get($modular-scale, scale-#{$i - 1});
391
+ $get-size: map-get($get-scale, $fontsize);
392
+ $rootsize: nth($sizes, $i);
393
+ $baseline-shift: #{($get-size / 2 * (($lineheight * $rootsize / $get-size) - $cap-height)) / $rootsize + 0.00001};
394
+ $baseline-push: #{$below - (($get-size / 2 * (($lineheight * $rootsize / $get-size) - $cap-height)) / $rootsize + 0.00001)};
395
+ @media screen and (min-width: nth($points, $i) / 16 * 1em ) {
396
+ font-size: #{$get-size / nth($sizes, $i)}rem;
397
+ margin-bottom: #{$baseline-push}rem;
398
+ padding-top: #{$baseline-shift}rem;
399
+ }
400
+ }
401
+
402
+ } @else {
403
+ @warn "#{$fontsize} is not a valid scale variable";
404
+ }
405
+
406
+ } @else {
407
+ @warn "#{$breakpoint} is not valid to use as a breakpoint";
408
+ }
409
+ }
410
+
411
+ // Clearfix.
412
+ @mixin clearfix {
413
+ &:before, &:after{
414
+ display: table;
415
+ content: "";
416
+ }
417
+ &:after{
418
+ clear: both;
419
+ }
420
+ }
@@ -0,0 +1,66 @@
1
+ // Modular scale
2
+ // ---------------------------------------
3
+
4
+ // Setting responsive modular-scales. Use appropriate scales for viewport sizes.
5
+ $modular-scale: (
6
+ // Major Third http://www.modularscale.com/?16,28&px&1.25&web&text
7
+ scale-0: (
8
+ alpha: 28.0,
9
+ beta: 25.0,
10
+ gamma: 22.4,
11
+ delta: 20.0,
12
+ epsilon: 17.9,
13
+ zeta: 16.0,
14
+ eta: 14.3,
15
+ theta: 12.8,
16
+ iota: 11.5
17
+ ),
18
+ // Major Third http://www.modularscale.com/?17,30&px&1.25&web&text
19
+ scale-1: (
20
+ alpha: 30.0,
21
+ beta: 26.6,
22
+ gamma: 24.0,
23
+ delta: 21.3,
24
+ epsilon: 19.2,
25
+ zeta: 17.0,
26
+ eta: 15.3,
27
+ theta: 13.6,
28
+ iota: 12.8
29
+ ),
30
+ // Major Third http://www.modularscale.com/?18,32&px&1.25&web&text
31
+ scale-2: (
32
+ alpha: 32.0,
33
+ beta: 28.1,
34
+ gamma: 25.6,
35
+ delta: 22.5,
36
+ epsilon: 20.5,
37
+ zeta: 18.0,
38
+ eta: 16.3,
39
+ theta: 14.4,
40
+ iota: 13.1
41
+ ),
42
+ // Perfect Fourth http://www.modularscale.com/?20,40&px&1.333&web&text
43
+ scale-3: (
44
+ alpha: 40.0,
45
+ beta: 35.5,
46
+ gamma: 30.0,
47
+ delta: 26.7,
48
+ epsilon: 22.5,
49
+ zeta: 20.0,
50
+ eta: 16.9,
51
+ theta: 15.0,
52
+ iota: 12.7
53
+ ),
54
+ // Aug. Fourth http://www.modularscale.com/?22,50&px&1.414&web&text
55
+ scale-4: (
56
+ alpha: 50.0,
57
+ beta: 43.9,
58
+ gamma: 35.3,
59
+ delta: 31.1,
60
+ epsilon: 25.0,
61
+ zeta: 22.0,
62
+ eta: 17.6,
63
+ theta: 15.6,
64
+ iota: 12.5
65
+ )
66
+ );