piecss 0.6.0 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (104) hide show
  1. checksums.yaml +4 -4
  2. data/sass/piecss/_behavior.scss +5 -0
  3. data/sass/piecss/_settings.scss +2 -2
  4. data/sass/piecss/_utilities.scss +2 -4
  5. data/sass/piecss/behavior/anchor/_anchor.scss +7 -21
  6. data/sass/piecss/behavior/anchor/_settings.scss +11 -0
  7. data/sass/piecss/behavior/base/_base.scss +0 -1
  8. data/sass/piecss/behavior/base/_collection.scss +3 -3
  9. data/sass/piecss/behavior/base/_settings.scss +1 -1
  10. data/sass/piecss/behavior/debug/_behavior.scss +22 -0
  11. data/sass/piecss/behavior/debug/_mixins.scss +127 -0
  12. data/sass/piecss/behavior/debug/_settings.scss +81 -0
  13. data/sass/piecss/behavior/is/_collection.scss +57 -0
  14. data/sass/piecss/behavior/is/_settings.scss +12 -0
  15. data/sass/piecss/behavior/layout/_bleed.scss +23 -0
  16. data/sass/piecss/behavior/layout/_chain.scss +45 -0
  17. data/sass/piecss/behavior/layout/_column.scss +14 -0
  18. data/sass/piecss/behavior/layout/_grid.scss +13 -3
  19. data/sass/piecss/behavior/layout/_gutters.scss +32 -0
  20. data/sass/piecss/behavior/layout/_layout.scss +29 -29
  21. data/sass/piecss/behavior/layout/_leader.scss +57 -0
  22. data/sass/piecss/behavior/layout/_trailer.scss +57 -0
  23. data/sass/piecss/behavior/layout/_wings.scss +122 -0
  24. data/sass/piecss/behavior/list/_list.scss +134 -175
  25. data/sass/piecss/behavior/list/_settings.scss +9 -31
  26. data/sass/piecss/settings/_colour.scss +10 -1
  27. data/sass/piecss/settings/_font.scss +0 -1
  28. data/sass/piecss/settings/_grid.scss +119 -0
  29. data/sass/piecss/settings/_legacy.scss +24 -0
  30. data/sass/piecss/settings/_rhythm.scss +0 -10
  31. data/sass/piecss/utilities/_collection.scss +5 -1
  32. data/sass/piecss/utilities/_colour.scss +3 -3
  33. data/sass/piecss/utilities/_grid.scss +355 -0
  34. data/sass/piecss/utilities/_legacy.scss +42 -0
  35. data/sass/piecss/utilities/_miscellaneous.scss +8 -82
  36. data/sass/piecss/utilities/_rhythm.scss +7 -36
  37. data/sass/piecss/utilities/_typography.scss +8 -98
  38. data/templates/project/_sets.scss +2 -3
  39. data/templates/project/_settings.scss +26 -27
  40. data/{sass/piecss/_behavior.css → templates/project/assets/css/screen.css} +100 -5
  41. data/templates/project/assets/images/piecss.png +0 -0
  42. data/templates/project/assets/images/piecss.svg +25 -0
  43. data/templates/project/examples.html +2 -2
  44. data/templates/project/screen.scss +8 -11
  45. metadata +21 -61
  46. data/sass/piecss/_behavior.css.map +0 -7
  47. data/sass/piecss/_settings.css +0 -2
  48. data/sass/piecss/_settings.css.map +0 -7
  49. data/sass/piecss/_utilities.css +0 -3
  50. data/sass/piecss/_utilities.css.map +0 -7
  51. data/sass/piecss/behavior/layout/_rhythm.scss +0 -21
  52. data/sass/piecss/settings/_breakpoint.css +0 -70
  53. data/sass/piecss/settings/_colour.css +0 -2
  54. data/sass/piecss/settings/_colour.css.map +0 -7
  55. data/sass/piecss/settings/_constants.css +0 -2
  56. data/sass/piecss/settings/_constants.css.map +0 -7
  57. data/sass/piecss/settings/_fallback.css +0 -2
  58. data/sass/piecss/settings/_fallback.css.map +0 -7
  59. data/sass/piecss/settings/_fallback.scss +0 -15
  60. data/sass/piecss/settings/_font.css +0 -2
  61. data/sass/piecss/settings/_font.css.map +0 -7
  62. data/sass/piecss/settings/_layout.css +0 -60
  63. data/sass/piecss/settings/_layout.scss +0 -168
  64. data/sass/piecss/settings/_miscellaneous.css +0 -2
  65. data/sass/piecss/settings/_miscellaneous.css.map +0 -7
  66. data/sass/piecss/settings/_rhythm.css +0 -2
  67. data/sass/piecss/settings/_rhythm.css.map +0 -7
  68. data/sass/piecss/settings/_typography.css +0 -2
  69. data/sass/piecss/settings/_typography.css.map +0 -7
  70. data/sass/piecss/settings/_unit.css +0 -2
  71. data/sass/piecss/settings/_unit.css.map +0 -7
  72. data/sass/piecss/settings/fonts/_verdana.scss +0 -40
  73. data/sass/piecss/utilities/_breakpoint.css +0 -2
  74. data/sass/piecss/utilities/_breakpoint.css.map +0 -7
  75. data/sass/piecss/utilities/_cache.css +0 -2
  76. data/sass/piecss/utilities/_cache.css.map +0 -7
  77. data/sass/piecss/utilities/_cache.scss +0 -78
  78. data/sass/piecss/utilities/_colour.css +0 -2
  79. data/sass/piecss/utilities/_colour.css.map +0 -7
  80. data/sass/piecss/utilities/_element.css +0 -2
  81. data/sass/piecss/utilities/_element.css.map +0 -7
  82. data/sass/piecss/utilities/_image.css +0 -2
  83. data/sass/piecss/utilities/_image.css.map +0 -7
  84. data/sass/piecss/utilities/_layout.css +0 -2
  85. data/sass/piecss/utilities/_layout.css.map +0 -7
  86. data/sass/piecss/utilities/_layout.scss +0 -570
  87. data/sass/piecss/utilities/_list.css +0 -2
  88. data/sass/piecss/utilities/_list.css.map +0 -7
  89. data/sass/piecss/utilities/_list.scss +0 -26
  90. data/sass/piecss/utilities/_miscellaneous.css +0 -2
  91. data/sass/piecss/utilities/_miscellaneous.css.map +0 -7
  92. data/sass/piecss/utilities/_rhythm.css +0 -2
  93. data/sass/piecss/utilities/_rhythm.css.map +0 -7
  94. data/sass/piecss/utilities/_side.css +0 -2
  95. data/sass/piecss/utilities/_side.css.map +0 -7
  96. data/sass/piecss/utilities/_side.scss +0 -370
  97. data/sass/piecss/utilities/_string.css +0 -2
  98. data/sass/piecss/utilities/_string.css.map +0 -7
  99. data/sass/piecss/utilities/_svg.css +0 -2
  100. data/sass/piecss/utilities/_svg.css.map +0 -7
  101. data/sass/piecss/utilities/_typography.css +0 -2
  102. data/sass/piecss/utilities/_typography.css.map +0 -7
  103. data/sass/piecss/utilities/_unit.css +0 -2
  104. data/sass/piecss/utilities/_unit.css.map +0 -7
@@ -0,0 +1,119 @@
1
+ // Copyright (C) 2014 Babs Gösgens. Licensed under MIT; see LICENSE.txt
2
+
3
+
4
+ // Grid settings
5
+
6
+
7
+ // ///
8
+ // /// Gutter widths are based on the vertical [rhythm](./#variable-rhythm) and default to 2*$rhythm. Gutters are implemented using the [gutter mixin](./#mixin-gutters) and are expressed in factors of this measure (usually 1/2).
9
+ // ///
10
+ // /// @since 0.1
11
+ // ///
12
+ // /// @type {Number}
13
+ // ///
14
+
15
+ $gutter-width: $default-line-height !default;
16
+
17
+ ///
18
+ /// The final unit of output in which gutter widths are rendered
19
+ ///
20
+ /// @since 0.1
21
+ ///
22
+ /// @type {Number}
23
+ ///
24
+
25
+ $gutter-width-unit: $unit !default;
26
+
27
+ // Root settings
28
+ // Set a max width on a root container of your choice, the content will not stretch beyond this width.
29
+ // The root container can be positioned left or center, for alternate position you can provide your own behavior.
30
+
31
+
32
+ ///
33
+ /// Fixes content maximum width, 72em is 1152px at a 16px [$font-size](./#variable-default-font-size). It is used by the [root mixin](./#mixin-root).
34
+ ///
35
+ /// @since 0.1
36
+ ///
37
+ /// @type {Number}
38
+ ///
39
+
40
+ $root-max-width: 72em !default;
41
+
42
+ ///
43
+ /// Aligns content inside the viewport, center by default. Used by the [root mixin](./#mixin-root).
44
+ ///
45
+ /// @since 0.1
46
+ ///
47
+ /// @type {Number}
48
+ ///
49
+
50
+ $root-position: center !default;
51
+
52
+ ///
53
+ /// The page's default number of columns. Used in debug-layout to visualize column layout.
54
+ ///
55
+ /// @since 0.1
56
+ ///
57
+ /// @type {Number}
58
+ ///
59
+
60
+ $columns: 4 !default;
61
+
62
+ ///
63
+ /// The color used for debugging
64
+ ///
65
+ /// @since 0.7
66
+ ///
67
+ /// @type {Color} (#ff1493)
68
+ ///
69
+
70
+ $debug-color: $deeppink;
71
+
72
+ ///
73
+ /// A wing is a whitespace of one or more columns. Use in conjunction with page
74
+ /// layouts.
75
+ ///
76
+ /// @since 0.7
77
+ ///
78
+ /// @type {Color} (#ff1493)
79
+ ///
80
+
81
+ $wings: 0;
82
+
83
+ ///
84
+ /// (Totally arbitrary) Default breakpoint grids.
85
+ /// The first breakpoint should be a `$lt-###` breakpoint and will be condiered
86
+ /// the default, smallest breakpoint.
87
+ /// Serves as an example grid.
88
+ ///
89
+ /// @since 0.1
90
+ ///
91
+ /// @type {Map}
92
+ ///
93
+
94
+ $grids: (
95
+ $gt-small-handheld: (
96
+ debug-color: $orange, // #ffa500
97
+ columns: 6,
98
+ rhythm: $rhythm,
99
+ gutter-width: $gutter-width,
100
+ wings: 0,
101
+ layouts: ()
102
+ ),
103
+ $gt-medium-handheld: (
104
+ debug-color: $cyan, // #0ff
105
+ columns: 9,
106
+ rhythm: $rhythm,
107
+ gutter-width: $gutter-width,
108
+ wings: 0,
109
+ layouts: ()
110
+ ),
111
+ $gt-small-desktop: (
112
+ debug-color: $becca, // #639
113
+ columns: 12,
114
+ rhythm: $rhythm,
115
+ gutter-width: $gutter-width,
116
+ wings: 0,
117
+ layouts: ()
118
+ )
119
+ ) !default;
@@ -0,0 +1,24 @@
1
+ // Copyright (C) 2014 Babs Gösgens. Licensed under MIT; see LICENSE.txt
2
+
3
+
4
+ ///
5
+ /// Use this to create separate stylesheets for older MSIE browsers.
6
+ /// When false, it will not compile rules wrapped in the [old-ie() mixin](./#mixin-old-ie).
7
+ ///
8
+ /// @since 0.1
9
+ ///
10
+ /// @type {Number}
11
+ ///
12
+
13
+ $legacy-support-for-ie: false !default;
14
+
15
+ ///
16
+ /// Use this to create separate stylesheets for old Firefox browsers.
17
+ /// When false, it will not compile rules wrapped in the [old-ie() mixin](./#mixin-old-mozilla).
18
+ ///
19
+ /// @since 0.1
20
+ ///
21
+ /// @type {Number}
22
+ ///
23
+
24
+ $legacy-support-for-mozilla: false !default;
@@ -14,13 +14,3 @@
14
14
  ///
15
15
 
16
16
  $rhythm: 8px !default;
17
-
18
- ///
19
- /// If true,reveals the document's vertical rhythm. Also see: [mixin $debug-rhythm](./#mixin-debug-rhythm).
20
- ///
21
- /// @since 0.1
22
- ///
23
- /// @type {Bool}
24
- ///
25
-
26
- $debug-rhythm: false !default;
@@ -166,7 +166,11 @@
166
166
 
167
167
  @mixin get-properties($selector) {
168
168
  @each $property in $selector {
169
- #{nth($property, 1)}: unquote(nth($property, 2));
169
+
170
+ $_property: nth($property, 1);
171
+ $_value: unquote(#{nth($property, 2)});
172
+
173
+ #{$_property}: $_value;
170
174
  }
171
175
  }
172
176
 
@@ -10,9 +10,9 @@
10
10
 
11
11
 
12
12
  ///
13
- /// Mixin to force consistent shades in a project.
14
- /// Set acceptable shades in the colour settings.
15
- /// If a shade is not acceptable, the function throws an errror
13
+ /// Mixin to force consistent shades in a project. Set acceptable shades in the
14
+ /// colour settings. If a shade is not acceptable, the function throws an errror.
15
+ /// See `[$shades](./#variable-shades)` for default values.
16
16
  ///
17
17
  /// @since 0.1
18
18
  ///
@@ -0,0 +1,355 @@
1
+ // Copyright (C) 2014 Babs Gösgens. Licensed under MIT; see LICENSE.txt
2
+
3
+
4
+ // Content
5
+ //
6
+ // 1. Functions
7
+ // fraction-to-text
8
+ // gutter
9
+ // get-grid
10
+ // get-grid-property
11
+ // get-grid-columns
12
+ // get-grid-gutter-width
13
+ // get-grid-rhythm
14
+ // get-grid-debug-color
15
+
16
+ // 2. Mixins
17
+ // 2a. Layout
18
+ // root
19
+ // bleed
20
+ // 2b. Source Ordering
21
+ // move
22
+ // pull
23
+ // push
24
+
25
+
26
+ // 1. FUNCTIONS
27
+
28
+
29
+ ///
30
+ /// Convert a fraction to a word.
31
+ /// Used to build style rules based on column widths.
32
+ /// For values up to #/16.
33
+ ///
34
+ /// @example scss
35
+ /// .#{fraction-to-text(1/2)} {
36
+ /// // Column properties }
37
+ /// // Output:
38
+ /// .half {
39
+ /// // Column properties }
40
+ ///
41
+ /// @since 0.1
42
+ ///
43
+ /// @param {Number} $fraction - A fraction, e.g. 1/2
44
+ ///
45
+ /// @return {String}
46
+ ///
47
+
48
+ @function fraction-to-text($fraction) {
49
+
50
+ @if $fraction == 1/1 { @return "full"; }
51
+ @if $fraction == 1/2 { @return "half"; }
52
+ @if $fraction == 1/3 { @return "third"; }
53
+ @if $fraction == 1/4 { @return "fourth"; }
54
+ @if $fraction == 1/5 { @return "fifth"; }
55
+ @if $fraction == 1/6 { @return "sixth"; }
56
+ @if $fraction == 1/7 { @return "seventh"; }
57
+ @if $fraction == 1/8 { @return "eighth"; }
58
+ @if $fraction == 1/9 { @return "ninth"; }
59
+ @if $fraction == 1/10 { @return "tenth"; }
60
+ @if $fraction == 1/11 { @return "eleventh"; }
61
+ @if $fraction == 1/12 { @return "twelfth"; }
62
+ @if $fraction == 1/13 { @return "thirteenth"; }
63
+ @if $fraction == 1/14 { @return "fourteenth"; }
64
+ @if $fraction == 1/15 { @return "fifteenth"; }
65
+ @if $fraction == 1/16 { @return "sixteenth"; }
66
+ @if $fraction == 2/3 { @return "two-third"; }
67
+ @if $fraction == 3/4 { @return "three-fourth"; }
68
+ @if $fraction == 2/5 { @return "two-fifth"; }
69
+ @if $fraction == 3/5 { @return "three-fifth"; }
70
+ @if $fraction == 4/5 { @return "four-fifth"; }
71
+ @if $fraction == 5/6 { @return "five-sixth"; }
72
+ @if $fraction == 2/7 { @return "two-seventh"; }
73
+ @if $fraction == 3/7 { @return "three-seventh"; }
74
+ @if $fraction == 4/7 { @return "four-seventh"; }
75
+ @if $fraction == 5/7 { @return "five-seventh"; }
76
+ @if $fraction == 6/7 { @return "six-seventh"; }
77
+ @if $fraction == 3/8 { @return "three-eighth"; }
78
+ @if $fraction == 5/8 { @return "five-eighth"; }
79
+ @if $fraction == 7/8 { @return "seven-eighth"; }
80
+ @if $fraction == 2/9 { @return "two-ninth"; }
81
+ @if $fraction == 4/9 { @return "four-ninth"; }
82
+ @if $fraction == 5/9 { @return "five-ninth"; }
83
+ @if $fraction == 7/9 { @return "seven-ninth"; }
84
+ @if $fraction == 8/9 { @return "eight-ninth"; }
85
+ @if $fraction == 3/10 { @return "three-tenth"; }
86
+ @if $fraction == 7/10 { @return "seven-tenth"; }
87
+ @if $fraction == 9/10 { @return "nine-tenth"; }
88
+ @if $fraction == 2/11 { @return "two-eleventh"; }
89
+ @if $fraction == 3/11 { @return "three-eleventh"; }
90
+ @if $fraction == 4/11 { @return "four-eleventh"; }
91
+ @if $fraction == 5/11 { @return "five-eleventh"; }
92
+ @if $fraction == 6/11 { @return "six-eleventh"; }
93
+ @if $fraction == 7/11 { @return "seven-eleventh"; }
94
+ @if $fraction == 8/11 { @return "eight-eleventh"; }
95
+ @if $fraction == 9/11 { @return "nine-eleventh"; }
96
+ @if $fraction == 10/11 { @return "ten-eleventh"; }
97
+ @if $fraction == 5/12 { @return "five-twelfth"; }
98
+ @if $fraction == 7/12 { @return "seven-twelfth"; }
99
+ @if $fraction == 9/12 { @return "nine-twelfth"; }
100
+ @if $fraction == 11/12 { @return "eleven-twelfth"; }
101
+ @if $fraction == 2/13 { @return "two-thirteenth"; }
102
+ @if $fraction == 3/13 { @return "three-thirteenth"; }
103
+ @if $fraction == 4/13 { @return "four-thirteenth"; }
104
+ @if $fraction == 5/13 { @return "five-thirteenth"; }
105
+ @if $fraction == 6/13 { @return "six-thirteenth"; }
106
+ @if $fraction == 7/13 { @return "seven-thirteenth"; }
107
+ @if $fraction == 8/13 { @return "eight-thirteenth"; }
108
+ @if $fraction == 9/13 { @return "nine-thirteenth"; }
109
+ @if $fraction == 10/13 { @return "ten-thirteenth"; }
110
+ @if $fraction == 11/13 { @return "twelve-thirteenth"; }
111
+ @if $fraction == 12/13 { @return "thirteen-thirteenth"; }
112
+ @if $fraction == 3/14 { @return "three-fourteenth"; }
113
+ @if $fraction == 5/14 { @return "five-fourteenth"; }
114
+ @if $fraction == 9/14 { @return "nine-fourteenth"; }
115
+ @if $fraction == 11/14 { @return "eleven-fourteenth"; }
116
+ @if $fraction == 13/14 { @return "thirteen-fourteenth"; }
117
+ @if $fraction == 2/15 { @return "two-fifteenth"; }
118
+ @if $fraction == 4/15 { @return "four-fifteenth"; }
119
+ @if $fraction == 7/15 { @return "seven-fifteenth"; }
120
+ @if $fraction == 8/15 { @return "eight-fifteenth"; }
121
+ @if $fraction == 11/15 { @return "eleven-fifteenth"; }
122
+ @if $fraction == 13/15 { @return "thirteen-fifteenth"; }
123
+ @if $fraction == 14/15 { @return "fourteen-fifteenth"; }
124
+ @if $fraction == 3/16 { @return "three-sixteenth"; }
125
+ @if $fraction == 5/16 { @return "five-sixteenth"; }
126
+ @if $fraction == 7/16 { @return "seven-sixteenth"; }
127
+ @if $fraction == 9/16 { @return "nine-sixteenth"; }
128
+ @if $fraction == 11/16 { @return "eleven-sixteenth"; }
129
+ @if $fraction == 13/16 { @return "thirteen-sixteenth"; }
130
+ @if $fraction == 15/16 { @return "sixteen-sixteenth"; }
131
+
132
+ @return "full";
133
+ }
134
+
135
+ ///
136
+ /// Return a value based on the gutter-width.
137
+ /// If no breakpoint is set, the function will return the default gutter-width.
138
+ /// If a breakpoint is set, the function will return a gutter-width from the
139
+ /// grids map.
140
+ ///
141
+ /// @param {Arglist} $args - An argument list, may contain 2 values (a fraction and/or a valid breakpoint)
142
+ ///
143
+ /// @return {Number} - The resulting value in px
144
+ ///
145
+
146
+ @function gutter($args...) {
147
+
148
+ $_fraction: 1/2;
149
+ $_breakpoint: false;
150
+
151
+ // Process arguments
152
+ @if length($args) {
153
+ @each $var in $args {
154
+ @if type-of($var) == number {
155
+ $_fraction: $var;
156
+ }
157
+ @if type-of($var) == list {
158
+ $_breakpoint: $var;
159
+ }
160
+ }
161
+ }
162
+
163
+ // Retrieve the gutter-width from the settings, but check if one is set in grids and take that in stead
164
+ $_gutter-width: $gutter-width;
165
+ @if $_breakpoint {
166
+ $_gutter-width: if(get-grid-gutter-width(get-grid($_breakpoint)), get-grid-gutter-width(get-grid($_breakpoint)), $_gutter-width);
167
+ }
168
+
169
+ @return $_fraction * $gutter-width;
170
+ }
171
+
172
+ ///
173
+ /// Get grid settings from a grid map
174
+ ///
175
+ ///
176
+ /// @param {String} $breakpoints - A valid breakpoint
177
+ /// @param {Map} $grids ($grids) - A grid map
178
+ ///
179
+ /// @return {Map} - A breakpoint global grid, or a breakpoint nested page grid from [$grids map](./#variable-grids)
180
+ ///
181
+
182
+ @function get-grid($breakpoint, $grids: $grids) {
183
+
184
+ @if not( map-has-key($grids, $breakpoint) ) {
185
+ @error "Unknown breakpoint: #{$breakpoint}";
186
+ }
187
+
188
+ @return map-get($grids, $breakpoint);
189
+ }
190
+
191
+ ///
192
+ /// Retrieves a property setting for a specific breakpoint
193
+ ///
194
+ /// @since 1.0
195
+ ///
196
+ /// @example
197
+ /// $columns: get-grid-property($columns, $grid);
198
+ ///
199
+ /// @param {String} $property - The grid-map property to retrieve
200
+ /// @param {Map} $grids ($grids) - A grid map
201
+ ///
202
+ /// @return {*}
203
+ ///
204
+
205
+ @function get-grid-property($property, $grid) {
206
+
207
+ $_value: null;
208
+
209
+ @if map-has-key($grid, $property) {
210
+ $_value: map-get($grid, $property);
211
+ }
212
+ @else {
213
+ @error "Unknown grid property: #{$property}";
214
+ }
215
+
216
+ @return $_value;
217
+ }
218
+
219
+ ///
220
+ /// Retrieves the column setting for a specific breakpoint
221
+ ///
222
+ /// @since 1.0
223
+ ///
224
+ /// @example
225
+ /// $columns: get-grid-columns();
226
+ ///
227
+ /// @param {Map} $grids ($grid) - A grid map
228
+ ///
229
+ /// @since 1.0
230
+ ///
231
+
232
+ @function get-grid-columns($grid) {
233
+ @return get-grid-property("columns", $grid);
234
+ }
235
+
236
+ ///
237
+ /// Retrieves the gutter-width setting for a specific breakpoint
238
+ ///
239
+ /// @since 1.0
240
+ ///
241
+ /// @example
242
+ /// $gutter-width: get-grid-gutter-width();
243
+ ///
244
+ /// @param {Map} $grids ($grid) - A grid map
245
+ ///
246
+ /// @since 1.0
247
+ ///
248
+
249
+ @function get-grid-gutter-width($grid) {
250
+ @return get-grid-property("gutter-width", $grid);
251
+ }
252
+
253
+
254
+ ///
255
+ /// Retrieves the rhythm settings for a specific breakpoint
256
+ ///
257
+ /// @since 1.0
258
+ ///
259
+ /// @example
260
+ /// $rhythm: get-grid-rhythm();
261
+ ///
262
+ /// @param {Map} $grids ($grid) - A grid map
263
+ ///
264
+ /// @since 1.0
265
+ ///
266
+
267
+ @function get-grid-rhythm($grid) {
268
+ @return get-grid-property("rhythm", $grid);
269
+ }
270
+
271
+
272
+ ///
273
+ /// Retrieves the debug colour settings for a specific breakpoint
274
+ ///
275
+ /// @since 1.0
276
+ ///
277
+ /// @example
278
+ /// $debug-color: get-grid-debug-color();
279
+ ///
280
+ /// @param {Map} $grids ($grid) - A grid map
281
+ ///
282
+ /// @since 1.0
283
+ ///
284
+
285
+ @function get-grid-debug-color($grid) {
286
+ @return get-grid-property("debug-color", $grid);
287
+ }
288
+
289
+
290
+
291
+ // 2. MIXINS
292
+
293
+
294
+ ///
295
+ /// Fixes content width and aligns in viewport. [$root-position](./#variable-root-position) is defind in grid settings. Centers content inside the viewport by default.
296
+ ///
297
+ /// @since 0.1
298
+ ///
299
+ /// @param {Number} $root-max-width (72em) - The maximum width of your content
300
+ ///
301
+
302
+ @mixin root($root-max-width: $root-max-width, $set-display: false) {
303
+
304
+ @if $root-position == center {
305
+ margin: 0 auto;
306
+ }
307
+
308
+ max-width: $root-max-width;
309
+ }
310
+
311
+
312
+ ///
313
+ /// Mixin to reverse padding on a container.
314
+ /// Use it to remove padded column spacing on columns, helpful when nesting columns and when applying backgrounds.
315
+ ///
316
+ /// @since 0.1
317
+ ///
318
+ /// @param {Number} $fraction (1/2) - A fraction, e.g. 1/2
319
+ ///
320
+
321
+ @mixin bleed($fraction: -1/2) {
322
+ margin-left: gutter($fraction, true);
323
+ margin-right: gutter($fraction, true);
324
+ }
325
+
326
+
327
+ ///
328
+ /// Mixin for soure ordering
329
+ ///
330
+ /// @since 0.1
331
+ ///
332
+ /// @param {Number} $fraction (1/2) - A fraction, e.g. 1/2
333
+ ///
334
+
335
+ @mixin move($fraction) {
336
+ left: percentage($fraction);
337
+ }
338
+
339
+
340
+ ///
341
+ /// @alias move
342
+ ///
343
+
344
+ @mixin push($fraction) {
345
+ @include move($fraction);
346
+ }
347
+
348
+
349
+ ///
350
+ /// @alias move
351
+ ///
352
+
353
+ @mixin pull($fraction) {
354
+ @include move(-1 * $fraction);
355
+ }
@@ -0,0 +1,42 @@
1
+ // Copyright (C) 2014 Babs Gösgens. Licensed under MIT; see LICENSE.txt
2
+
3
+
4
+ // Content:
5
+ // 1. Mixins
6
+ // old-ie
7
+ // old-mozilla
8
+
9
+
10
+ // 1. Mixins
11
+
12
+
13
+ ///
14
+ /// Support for old-ie, use it to separate old-ie declarations from your other declarations with either a separate stylesheet or added specificity (Modernizr).
15
+ ///
16
+ /// @since 0.1
17
+ ///
18
+ /// @example
19
+ /// @include old-ie() { // properties }
20
+ ///
21
+
22
+ @mixin old-ie() {
23
+ @if $legacy-support-for-ie {
24
+ @content;
25
+ }
26
+ }
27
+
28
+
29
+ ///
30
+ /// Support for old-mozilla, use it to separate old-mozilla declarations from your other declarations with either a separate stylesheet or added specificity (Modernizr).
31
+ ///
32
+ /// @since 0.1
33
+ ///
34
+ /// @example
35
+ /// @include old-mozilla() { // properties }
36
+ ///
37
+
38
+ @mixin old-mozilla() {
39
+ @if $legacy-support-for-mozilla {
40
+ @content;
41
+ }
42
+ }
@@ -37,7 +37,8 @@
37
37
  }
38
38
 
39
39
  ///
40
- /// Converts a list of property values to a property map. Use to convert 'old-style' associative arrays to SASS's new Map type.
40
+ /// Converts a list of property values to a property map. Use to convert
41
+ /// 'old-style' associative arrays to SASS's new Map type.
41
42
  ///
42
43
  /// @example
43
44
  /// list-to-map((color $white, text-align left))
@@ -66,54 +67,9 @@
66
67
 
67
68
 
68
69
  ///
69
- /// Mixin for border properties
70
- ///
71
- /// @todo: fix line 96: #{$property}-#{$key}
72
- ///
73
- /// @since 0.1
74
- ///
75
- /// @param {String | Map | List | Number} $values - The border (or outline) properties
76
- /// @param {Bool} $outline - If true, will render the values as outline properties
77
- ///
78
-
79
- @mixin border($values, $outline: false) {
80
-
81
- // This mixin needs a value-map to work, so convert argument if it is not a value-map;
82
- @if not(is-value-map($values, $keys-border)) {
83
- $values: value-map($values, $keys-border);
84
- }
85
-
86
- $property: if($outline, outline, border);
87
-
88
- // Rem fallback
89
- $width: map-get($values, width);
90
- @if type-of($width) == number and unit($width) == rem {
91
- #{$property}-width: to-px($width);
92
- }
93
-
94
- @if map-has-key($values, width) and map-has-key($values, style) and map-has-key($values, color) {
95
- #{$property}: map-get($values, width) map-get($values, style) map-get($values, color);
96
- }
97
- @else {
98
- @each $key, $value in $values {
99
- // styleguide:ignore:start
100
- #{$property}-#{$key}: $value;
101
- // styleguide:ignore:end
102
- }
103
- }
104
- }
105
-
106
- ///
107
- /// @alias border
108
- ///
109
-
110
- @mixin outline($attributes) {
111
- @include border($attributes, true);
112
- }
113
-
114
-
115
- ///
116
- /// Provides a cross-browser method to implement opacity. This replaces [Compass's](http://compass-style.org/reference/compass/css3/opacity/) mixin by the same name with a more accessible implementation.
70
+ /// Provides a cross-browser method to implement opacity. This replaces
71
+ /// [Compass's](http://compass-style.org/reference/compass/css3/opacity/) mixin
72
+ /// by the same name with a more accessible implementation.
117
73
  ///
118
74
  /// @since 0.1
119
75
  ///
@@ -145,39 +101,9 @@
145
101
  }
146
102
 
147
103
  ///
148
- /// Support for old-ie, use it to separate old-ie declarations from your other declarations with either a separate stylesheet or added specificity (Modernizr).
149
- ///
150
- /// @since 0.1
151
- ///
152
- /// @example
153
- /// @include old-ie() { // properties }
154
- ///
155
-
156
- @mixin old-ie() {
157
- @if $legacy-support-for-ie {
158
- @content;
159
- }
160
- }
161
-
162
-
163
- ///
164
- /// Support for old-mozilla, use it to separate old-mozilla declarations from your other declarations with either a separate stylesheet or added specificity (Modernizr).
165
- ///
166
- /// @since 0.1
167
- ///
168
- /// @example
169
- /// @include old-mozilla() { // properties }
170
- ///
171
-
172
- @mixin old-mozilla() {
173
- @if $legacy-support-for-mozilla {
174
- @content;
175
- }
176
- }
177
-
178
-
179
- ///
180
- /// Provides a cross-browser method to implement display: inline-block;. This replaces [Compass's](http://compass-style.org/reference/compass/css3/inline_block/) mixin by the same name with a more accessible implementation.
104
+ /// Provides a cross-browser method to implement display: inline-block;. This
105
+ /// replaces [Compass's](http://compass-style.org/reference/compass/css3/inline_block/)
106
+ /// mixin by the same name with a more accessible implementation.
181
107
  /// See for valid property values: [http://www.w3schools.com/cssref/pr_pos_vertical-align.asp](http://www.w3schools.com/cssref/pr_pos_vertical-align.asp)
182
108
  ///
183
109
  /// @since 0.1