persistentgrid 0.0.1.beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. data/README.md +5 -0
  2. data/lib/persistentgrid.rb +4 -0
  3. data/scss/pg/_helpers.scss +7 -0
  4. data/scss/pg/base/_all.scss +9 -0
  5. data/scss/pg/base/_behavior.scss +10 -0
  6. data/scss/pg/base/_helpers.scss +9 -0
  7. data/scss/pg/base/_settings.scss +10 -0
  8. data/scss/pg/base/baserules/_all.scss +8 -0
  9. data/scss/pg/base/baserules/_behavior.scss +125 -0
  10. data/scss/pg/base/baserules/_settings.scss +39 -0
  11. data/scss/pg/base/reset/_all.scss +9 -0
  12. data/scss/pg/base/reset/_behavior.scss +108 -0
  13. data/scss/pg/base/reset/_helpers.scss +7 -0
  14. data/scss/pg/base/reset/_settings.scss +27 -0
  15. data/scss/pg/base/reset/helpers/_all.scss +7 -0
  16. data/scss/pg/base/reset/helpers/_mixins.scss +395 -0
  17. data/scss/pg/base/typography/_all.scss +9 -0
  18. data/scss/pg/base/typography/_behavior.scss +31 -0
  19. data/scss/pg/base/typography/_helpers.scss +7 -0
  20. data/scss/pg/base/typography/_settings.scss +52 -0
  21. data/scss/pg/base/typography/helpers/_all.scss +8 -0
  22. data/scss/pg/base/typography/helpers/_functions.scss +160 -0
  23. data/scss/pg/base/typography/helpers/_mixins.scss +121 -0
  24. data/scss/pg/grid/_all.scss +9 -0
  25. data/scss/pg/grid/_behavior.scss +51 -0
  26. data/scss/pg/grid/_helpers.scss +8 -0
  27. data/scss/pg/grid/_settings.scss +48 -0
  28. data/scss/pg/grid/helpers/_functions.scss +140 -0
  29. data/scss/pg/grid/helpers/_mixins.scss +247 -0
  30. data/scss/pg/helpers/_all.scss +11 -0
  31. data/scss/pg/helpers/_colors.scss +163 -0
  32. data/scss/pg/helpers/_fonts.scss +21 -0
  33. data/scss/pg/helpers/_functions.scss +91 -0
  34. data/scss/pg/helpers/_mixins.scss +7 -0
  35. data/scss/pg/helpers/_settings.scss +11 -0
  36. data/scss/pg/helpers/fonts/_bree-serif.scss +27 -0
  37. data/scss/pg/helpers/fonts/_example.scss +47 -0
  38. data/scss/pg/helpers/fonts/_lato.scss +36 -0
  39. data/scss/pg/helpers/fonts/_monospace.scss +43 -0
  40. data/scss/pg/helpers/fonts/_raleway.scss +35 -0
  41. data/scss/pg/helpers/fonts/_righteous.scss +27 -0
  42. data/scss/pg/helpers/fonts/_roboto.scss +38 -0
  43. data/scss/pg/helpers/fonts/_sans-serif.scss +43 -0
  44. data/scss/pg/helpers/fonts/_serif.scss +43 -0
  45. data/scss/pg/helpers/fonts/_sofia-pro.scss +44 -0
  46. data/scss/pg/helpers/fonts/_varela-round.scss +28 -0
  47. data/scss/pg/helpers/fonts/icon-fonts/_fontawesome.scss +34 -0
  48. data/scss/pg/helpers/fonts/icon-fonts/_foundation-accessability.scss +76 -0
  49. data/scss/pg/helpers/fonts/icon-fonts/fontawesome/_bootstrap.scss +84 -0
  50. data/scss/pg/helpers/fonts/icon-fonts/fontawesome/_core.scss +129 -0
  51. data/scss/pg/helpers/fonts/icon-fonts/fontawesome/_extras.scss +93 -0
  52. data/scss/pg/helpers/fonts/icon-fonts/fontawesome/_icons.scss +381 -0
  53. data/scss/pg/helpers/fonts/icon-fonts/fontawesome/_mixins.scss +48 -0
  54. data/scss/pg/helpers/fonts/icon-fonts/fontawesome/_path.scss +14 -0
  55. data/scss/pg/helpers/fonts/icon-fonts/fontawesome/_variables.scss +734 -0
  56. data/scss/pg/helpers/fonts/icon-fonts/foundation-accessability/_settings.scss +28 -0
  57. data/scss/pg/helpers/library/_lists.scss +462 -0
  58. data/scss/pg/helpers/mixins/_all.scss +15 -0
  59. data/scss/pg/helpers/mixins/_anchors.scss +125 -0
  60. data/scss/pg/helpers/mixins/_baseline.scss +53 -0
  61. data/scss/pg/helpers/mixins/_breakpoints.scss +35 -0
  62. data/scss/pg/helpers/mixins/_content.scss +19 -0
  63. data/scss/pg/helpers/mixins/_css-triangle.scss +70 -0
  64. data/scss/pg/helpers/mixins/_elements.scss +106 -0
  65. data/scss/pg/helpers/mixins/_module.scss +327 -0
  66. data/scss/pg/helpers/mixins/_text.scss +87 -0
  67. data/scss/pg/helpers/mixins/_units.scss +67 -0
  68. data/scss/pg/helpers/settings/_all.scss +7 -0
  69. data/scss/pg/helpers/settings/_breakpoints.scss +21 -0
  70. data/scss/pg/modules/_all.scss +9 -0
  71. data/scss/pg/modules/_behavior.scss +13 -0
  72. data/scss/pg/modules/_helpers.scss +13 -0
  73. data/scss/pg/modules/_settings.scss +13 -0
  74. data/scss/pg/modules/accordions/_all.scss +8 -0
  75. data/scss/pg/modules/accordions/_behavior.scss +5 -0
  76. data/scss/pg/modules/accordions/_helpers.scss +5 -0
  77. data/scss/pg/modules/accordions/_settings.scss +4 -0
  78. data/scss/pg/modules/buttons/_all.scss +8 -0
  79. data/scss/pg/modules/buttons/_behavior.scss +89 -0
  80. data/scss/pg/modules/buttons/_helpers.scss +7 -0
  81. data/scss/pg/modules/buttons/_settings.scss +153 -0
  82. data/scss/pg/modules/buttons/helpers/_mixins.scss +33 -0
  83. data/scss/pg/modules/forms/_all.scss +8 -0
  84. data/scss/pg/modules/forms/_behavior.bak.scss +215 -0
  85. data/scss/pg/modules/forms/_behavior.scss +215 -0
  86. data/scss/pg/modules/forms/_helpers.scss +8 -0
  87. data/scss/pg/modules/forms/_settings.scss +10 -0
  88. data/scss/pg/modules/forms/helpers/_mixins.scss +94 -0
  89. data/scss/pg/modules/forms/settings/forms.scss +19 -0
  90. data/scss/pg/modules/forms/settings/input.scss +256 -0
  91. data/scss/pg/modules/forms/settings/labels.scss +101 -0
  92. data/scss/pg/modules/lists/_all.scss +9 -0
  93. data/scss/pg/modules/lists/_behavior.scss +99 -0
  94. data/scss/pg/modules/lists/_helpers.scss +11 -0
  95. data/scss/pg/modules/lists/_settings.scss +49 -0
  96. data/scss/pg/modules/tables/_all.scss +8 -0
  97. data/scss/pg/modules/tables/_behavior.scss +79 -0
  98. data/scss/pg/modules/tables/_helpers.scss +7 -0
  99. data/scss/pg/modules/tables/_settings.scss +69 -0
  100. data/scss/pg/modules/tables/helpers/_mixins.scss +9 -0
  101. data/scss/pg/modules/tabs/_all.scss +8 -0
  102. data/scss/pg/modules/tabs/_behavior.scss +77 -0
  103. data/scss/pg/modules/tabs/_helpers.scss +7 -0
  104. data/scss/pg/modules/tabs/_settings.scss +8 -0
  105. data/scss/pg/modules/tabs/helpers/_mixins.scss +4 -0
  106. data/scss/pg/skins/_crossinghippos.scss +8 -0
  107. data/scss/pg/skins/crossinghippos/_all.scss +9 -0
  108. data/scss/pg/skins/crossinghippos/_behavior.scss +10 -0
  109. data/scss/pg/skins/crossinghippos/_helpers.scss +8 -0
  110. data/scss/pg/skins/crossinghippos/_settings.scss +9 -0
  111. data/scss/pg/skins/crossinghippos/buttons/_all.scss +9 -0
  112. data/scss/pg/skins/crossinghippos/buttons/_behavior.scss +25 -0
  113. data/scss/pg/skins/crossinghippos/buttons/_helpers.scss +7 -0
  114. data/scss/pg/skins/crossinghippos/buttons/_settings.scss +50 -0
  115. data/scss/pg/skins/crossinghippos/forms/_all.scss +9 -0
  116. data/scss/pg/skins/crossinghippos/forms/_base.scss +7 -0
  117. data/scss/pg/skins/crossinghippos/forms/_behavior.scss +259 -0
  118. data/scss/pg/skins/crossinghippos/forms/_settings.scss +29 -0
  119. data/scss/pg/skins/crossinghippos/linkbar/_all.scss +8 -0
  120. data/scss/pg/skins/crossinghippos/linkbar/_behavior.scss +73 -0
  121. data/scss/pg/skins/crossinghippos/linkbar/_helpers.scss +5 -0
  122. data/scss/pg/skins/crossinghippos/linkbar/_settings.scss +27 -0
  123. data/templates/base/manifest.rb +15 -0
  124. data/templates/base/screen.scss +39 -0
  125. data/templates/grid/manifest.rb +15 -0
  126. data/templates/grid/screen.scss +36 -0
  127. data/templates/modules/manifest.rb +15 -0
  128. data/templates/modules/screen.scss +44 -0
  129. metadata +210 -0
@@ -0,0 +1,395 @@
1
+ // /**
2
+ // * Copyright (C) 2013 Crossing Hippos - Babs Gösgens. All rights reserved.
3
+ // * Licensed under GNU General Public License version 2 or later; see LICENSE.txt
4
+ // */
5
+ @if $trace-imports { @debug 'imported'; }
6
+
7
+
8
+ // ==========================================================================
9
+ // Mixin reset-baseline
10
+ // ==========================================================================
11
+ @mixin reset-baseline
12
+ {
13
+ /*
14
+ * IE 6 refuses to resize fonts set in pixels and it weirdly resizes fonts
15
+ * whose root is set in ems. So we set the root font size in percentages of
16
+ * the default font size.
17
+ */
18
+
19
+ * html {
20
+ font-size: 100% * $base-font-size / $browser-default-font-size;
21
+ }
22
+
23
+ /*
24
+ * Set the font properties on the html tag.
25
+ */
26
+
27
+ html {
28
+ $fs: px-to-relative-font-size($base-font-size, $browser-default-font-size);
29
+ $lh: px-to-relative-line-height($base-line-height, $base-font-size);
30
+ @include font($type-default, $fs, $lh);
31
+ }
32
+ }
33
+
34
+
35
+ // ==========================================================================
36
+ // Mixin reset-html-background
37
+ // ==========================================================================
38
+ @mixin reset-html-background($color-background: $color-background)
39
+ {
40
+ /*
41
+ * It's good practice to set the background color of the html tag
42
+ */
43
+
44
+ background-color: $color-background;
45
+ }
46
+
47
+
48
+ // ==========================================================================
49
+ // Mixin reset-box-sizing
50
+ // ==========================================================================
51
+ @mixin reset-box-sizing
52
+ {
53
+ /*
54
+ * Reset to box-sizing to border-box
55
+ */
56
+
57
+ @include box-sizing(border-box);
58
+ }
59
+
60
+
61
+ // ==========================================================================
62
+ // Mixin reset-text-rendering
63
+ // ==========================================================================
64
+ @mixin reset-text-rendering
65
+ {
66
+ /*
67
+ * See: http://www.usabilitypost.com/2012/11/06/optimize-legibility/
68
+ */
69
+
70
+ text-rendering: optimizeLegibility;
71
+
72
+ /*
73
+ * Prevents the browser from using synthesized font-weights.
74
+ */
75
+
76
+ font-synthesis: none;
77
+
78
+ // @todo: these next two settings influences the appearance and should be moved to Base
79
+
80
+ /*
81
+ * See: http://meyerweb.com/eric/css/tests/css3/font-variant-ligatures.html
82
+ */
83
+
84
+ font-variant-ligatures: common-ligatures;
85
+
86
+ /*
87
+ * See: http://meyerweb.com/eric/css/tests/css3/font-variant-numeric.html
88
+ */
89
+
90
+ font-variant-numeric: oldstyle-nums diagonal-fractions;
91
+ }
92
+
93
+
94
+ // ==========================================================================
95
+ // Mixin reset-html5
96
+ // ==========================================================================
97
+ @mixin reset-html5
98
+ {
99
+ /**
100
+ * Correct `block` display not defined in IE 8/9.
101
+ */
102
+
103
+ article,
104
+ aside,
105
+ details,
106
+ figcaption,
107
+ figure,
108
+ footer,
109
+ header,
110
+ hgroup,
111
+ main,
112
+ nav,
113
+ section,
114
+ summary {
115
+ display: block;
116
+ }
117
+
118
+ /**
119
+ * Correct `inline-block` display not defined in IE 8/9.
120
+ */
121
+
122
+ audio,
123
+ canvas,
124
+ video {
125
+ display: inline-block;
126
+ }
127
+
128
+ /**
129
+ * Prevent modern browsers from displaying `audio` without controls.
130
+ * Remove excess height in iOS 5 devices.
131
+ */
132
+
133
+ audio:not([controls]) {
134
+ display: none;
135
+ height: 0;
136
+ }
137
+
138
+ /**
139
+ * Address `[hidden]` styling not present in IE 8/9.
140
+ * Hide the `template` element in IE, Safari, and Firefox < 22.
141
+ */
142
+
143
+ [hidden],
144
+ template {
145
+ display: none;
146
+ }
147
+ }
148
+
149
+
150
+ // ==========================================================================
151
+ // Mixin reset-ios
152
+ // ==========================================================================
153
+ @mixin reset-ios
154
+ {
155
+ /**
156
+ * Prevent iOS text size adjust after orientation change,
157
+ * without disabling user zoom.
158
+ */
159
+
160
+ -ms-text-size-adjust: 100%;
161
+ -webkit-text-size-adjust: 100%;
162
+ }
163
+
164
+
165
+ // ==========================================================================
166
+ // Mixin reset-anchor
167
+ // ==========================================================================
168
+ @mixin reset-anchor
169
+ {
170
+ /**
171
+ * 1. Remove the gray background color from active links in IE 10.
172
+ * 2. Address `outline` inconsistency between Chrome and other browsers.
173
+ * 3. Improve readability when focused and also mouse hovered in all browsers.
174
+ */
175
+
176
+ a {
177
+ background: transparent; /* 1 */
178
+ &:focus {
179
+ outline: thin dotted; /* 2 */
180
+ }
181
+ &:active,
182
+ &:hover {
183
+ outline: 0; /* 3 */
184
+ }
185
+ }
186
+ }
187
+
188
+
189
+ // ==========================================================================
190
+ // Mixin reset-media
191
+ // ==========================================================================
192
+ @mixin reset-media
193
+ {
194
+ /**
195
+ * Remove border when inside `a` element in IE 8/9.
196
+ */
197
+
198
+ img {
199
+ border: 0;
200
+ }
201
+
202
+ /**
203
+ * Correct overflow displayed oddly in IE 9.
204
+ */
205
+
206
+ svg:not(:root) {
207
+ overflow: hidden;
208
+ }
209
+ }
210
+
211
+
212
+ // ==========================================================================
213
+ // Mixin reset-list-style
214
+ // ==========================================================================
215
+ @mixin reset-list-style
216
+ {
217
+ /*
218
+ * Render lists without list style
219
+ */
220
+
221
+ list-style: none;
222
+ }
223
+
224
+
225
+ // ==========================================================================
226
+ // Mixin reset-table
227
+ // ==========================================================================
228
+ @mixin reset-table
229
+ {
230
+ /**
231
+ * Remove most spacing between table cells.
232
+ */
233
+
234
+ border-collapse: collapse;
235
+ border-spacing: 0;
236
+ }
237
+
238
+
239
+ // ==========================================================================
240
+ // Mixin reset-table-cell
241
+ // ==========================================================================
242
+ @mixin reset-table-cell
243
+ {
244
+ /**
245
+ * 1. Align all content to the left.
246
+ * 2. Set font-weight to default font and weight
247
+ * 3. Re-align vertically
248
+ */
249
+
250
+ text-align: left; /* 1 */
251
+ @include font-weight($type-default); /* 2 */
252
+ vertical-align: middle; /* 3 */
253
+ }
254
+
255
+
256
+ // ==========================================================================
257
+ // Mixin reset-input
258
+ // ==========================================================================
259
+ @mixin reset-input
260
+ {
261
+ /**
262
+ * 1. Prepare for easy styling
263
+ * 2. Address margins set differently in Firefox 4+, Safari 5, and Chrome.
264
+ * 3. Correct font family not being inherited in all browsers.
265
+ * 4. Correct font size not being inherited in all browsers.
266
+ */
267
+
268
+ button,
269
+ input,
270
+ select,
271
+ textarea {
272
+ display: inline-block; /* 1 */
273
+ @include box-sizing(border-box); /* 1 */
274
+ margin: 0; /* 2 */
275
+ font-family: inherit; /* 3 */
276
+ font-size: 100%; /* 4 */
277
+ }
278
+
279
+ /**
280
+ * Address Firefox 4+ setting `line-height` on `input` using `!important` in
281
+ * the UA stylesheet.
282
+ */
283
+
284
+ button,
285
+ input {
286
+ line-height: inherit;
287
+ }
288
+
289
+ /**
290
+ * Address inconsistent `text-transform` inheritance for `button` and `select`.
291
+ * All other form control elements do not inherit `text-transform` values.
292
+ * Correct `button` style inheritance in Chrome, Safari 5+, and IE 8+.
293
+ * Correct `select` style inheritance in Firefox 4+ and Opera.
294
+ */
295
+
296
+ button,
297
+ select {
298
+ text-transform: none;
299
+ }
300
+
301
+ /**
302
+ * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
303
+ * and `video` controls.
304
+ * 2. Correct inability to style clickable `input` types in iOS.
305
+ * 3. Improve usability and consistency of cursor style between image-type
306
+ * `input` and others.
307
+ */
308
+
309
+ button,
310
+ html input[type="button"], /* 1 */
311
+ input[type="reset"],
312
+ input[type="submit"] {
313
+ -webkit-appearance: button; /* 2 */
314
+ cursor: pointer; /* 3 */
315
+ }
316
+
317
+ /**
318
+ * Re-set default cursor for disabled elements.
319
+ */
320
+
321
+ button[disabled],
322
+ html input[disabled] {
323
+ cursor: default;
324
+ }
325
+
326
+ /**
327
+ * 1. Address box sizing set to `content-box` in IE 8/9.
328
+ * 2. Remove excess padding in IE 8/9.
329
+ */
330
+
331
+ input[type="checkbox"],
332
+ input[type="radio"] {
333
+ box-sizing: border-box; /* 1 */
334
+ padding: 0; /* 2 */
335
+ }
336
+
337
+ /**
338
+ * 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome.
339
+ * 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome
340
+ * (include `-moz` to future-proof).
341
+ */
342
+
343
+ input[type="search"] {
344
+ -webkit-appearance: textfield; /* 1 */
345
+ // @include box-sizing(content-box); /* 2 */
346
+ }
347
+
348
+ /**
349
+ * Remove inner padding and search cancel button in Safari 5 and Chrome
350
+ * on OS X.
351
+ */
352
+
353
+ input[type="search"]::-webkit-search-cancel-button,
354
+ input[type="search"]::-webkit-search-decoration {
355
+ -webkit-appearance: none;
356
+ }
357
+
358
+ /**
359
+ * Remove inner padding and border in Firefox 4+.
360
+ */
361
+
362
+ button::-moz-focus-inner,
363
+ input::-moz-focus-inner {
364
+ border: 0;
365
+ padding: 0;
366
+ }
367
+
368
+ /**
369
+ * 1. Remove default vertical scrollbar in IE 8/9.
370
+ * 2. Improve readability and alignment in all browsers.
371
+ */
372
+
373
+ textarea {
374
+ overflow: auto; /* 1 */
375
+ vertical-align: top; /* 2 */
376
+ }
377
+ }
378
+
379
+
380
+ // ==========================================================================
381
+ // Mixin reset-quotation
382
+ // ==========================================================================
383
+ @mixin reset-quotation
384
+ {
385
+ /**
386
+ * 1. Strip quotes.
387
+ * 2. Some browsers do not support the quote attribute.
388
+ */
389
+
390
+ quotes: none;
391
+ &:before, &::after {
392
+ content: ""; /* 2 */
393
+ content: none; /* 2 */
394
+ }
395
+ }
@@ -0,0 +1,9 @@
1
+ // /**
2
+ // * Copyright (C) 2013 Crossing Hippos - Babs Gösgens. All rights reserved.
3
+ // * Licensed under GNU General Public License version 2 or later; see LICENSE.txt
4
+ // */
5
+ @if $trace-imports { @debug 'imported'; }
6
+
7
+ @import "settings";
8
+ @import "helpers";
9
+ @import "behavior";
@@ -0,0 +1,31 @@
1
+ // /**
2
+ // * Copyright (C) 2013 Crossing Hippos - Babs Gösgens. All rights reserved.
3
+ // * Licensed under GNU General Public License version 2 or later; see LICENSE.txt
4
+ // */
5
+ @if $trace-imports { @debug 'imported'; }
6
+
7
+
8
+ @if $debug-baseline {
9
+ html {
10
+ @extend %debug;
11
+ }
12
+ }
13
+
14
+ %debug {
15
+ /*
16
+ * Mixin debug-rhythm to display the vertical rhythm units
17
+ */
18
+ @include debug-rhythm;
19
+ }
20
+
21
+
22
+ // @todo: styles for webfont loader states
23
+ %is-wf-loading {
24
+
25
+ }
26
+ %is-wf-active {
27
+
28
+ }
29
+ %is-wf-inactive {
30
+
31
+ }
@@ -0,0 +1,7 @@
1
+ // /**
2
+ // * Copyright (C) 2013 Crossing Hippos - Babs Gösgens. All rights reserved.
3
+ // * Licensed under GNU General Public License version 2 or later; see LICENSE.txt
4
+ // */
5
+ @if $trace-imports { @debug 'imported'; }
6
+
7
+ @import "helpers/all";
@@ -0,0 +1,52 @@
1
+ // /**
2
+ // * Copyright (C) 2013 Crossing Hippos - Babs Gösgens. All rights reserved.
3
+ // * Licensed under GNU General Public License version 2 or later; see LICENSE.txt
4
+ // */
5
+ @if $trace-imports { @debug 'imported'; }
6
+
7
+
8
+ // ================================================================================================================================
9
+ // Typography settings
10
+ // ================================================================================================================================
11
+
12
+ $base-font-size: 16px !default;
13
+ $base-line-height: 24px !default; // 1.5*16px
14
+
15
+ $type-default: $serif-regular !default;
16
+ $type-heading: $sans-serif-regular !default;
17
+
18
+
19
+ // ================================================================================================================================
20
+ // Baseline settings (Vertical Rhythm)
21
+ // --------------------------------------------------------------------------------------------------------------------------------
22
+ // For more information, see: http://compass-style.org/reference/compass/Type/vertical_rhythm/
23
+ // ================================================================================================================================
24
+
25
+ $browser-default-font-size: $browser-default-font-size !default;
26
+ // Default = 16px
27
+
28
+ $default-rhythm-border-style: solid !default;
29
+ // Set the default border style for rhythm borders.
30
+
31
+ $relative-font-sizing: true !default;
32
+ // Set to false if you want to use absolute pixels in sizing your Type.
33
+
34
+ $round-to-nearest-half-line: false !default;
35
+ // Allows the adjust-font-size-to mixin and the lines-for-font-size function to round the line height to the nearest half line height instead of the nearest integral line height to avoid large spacing between lines.
36
+
37
+ $min-line-padding: 2px !default;
38
+ // Ensure there is at least this many pixels of vertical padding above and below the text.
39
+
40
+ $font-unit: 1em !default;
41
+ // $base-font-size but in your output unit of choice. Defaults to 1em when $relative-font-sizing is true.
42
+
43
+ $leading-unit: 1em !default;
44
+ // $base-line-height but in your output unit of choice. Defaults to 1em when $relative-font-sizing is true.
45
+
46
+ // Rem is xperimental and not yet implemented
47
+ $use-rem-for-sizing: false !default;
48
+ $font-unit: if($use-rem-for-sizing, 1rem, $font-unit) !default;
49
+ $leading-unit: if($use-rem-for-sizing, 1rem, $leading-unit) !default;
50
+
51
+ // Debugging
52
+ $debug-baseline: false !default;
@@ -0,0 +1,8 @@
1
+ // /**
2
+ // * Copyright (C) 2013 Crossing Hippos - Babs Gösgens. All rights reserved.
3
+ // * Licensed under GNU General Public License version 2 or later; see LICENSE.txt
4
+ // */
5
+ @if $trace-imports { @debug 'imported'; }
6
+
7
+ @import "functions";
8
+ @import "mixins";
@@ -0,0 +1,160 @@
1
+ // /**
2
+ // * Copyright (C) 2013 Crossing Hippos - Babs Gösgens. All rights reserved.
3
+ // * Licensed under GNU General Public License version 2 or later; see LICENSE.txt
4
+ // */
5
+ @if $trace-imports { @debug 'imported'; }
6
+
7
+
8
+ // ==========================================================================
9
+ // Function px-to-relative-font-size
10
+ // --------------------------------------------------------------------------
11
+ // Placeholder function for font-sizes.
12
+ // Inserts correct font unit as set in the Vertical-Rhythm module settings.
13
+ // --------------------------------------------------------------------------
14
+ // @param (string) $target-px (value in px)
15
+ // @param (string) $context (value in px)
16
+ // @param (string) $unit (unit of output)
17
+ // @return (string) value in alternate unit
18
+ // ==========================================================================
19
+ @function px-to-relative-font-size($target-px, $context: $base-font-size, $unit: $font-unit)
20
+ {
21
+ @return px-to-relative-size($target-px, $context, $unit);
22
+ }
23
+
24
+
25
+ // ==========================================================================
26
+ // Function px-to-relative-line-height
27
+ // --------------------------------------------------------------------------
28
+ // Placeholder function for line-heights.
29
+ // inserts correct line-height unit as set in the Vertical-Rhythm module settings.
30
+ // --------------------------------------------------------------------------
31
+ // @param (string) $target-px (value in px)
32
+ // @param (string) $context (value in px)
33
+ // @param (string) $unit (unit of output)
34
+ // @return (string) value in alternate unit
35
+ // ==========================================================================
36
+ @function px-to-relative-line-height($target-px, $context: $base-font-size, $unit: $leading-unit)
37
+ {
38
+ @return px-to-relative-size($target-px, $context, $unit);
39
+ }
40
+
41
+
42
+ // ==========================================================================
43
+ // Function extract-type-style
44
+ // --------------------------------------------------------------------------
45
+ // Extract the style property from a type array
46
+ // --------------------------------------------------------------------------
47
+ // @param (array) $type (a valid type array: $style, $variant, $weight, $family)
48
+ // @return (string) font-style
49
+ // ==========================================================================
50
+ @function extract-type-style($type) {
51
+ @return nth($type, 1);
52
+ }
53
+
54
+
55
+ // ==========================================================================
56
+ // Function extract-type-variant
57
+ // --------------------------------------------------------------------------
58
+ // Extract the variant property from a type array
59
+ // --------------------------------------------------------------------------
60
+ // @param (array) $type (a valid type array: $style, $variant, $weight, $family)
61
+ // @return (string) font-variant
62
+ // ==========================================================================
63
+ @function extract-type-variant($type)
64
+ {
65
+ @return nth($type, 2);
66
+ }
67
+
68
+
69
+ // ==========================================================================
70
+ // Function extract-type-weight
71
+ // --------------------------------------------------------------------------
72
+ // Extract the weight property from a type array
73
+ // --------------------------------------------------------------------------
74
+ // @param (array) $type (a valid type array: $style, $variant, $weight, $family)
75
+ // @return (string) font-weight
76
+ // ==========================================================================
77
+ @function extract-type-weight($type)
78
+ // ==========================================================================
79
+ {
80
+ @return nth($type, 3);
81
+ }
82
+
83
+
84
+ // ==========================================================================
85
+ // Function extract-type-family
86
+ // --------------------------------------------------------------------------
87
+ // Extract the family property from a type array
88
+ // --------------------------------------------------------------------------
89
+ // @param (array) $type (a valid type array: $style, $variant, $weight, $family)
90
+ // @return (string) font-family
91
+ // ==========================================================================
92
+ @function extract-type-family($type)
93
+ {
94
+ @return nth($type, 4);
95
+ }
96
+
97
+
98
+ // ==========================================================================
99
+ // Function weight-number-to-string
100
+ // --------------------------------------------------------------------------
101
+ // Converts a weight number to a string and returns it
102
+ // --------------------------------------------------------------------------
103
+ // @param (integer) $weight a valid weight number: 100 through 900)
104
+ // @return (string) weight
105
+ // ==========================================================================
106
+ @function weight-number-to-string($weight)
107
+ {
108
+ @if $weight == 100 { @return "ultra-light"; }
109
+ @if $weight == 200 { @return "light"; }
110
+ @if $weight == 300 { @return "book"; }
111
+ @if $weight == 400 { @return "regular"; }
112
+ @if $weight == 500 { @return "medium"; }
113
+ @if $weight == 600 { @return "semi-bold"; }
114
+ @if $weight == 700 { @return "bold"; }
115
+ @if $weight == 800 { @return "extra-bold"; }
116
+ @if $weight == 900 { @return "heavy"; }
117
+ @else {
118
+ @warn "Not a valid weight";
119
+ @return false;
120
+ }
121
+ }
122
+
123
+ //* To Do: (everything below needs to be looked over as settings in the Type modules have changed)
124
+
125
+ // //* Calculate the optimal line-height */
126
+ // @function leading-in-px($base-font-size, $balance-over: false) {
127
+
128
+ // $dividend: $base-font-size / $base-line-height;
129
+ // $leading: $base-line-height;
130
+
131
+ // // For smaller font-sizes, for instance balance a font-size of 8px over two baselines of 24px in three (balance) lines resulting in 48/3=16px;
132
+ // @if $balance-over {
133
+ // $leading: 2 * $base-line-height / $balance-over;
134
+ // @return $leading;
135
+ // }
136
+ // @if $dividend<0.5 {
137
+ // $leading: 0.5 * $base-line-height;
138
+ // @return $leading;
139
+ // }
140
+ // @if $dividend>1 {
141
+ // $leading: ceil($dividend) * $base-line-height;
142
+ // @if ($leading - $base-font-size) < (2 * $min-line-padding) {
143
+ // $leading: $leading + $base-line-height;
144
+ // }
145
+ // @return $leading;
146
+ // }
147
+ // @else {
148
+ // @return $leading;
149
+ // }
150
+ // }
151
+
152
+ // @function px-to-rhythm($value) {
153
+ // @return $value/$base-line-height;
154
+ // }
155
+
156
+ // @function base-line-rhythm($base-lines: 1) {
157
+ // // @debug $base-lines;
158
+ // // @debug $base-line-height;
159
+ // @return ($base-lines * $base-line-height);
160
+ // }