piecss 0.1.6.4.6 → 0.1.6.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ca51ced66570e47d9f898e0880977627a04ddb0a
4
- data.tar.gz: cc74d66eec7551dc762a9b81fe198169999ff44c
3
+ metadata.gz: 612e4fffeb6515034377786c1cd7020edfdb4c71
4
+ data.tar.gz: a8b0e03d83178a2ecb11303e36a6efb0364ea1ff
5
5
  SHA512:
6
- metadata.gz: cb440e76c6cf0ee08af23fd6077477d3c27e153e78808c41ad47f225fcf775795ad674fc1bfb8230c40a3961c1fa4aff601960ca63eaa5b6d48c549ccc12af41
7
- data.tar.gz: 02c6c1fa63cf2d961647d9fd90ab84c608efb30a54a708a35746d78b1681806566da9d4ccf093b8dafb4002a3b06ee09dee7227a8fadc751d468d6fdf7239824
6
+ metadata.gz: 337bac6bb7ddef1bfd7d9f07e0d120122255f862fbb4afd2468197d3feee0ee35908844a8bd93a77980957fbfd228eec95b28ff79941f4c1b117398cff20b458
7
+ data.tar.gz: 5c639d9b08b2ecd72877e9e9c8729329245d36928f48171e54075ca211f238fdfe087594712b6cd7ccff35752fcb2f9fb19fa901d931052707d2d1dd7c6dd81a
data/README.md CHANGED
@@ -2,6 +2,4 @@
2
2
 
3
3
  gem install piecss
4
4
 
5
- More info can be found here: [http://www.piecss.com](http://www.piecss.com)
6
-
7
- [![Gem Version](https://badge.fury.io/rb/piecss.svg)](http://badge.fury.io/rb/piecss)
5
+ [![Gem Version](https://badge.fury.io/rb/piecss.svg)](http://badge.fury.io/rb/piecss)
@@ -167,4 +167,39 @@
167
167
  }
168
168
  }
169
169
  }
170
+ }
171
+
172
+
173
+ @if $debug-layout {
174
+ %debug-layout {
175
+ position: relative;
176
+ &::after {
177
+ content: '';
178
+ display: block;
179
+ position: absolute;
180
+ z-index: -1;
181
+ left: 0;
182
+ top: 0;
183
+ width: 100%;
184
+ height: 100%;
185
+
186
+ background-color: transparent;
187
+ background-repeat: repeat-x;
188
+ background-position: 0 0;
189
+
190
+ @include debug-layout();
191
+
192
+ @each $breakpoint, $layout in $layouts {
193
+ @include breakpoint($breakpoint) {
194
+ $columns: map-get($layout, columns);
195
+ $color: map-get($layout, color);
196
+ @include debug-layout($columns, $color, $gutter-width);
197
+ }
198
+ }
199
+ }
200
+ }
201
+
202
+ .debug-layout {
203
+ @extend %debug-layout;
204
+ }
170
205
  }
@@ -7,7 +7,7 @@ Debug helpers
7
7
  -----------------------------------------------------------------------------
8
8
  */
9
9
 
10
- %debug {
10
+ %debug-rhythm {
11
11
  /*
12
12
  * Mixin debug-rhythm to display the vertical rhythm units
13
13
  */
@@ -15,7 +15,7 @@ Debug helpers
15
15
  }
16
16
 
17
17
  @if $debug-rhythm {
18
- body.debug-rhythm {
19
- @extend %debug;
18
+ .debug-rhythm {
19
+ @extend %debug-rhythm;
20
20
  }
21
21
  }
@@ -25,6 +25,16 @@ $rhythm: $default-line-height !default;
25
25
 
26
26
  $debug-rhythm: false !default;
27
27
 
28
+ /**
29
+ * If true,reveals the document's horizontal rhythm. Also see: [mixin $debug-layout](./#mixin-debug-layout).
30
+ *
31
+ * @since 0.1
32
+ *
33
+ * @type {Bool}
34
+ */
35
+
36
+ $debug-layout: false !default;
37
+
28
38
  /**
29
39
  * Based on an idea by [@csswizardry](https://twitter.com/csswizardry): apply a bottom margin of one rhythm height to any element in this comma separated list.
30
40
  *
@@ -154,4 +164,15 @@ $root-max-width: 72em !default;
154
164
  * @type {Number}
155
165
  */
156
166
 
157
- $root-position: center !default;
167
+ $root-position: center !default;
168
+
169
+ /**
170
+ * The page's default number of columns. Used in debug-layout to visualize column layout.
171
+ *
172
+ * @since 0.1
173
+ *
174
+ * @type {Number}
175
+ */
176
+
177
+ $columns: 4 !default;
178
+
@@ -153,6 +153,25 @@
153
153
  }
154
154
 
155
155
 
156
+ /**
157
+ * Get layout settings from a layout map
158
+ *
159
+ *
160
+ * @param {String} $breakpoints - A valid breakpoint
161
+ * @param {Map} $page - An optional page layout
162
+ *
163
+ * @return {Map} - A breakpoint global layout, or a breakpoint nested page layout from [$layouts map](./#variable-layouts)
164
+ */
165
+
166
+ @function get-layout($breakpoint, $page: null) {
167
+ $layout: map-get($layouts, $breakpoint);
168
+ @if $page {
169
+ $layout: map-get($layout, $page);
170
+ }
171
+ @return $layout;
172
+ }
173
+
174
+
156
175
  // 2. MIXINS
157
176
 
158
177
 
@@ -368,4 +387,37 @@
368
387
  position: initial;
369
388
  }
370
389
  }
371
- }
390
+ }
391
+
392
+
393
+ /**
394
+ * Reveals the document's horizontal rhythm. Will automatically be mixed in when [$debug-layout](./#variable-debug-layout) is set to true.
395
+ *
396
+ * @since 0.1
397
+ */
398
+
399
+ @mixin debug-layout($columns: $columns, $color: #000, $gutter-width: $gutter-width)
400
+ {
401
+ background-size: percentage(1 / $columns) 100%;
402
+ background-image:
403
+ linear-gradient(to right,
404
+ rgba($color,.1) 0,
405
+ rgba($color,.1) $gutter-width / 2,
406
+ transparent $gutter-width / 2,
407
+ transparent percentage($columns / $columns)
408
+ ),
409
+ linear-gradient(to left,
410
+ rgba($color,.1) 0,
411
+ rgba($color,.1) $gutter-width / 2,
412
+ transparent $gutter-width / 2,
413
+ transparent percentage($columns / $columns)
414
+ ),
415
+ linear-gradient(to left,
416
+ transparent 0%,
417
+ rgba(0,0,0,.5) 1px,
418
+ transparent 1px,
419
+ transparent percentage($columns / $columns)
420
+ )
421
+ ;
422
+ }
423
+
File without changes
File without changes
File without changes
@@ -3,8 +3,27 @@
3
3
  * Licensed under MIT; see LICENSE.txt
4
4
  */
5
5
 
6
- // Example configuration for layout
6
+ // Example configuration for columns
7
7
  $column-widths: (
8
8
  $small_handheld: (main: 1/1, side: 1/1),
9
9
  $small_desktop: (main: 2/3, side: 1/3),
10
+ );
11
+
12
+ // Example configuration for layout
13
+ $layouts: (
14
+ $small_handheld: (
15
+ columns: 4,
16
+ color: $orange,
17
+ pages: (),
18
+ ),
19
+ $medium_handheld: (
20
+ columns: 8,
21
+ color: $cyan,
22
+ pages: (),
23
+ ),
24
+ $small_desktop: (
25
+ columns: 12,
26
+ color: $becca,
27
+ pages: (),
28
+ )
10
29
  );
@@ -18,7 +18,7 @@
18
18
  // 2c. Settings
19
19
  // Piecss settings
20
20
  // Project settings
21
- // 2d. Elements
21
+ // 2d. Sets
22
22
  // 2e. Behavior (output)
23
23
  // Piecss behavior
24
24
  // Project behavior
@@ -78,13 +78,13 @@ $debug-rhythm: false;
78
78
 
79
79
  // ==========================================================================
80
80
  //
81
- // 2d. ELEMENTS
81
+ // 2d. Sets
82
82
  //
83
- // 2. Project elements
83
+ // 2. Project sets
84
84
  //
85
85
  // ==========================================================================
86
86
 
87
- @import "elements";
87
+ @import "sets";
88
88
 
89
89
 
90
90
  // ==========================================================================
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: piecss
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6.4.6
4
+ version: 0.1.6.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Babs Gosgens
@@ -104,10 +104,10 @@ files:
104
104
  - sass/piecss/utilities/_side.scss
105
105
  - sass/piecss/utilities/_typography.scss
106
106
  - sass/piecss/utilities/_unit.scss
107
- - templates/project/_elements.scss
107
+ - templates/project/_sets.scss
108
+ - templates/project/_sets/_button.scss
109
+ - templates/project/_sets/_form.scss
108
110
  - templates/project/_settings.scss
109
- - templates/project/elements/_button.scss
110
- - templates/project/elements/_form.scss
111
111
  - templates/project/examples.html
112
112
  - templates/project/manifest.rb
113
113
  - templates/project/screen.scss