piecss 0.2.0.0 → 0.3.0.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.
- checksums.yaml +4 -4
- data/lib/piecss.rb +16 -5
- data/sass/piecss/_settings.scss +6 -3
- data/sass/piecss/_utilities.scss +3 -0
- data/sass/piecss/behavior/_anchor.scss +1 -1
- data/sass/piecss/settings/_base.scss +5 -25
- data/sass/piecss/settings/_breakpoint.scss +112 -18
- data/sass/piecss/settings/_button.scss +2 -2
- data/sass/piecss/settings/_colour.scss +152 -0
- data/sass/piecss/settings/_constants.scss +0 -143
- data/sass/piecss/settings/_font.scss +0 -21
- data/sass/piecss/settings/_form.scss +7 -9
- data/sass/piecss/settings/{_grid.scss → _layout.scss} +43 -44
- data/sass/piecss/settings/_list.scss +1 -1
- data/sass/piecss/settings/_miscellaneous.scss +5 -0
- data/sass/piecss/settings/_rhythm.scss +0 -0
- data/sass/piecss/settings/_typography.scss +13 -0
- data/sass/piecss/settings/fonts/_example.scss +36 -36
- data/sass/piecss/settings/fonts/_monospace.scss +33 -33
- data/sass/piecss/settings/fonts/_sans-serif.scss +33 -33
- data/sass/piecss/settings/fonts/_serif.scss +33 -33
- data/sass/piecss/settings/fonts/_verdana.scss +34 -34
- data/sass/piecss/utilities/_breakpoint.scss +5 -5
- data/sass/piecss/utilities/_cache.scss +8 -4
- data/sass/piecss/utilities/_colour.scss +37 -0
- data/sass/piecss/utilities/_element.scss +85 -88
- data/sass/piecss/utilities/_image.scss +20 -22
- data/sass/piecss/utilities/_layout.scss +382 -213
- data/sass/piecss/utilities/_list.scss +2 -0
- data/sass/piecss/utilities/_miscellaneous.scss +161 -99
- data/sass/piecss/utilities/_rhythm.scss +27 -59
- data/sass/piecss/utilities/_side.scss +155 -154
- data/sass/piecss/utilities/_string.scss +68 -0
- data/sass/piecss/utilities/_svg.scss +47 -0
- data/sass/piecss/utilities/_typography.scss +96 -107
- data/sass/piecss/utilities/_unit.scss +85 -50
- data/templates/project/_sets/_button.scss +1 -1
- data/templates/project/_sets/_form.scss +1 -1
- data/templates/project/_sets.scss +1 -1
- data/templates/project/_settings.scss +1 -1
- metadata +13 -40
- data/sass/piecss/settings/fonts/_asap.scss +0 -44
- data/sass/piecss/settings/fonts/_bree-serif.scss +0 -23
- data/sass/piecss/settings/fonts/_lato.scss +0 -32
- data/sass/piecss/settings/fonts/_pt-sans.scss +0 -40
- data/sass/piecss/settings/fonts/_raleway.scss +0 -31
- data/sass/piecss/settings/fonts/_righteous.scss +0 -23
- data/sass/piecss/settings/fonts/_roboto-slab.scss +0 -37
- data/sass/piecss/settings/fonts/_roboto.scss +0 -35
- data/sass/piecss/settings/fonts/_sofia-pro.scss +0 -40
- data/sass/piecss/settings/fonts/_varela-round.scss +0 -24
- data/sass/piecss/settings/fonts/icon-fonts/_fontawesome.scss +0 -33
- data/sass/piecss/settings/fonts/icon-fonts/_foundation-accessability.scss +0 -75
- data/sass/piecss/settings/fonts/icon-fonts/fontawesome/_bootstrap.scss +0 -84
- data/sass/piecss/settings/fonts/icon-fonts/fontawesome/_core.scss +0 -129
- data/sass/piecss/settings/fonts/icon-fonts/fontawesome/_extras.scss +0 -93
- data/sass/piecss/settings/fonts/icon-fonts/fontawesome/_icons.scss +0 -381
- data/sass/piecss/settings/fonts/icon-fonts/fontawesome/_mixins.scss +0 -48
- data/sass/piecss/settings/fonts/icon-fonts/fontawesome/_path.scss +0 -14
- data/sass/piecss/settings/fonts/icon-fonts/fontawesome/_variables.scss +0 -734
- data/sass/piecss/settings/fonts/icon-fonts/foundation-accessability/_settings.scss +0 -28
@@ -36,7 +36,7 @@
|
|
36
36
|
///
|
37
37
|
|
38
38
|
@function extract-type-style($type) {
|
39
|
-
|
39
|
+
@return nth($type, 1);
|
40
40
|
}
|
41
41
|
|
42
42
|
|
@@ -52,9 +52,8 @@
|
|
52
52
|
/// @return {String} - font-variant property
|
53
53
|
///
|
54
54
|
|
55
|
-
@function extract-type-variant($type)
|
56
|
-
|
57
|
-
@return nth($type, 2);
|
55
|
+
@function extract-type-variant($type) {
|
56
|
+
@return nth($type, 2);
|
58
57
|
}
|
59
58
|
|
60
59
|
|
@@ -70,9 +69,8 @@
|
|
70
69
|
/// @return {String} - font-weight property
|
71
70
|
///
|
72
71
|
|
73
|
-
@function extract-type-weight($type)
|
74
|
-
|
75
|
-
@return nth($type, 3);
|
72
|
+
@function extract-type-weight($type) {
|
73
|
+
@return nth($type, 3);
|
76
74
|
}
|
77
75
|
|
78
76
|
|
@@ -88,9 +86,8 @@
|
|
88
86
|
/// @return {String} - font-family property
|
89
87
|
///
|
90
88
|
|
91
|
-
@function extract-type-family($type)
|
92
|
-
|
93
|
-
@return nth($type, 4);
|
89
|
+
@function extract-type-family($type) {
|
90
|
+
@return nth($type, 4);
|
94
91
|
}
|
95
92
|
|
96
93
|
|
@@ -99,32 +96,31 @@
|
|
99
96
|
/// @deprecated
|
100
97
|
///
|
101
98
|
|
102
|
-
@function font-size($target-px, $unit: $unit, $context: $
|
103
|
-
|
104
|
-
@return to-unit($target-px, $unit, $context);
|
99
|
+
@function font-size($target-px, $unit: $unit, $context: $font-size) {
|
100
|
+
@return to-unit($target-px, $unit, $context);
|
105
101
|
}
|
106
102
|
|
107
103
|
|
108
104
|
///
|
109
|
-
///
|
105
|
+
/// Calculate the optimal line-height
|
110
106
|
///
|
111
107
|
/// @since 0.1
|
112
108
|
///
|
113
|
-
/// @param {Number} $
|
114
|
-
/// @param {Number} $
|
115
|
-
/// @param {Number} $unit ($line-height-unit) - The final unit to which $target-px is converted, e.g. 1px, 1rem, 1em, 1% or 1 for unitless
|
109
|
+
/// @param {Number} $font-size - The font-size in px
|
110
|
+
/// @param {Number} $min-ratio (Float) - The final unit to which $target-px is converted, e.g. 1px, 1rem, 1em, 1% or 1 for unitless
|
116
111
|
///
|
117
112
|
/// @return {Number} - line-height in px
|
118
113
|
///
|
119
114
|
|
120
|
-
@function line-height($
|
121
|
-
{
|
115
|
+
@function line-height($font-size, $min-ratio: 1.5) {
|
116
|
+
@if unit($font-size) != "px" {
|
117
|
+
@error "The line-height function expects a font-size in px. If you want the line-height in a different unit, calculate the line-height in px first, and then convert it using to-unit()";
|
118
|
+
}
|
119
|
+
@if $min-ratio == 0 {
|
120
|
+
$min-ratio: 1;
|
121
|
+
}
|
122
122
|
|
123
|
-
|
124
|
-
@return strip-unit($target-px/$context);
|
125
|
-
} @else {
|
126
|
-
@return to-unit($target-px, $unit, $context);
|
127
|
-
}
|
123
|
+
@return ceil($font-size * $min-ratio / $rhythm) * $rhythm;
|
128
124
|
}
|
129
125
|
|
130
126
|
|
@@ -140,21 +136,20 @@
|
|
140
136
|
/// @return {String} - weight, defaults to 'regular'
|
141
137
|
///
|
142
138
|
|
143
|
-
@function weight-number-to-string($weight: regular)
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
}
|
139
|
+
@function weight-number-to-string($weight: regular) {
|
140
|
+
|
141
|
+
@if $weight == 100 { @return "ultra-light"; }
|
142
|
+
@if $weight == 200 { @return "light"; }
|
143
|
+
@if $weight == 300 { @return "book"; }
|
144
|
+
@if $weight == 400 { @return "regular"; }
|
145
|
+
@if $weight == 500 { @return "medium"; }
|
146
|
+
@if $weight == 600 { @return "semi-bold"; }
|
147
|
+
@if $weight == 700 { @return "bold"; }
|
148
|
+
@if $weight == 800 { @return "extra-bold"; }
|
149
|
+
@if $weight == 900 { @return "heavy"; }
|
150
|
+
|
151
|
+
@warn "Not a valid weight";
|
152
|
+
@return false;
|
158
153
|
}
|
159
154
|
|
160
155
|
|
@@ -163,58 +158,61 @@
|
|
163
158
|
|
164
159
|
///
|
165
160
|
/// Mixes in the shorthand font tag. This is the only mixin that takes the font-size and line-height in their final unit of output.
|
166
|
-
/// More info: [$
|
161
|
+
/// More info: [$font-size](./#variable-default-font-size), [$line-height](./#variable-default-line-height)
|
167
162
|
///
|
168
163
|
/// @since 0.1
|
169
164
|
///
|
170
165
|
/// @todo Accept properties in the same way as the default CSS font implementation
|
171
|
-
///
|
166
|
+
///
|
172
167
|
/// @param {List | Bool} $type - a valid type array ($style, $variant, $weight, $family) or false to only output font-size and line-height
|
173
|
-
/// @param {Number} $font-size ($
|
174
|
-
/// @param {Number} $line-height ($
|
175
|
-
///
|
176
|
-
|
177
|
-
@mixin font($arguments...)
|
178
|
-
{
|
179
|
-
$type: null;
|
180
|
-
$font-size: null;
|
181
|
-
$line-height: null;
|
182
|
-
|
183
|
-
@each $argument in $arguments {
|
184
|
-
|
185
|
-
@if type-of($argument)==list {
|
186
|
-
$type: $argument;
|
187
|
-
} @else {
|
188
|
-
@if not($font-size) {
|
189
|
-
$font-size: $argument;
|
190
|
-
} @elseif not($line-height) {
|
191
|
-
$line-height: $argument;
|
192
|
-
}
|
193
|
-
}
|
194
|
-
}
|
168
|
+
/// @param {Number} $font-size ($font-size) - font-size in the final unit of output
|
169
|
+
/// @param {Number} $line-height ($line-height) - line-height in the final unit of output
|
170
|
+
///
|
195
171
|
|
196
|
-
|
172
|
+
@mixin font($arguments...) {
|
197
173
|
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
$font-family: extract-type-family($type);
|
174
|
+
$type: null;
|
175
|
+
$font-size: null;
|
176
|
+
$line-height: null;
|
202
177
|
|
203
|
-
|
204
|
-
@include font-size($font-size, 1px);
|
205
|
-
}
|
178
|
+
@each $argument in $arguments {
|
206
179
|
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
180
|
+
@if type-of($argument) == list {
|
181
|
+
$type: $argument;
|
182
|
+
}
|
183
|
+
@else {
|
184
|
+
@if not($font-size) {
|
185
|
+
$font-size: $argument;
|
186
|
+
}
|
187
|
+
@elseif not($line-height) {
|
188
|
+
$line-height: $argument;
|
189
|
+
}
|
190
|
+
}
|
191
|
+
}
|
192
|
+
|
193
|
+
@if not(not($type)) {
|
215
194
|
|
216
|
-
|
195
|
+
$font-style: extract-type-style($type);
|
196
|
+
$font-variant: extract-type-variant($type);
|
197
|
+
$font-weight: extract-type-weight($type);
|
198
|
+
$font-family: extract-type-family($type);
|
199
|
+
|
200
|
+
@if $font-size and unit($unit) == rem {
|
201
|
+
@include font-size($font-size, 1px);
|
217
202
|
}
|
203
|
+
|
204
|
+
// Build font arguments
|
205
|
+
$font: #{$font-style} #{$font-variant} #{$font-weight};
|
206
|
+
@if $font-size and $line-height {
|
207
|
+
$font: append($font, #{$font-size}/#{$line-height});
|
208
|
+
}
|
209
|
+
@elseif $font-size {
|
210
|
+
$font: append($font, #{$font-size});
|
211
|
+
}
|
212
|
+
$font: append($font, #{$font-family});
|
213
|
+
|
214
|
+
font: #{$font};
|
215
|
+
}
|
218
216
|
}
|
219
217
|
|
220
218
|
|
@@ -226,9 +224,8 @@
|
|
226
224
|
/// @param {List} $type: a valid type list ($style, $variant, $weight, $family)
|
227
225
|
///
|
228
226
|
|
229
|
-
@mixin font-style($type)
|
230
|
-
|
231
|
-
font-style: extract-type-style($type);
|
227
|
+
@mixin font-style($type) {
|
228
|
+
font-style: extract-type-style($type);
|
232
229
|
}
|
233
230
|
|
234
231
|
|
@@ -240,9 +237,8 @@
|
|
240
237
|
/// @param {List} $type: a valid type list ($style, $variant, $weight, $family)
|
241
238
|
///
|
242
239
|
|
243
|
-
@mixin font-variant($type)
|
244
|
-
|
245
|
-
font-variant: extract-type-variant($type);
|
240
|
+
@mixin font-variant($type) {
|
241
|
+
font-variant: extract-type-variant($type);
|
246
242
|
}
|
247
243
|
|
248
244
|
|
@@ -254,9 +250,8 @@
|
|
254
250
|
/// @param {List} $type: a valid type list ($style, $variant, $weight, $family)
|
255
251
|
///
|
256
252
|
|
257
|
-
@mixin font-weight($type)
|
258
|
-
|
259
|
-
font-weight: extract-type-weight($type);
|
253
|
+
@mixin font-weight($type) {
|
254
|
+
font-weight: extract-type-weight($type);
|
260
255
|
}
|
261
256
|
|
262
257
|
|
@@ -268,9 +263,8 @@
|
|
268
263
|
/// @param {List} $type: a valid type list ($style, $variant, $weight, $family)
|
269
264
|
///
|
270
265
|
|
271
|
-
@mixin font-family($type)
|
272
|
-
|
273
|
-
font-family: extract-type-family($type);
|
266
|
+
@mixin font-family($type) {
|
267
|
+
font-family: extract-type-family($type);
|
274
268
|
}
|
275
269
|
|
276
270
|
|
@@ -281,31 +275,26 @@
|
|
281
275
|
///
|
282
276
|
/// @param {Number} $target-px - The font-size in px
|
283
277
|
/// @param {Number} $unit ($unit) - The final unit to which $target-px is converted, e.g.px | rem | em | %
|
284
|
-
/// @param {Number} $context ($
|
278
|
+
/// @param {Number} $context ($font-size) - The context of the targeted element, for calculations to em or %
|
285
279
|
///
|
286
280
|
|
287
|
-
@mixin font-size($target-px, $unit: $unit, $context: $
|
288
|
-
{
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
font-size: to-unit($target-px, $unit, $context);
|
281
|
+
@mixin font-size($target-px, $unit: $unit, $context: $font-size) {
|
282
|
+
@if unit($unit) == rem {
|
283
|
+
font-size: to-unit($target-px, $rem-fallback-unit, $context);
|
284
|
+
}
|
285
|
+
font-size: to-unit($target-px, $unit, $context);
|
293
286
|
}
|
294
287
|
|
295
288
|
///
|
296
|
-
/// Mixin for line-height
|
289
|
+
/// Mixin for line-height
|
297
290
|
///
|
298
291
|
/// @since 0.1
|
299
292
|
///
|
300
293
|
/// @param {Number} $target-px - the line-height in px
|
301
|
-
/// @param {Number} $context ($
|
294
|
+
/// @param {Number} $context ($font-size) - The context of the targeted element, for calculations to em
|
302
295
|
/// @param {Number} $unit ($line-height-unit) - The final unit to which $target-px is converted, e.g. 1px, 1rem, 1em, 1% or 1 for unitless
|
303
296
|
///
|
304
297
|
|
305
|
-
@mixin line-height($
|
306
|
-
|
307
|
-
@if unit($unit)==rem {
|
308
|
-
line-height: line-height($target-px, $context, $unit: $rem-fallback-unit);
|
309
|
-
}
|
310
|
-
line-height: line-height($target-px, $context, $unit);
|
298
|
+
@mixin line-height($font-size, $min-ratio: 1.5) {
|
299
|
+
line-height: line-height($font-size, $min-ratio);
|
311
300
|
}
|
@@ -24,7 +24,7 @@
|
|
24
24
|
///
|
25
25
|
|
26
26
|
@function strip-unit($value) {
|
27
|
-
|
27
|
+
@return $value / ($value * 0 + 1);
|
28
28
|
}
|
29
29
|
|
30
30
|
|
@@ -37,66 +37,101 @@
|
|
37
37
|
///
|
38
38
|
/// @param {Number} $target-px - The final size in px
|
39
39
|
/// @param {Number} $unit ($unit) - The final unit to which $target-px is converted, e.g. 1px, 1rem, 1em, 1%
|
40
|
-
/// @param {Number} $context ($
|
40
|
+
/// @param {Number} $context ($font-size) - The context of the targeted element, for calculations to em
|
41
41
|
///
|
42
42
|
/// @return {Number} - The value in the requested unit
|
43
43
|
///
|
44
44
|
|
45
|
-
@function to-unit($number, $unit: $unit, $context: $
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
45
|
+
@function to-unit($number, $unit: $unit, $context: $font-size) {
|
46
|
+
@if not(type-of($number) == number) {
|
47
|
+
@warn "Argument $number needs to be a number.";
|
48
|
+
@return $number;
|
49
|
+
}
|
50
|
+
|
51
|
+
@if strip-unit($number) == 0 {
|
52
|
+
@return strip-unit($number);
|
53
|
+
}
|
54
|
+
|
55
|
+
@if unitless($number) and not($number == 0) {
|
56
|
+
// We're dealing with a rhythm number, convert to px
|
57
|
+
$number: -rhythm-units($number);
|
58
|
+
}
|
59
|
+
|
60
|
+
@if unit($number) != px {
|
61
|
+
// Convert the value to px first
|
62
|
+
$number: to-px($number);
|
63
|
+
}
|
64
|
+
|
65
|
+
@if unit($unit) == "px" {
|
66
|
+
}
|
67
|
+
@elseif unit($unit) == "%" {
|
68
|
+
$number: percentage($number / $context);
|
69
|
+
}
|
70
|
+
@elseif unit($unit) == "rem" {
|
71
|
+
$number: $number / $font-size * $unit;
|
72
|
+
}
|
73
|
+
@else {
|
74
|
+
$number: $number / $context * $unit;
|
75
|
+
}
|
76
|
+
|
77
|
+
@return $number;
|
78
|
+
}
|
50
79
|
|
51
|
-
|
52
|
-
|
53
|
-
|
80
|
+
///
|
81
|
+
/// Convert a px value to a new unit, within the context of it's containing element
|
82
|
+
///
|
83
|
+
/// @throws Argument $value needs to be unitless, or set in px.
|
84
|
+
///
|
85
|
+
/// @since 0.1
|
86
|
+
///
|
87
|
+
/// @param {Number} $target-px - The final size in px
|
88
|
+
/// @param {Number} $unit ($unit) - The final unit to which $target-px is converted, e.g. 1px, 1rem, 1em, 1%
|
89
|
+
/// @param {Number} $context ($font-size) - The context of the targeted element, for calculations to em
|
90
|
+
///
|
91
|
+
/// @return {Number} - The value in the requested unit
|
92
|
+
///
|
54
93
|
|
55
|
-
|
56
|
-
/* We're dealing with a rhythm number, convert to px */
|
57
|
-
$number: -rhythm-units($number);
|
58
|
-
}
|
94
|
+
@function px($value, $unit: $unit, $context: $font-size) {
|
59
95
|
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
96
|
+
@if unit($value) != "px" {
|
97
|
+
@warn "Argument $value needs to be unitless, or set in px.";
|
98
|
+
@return $value;
|
99
|
+
}
|
64
100
|
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
} @elseif unit($unit)=='rem' {
|
69
|
-
$number: $number / $default-font-size * $unit;
|
70
|
-
} @else {
|
71
|
-
$number: $number / $context * $unit;
|
72
|
-
}
|
101
|
+
@if unitless($value) {
|
102
|
+
$value: $value * 1px;
|
103
|
+
}
|
73
104
|
|
74
|
-
|
105
|
+
@return to-unit($value, $unit, $context);
|
75
106
|
}
|
76
107
|
|
108
|
+
|
77
109
|
///
|
78
|
-
/// Convert any unit to a px value, within the context of it
|
110
|
+
/// Convert any unit to a px value, within the context of it"s containing element
|
79
111
|
///
|
80
112
|
/// @since 0.1
|
81
113
|
///
|
82
114
|
/// @param {Number} $value - The value to convert, in any unit
|
83
|
-
/// @param {Number} $context ($
|
84
|
-
///
|
115
|
+
/// @param {Number} $context ($font-size) - The context of the targeted element, for calculations to em
|
116
|
+
///
|
85
117
|
/// @return {Number} - The value in px
|
86
118
|
///
|
87
119
|
|
88
|
-
@function to-px($value, $context: $
|
89
|
-
@if unit($value)=='px' {
|
90
|
-
} @elseif unit($value)=='rem' {
|
91
|
-
$value: rem-to-px($value);
|
92
|
-
} @elseif unit($value)=='em' {
|
93
|
-
$value: em-to-px($value, $context);
|
94
|
-
} @elseif unit($value)=='%' {
|
95
|
-
$value: percentage-to-px($value);
|
96
|
-
}
|
120
|
+
@function to-px($value, $context: $font-size) {
|
97
121
|
|
98
|
-
|
122
|
+
@if unit($value) == "px" {
|
123
|
+
}
|
124
|
+
@elseif unit($value) == "rem" {
|
125
|
+
$value: rem-to-px($value);
|
126
|
+
}
|
127
|
+
@elseif unit($value) == "em" {
|
128
|
+
$value: em-to-px($value, $context);
|
129
|
+
}
|
130
|
+
@elseif unit($value) == "%" {
|
131
|
+
$value: percentage-to-px($value);
|
132
|
+
}
|
99
133
|
|
134
|
+
@return $value;
|
100
135
|
}
|
101
136
|
|
102
137
|
///
|
@@ -105,12 +140,12 @@
|
|
105
140
|
/// @since 0.1
|
106
141
|
///
|
107
142
|
/// @param {Number} $value - The value to convert
|
108
|
-
///
|
143
|
+
///
|
109
144
|
/// @return {Number} - The value in px
|
110
145
|
///
|
111
146
|
|
112
147
|
@function rem-to-px($value) {
|
113
|
-
|
148
|
+
@return $font-size * strip-unit($value);
|
114
149
|
}
|
115
150
|
|
116
151
|
///
|
@@ -119,13 +154,13 @@
|
|
119
154
|
/// @since 0.1
|
120
155
|
///
|
121
156
|
/// @param {Number} $value - The value to convert
|
122
|
-
/// @param {Number} $context ($
|
123
|
-
///
|
157
|
+
/// @param {Number} $context ($font-size) - The context of the targeted element
|
158
|
+
///
|
124
159
|
/// @return {Number} - The value in px
|
125
160
|
///
|
126
161
|
|
127
|
-
@function em-to-px($value, $context: $
|
128
|
-
|
162
|
+
@function em-to-px($value, $context: $font-size) {
|
163
|
+
@return $context * strip-unit($value);
|
129
164
|
}
|
130
165
|
|
131
166
|
///
|
@@ -136,11 +171,11 @@
|
|
136
171
|
/// @todo Needs to take into account the context
|
137
172
|
///
|
138
173
|
/// @param {Number} $value - The value to convert
|
139
|
-
/// @param {Number} $context ($
|
140
|
-
///
|
174
|
+
/// @param {Number} $context ($font-size) - The context of the targeted element
|
175
|
+
///
|
141
176
|
/// @return {Number} - The value in px
|
142
177
|
///
|
143
178
|
|
144
|
-
@function percentage-to-px($value, $context: $
|
145
|
-
|
179
|
+
@function percentage-to-px($value, $context: $font-size) {
|
180
|
+
@return $value / 100% * $context;
|
146
181
|
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: piecss
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Babs Gosgens
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-12-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sass
|
@@ -16,28 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '3.
|
19
|
+
version: '3.4'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '3.
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: compass
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - "~>"
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '1.0'
|
34
|
-
type: :runtime
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - "~>"
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '1.0'
|
26
|
+
version: '3.4'
|
41
27
|
description: Piecss produces little to none output. The only default output that Piecss
|
42
28
|
produces is an optimized version of Normalize.
|
43
29
|
email: babsgosgens@gmail.com
|
@@ -63,38 +49,23 @@ files:
|
|
63
49
|
- sass/piecss/settings/_base.scss
|
64
50
|
- sass/piecss/settings/_breakpoint.scss
|
65
51
|
- sass/piecss/settings/_button.scss
|
52
|
+
- sass/piecss/settings/_colour.scss
|
66
53
|
- sass/piecss/settings/_constants.scss
|
67
54
|
- sass/piecss/settings/_font.scss
|
68
55
|
- sass/piecss/settings/_form.scss
|
69
|
-
- sass/piecss/settings/
|
56
|
+
- sass/piecss/settings/_layout.scss
|
70
57
|
- sass/piecss/settings/_list.scss
|
71
|
-
- sass/piecss/settings/
|
72
|
-
- sass/piecss/settings/
|
58
|
+
- sass/piecss/settings/_miscellaneous.scss
|
59
|
+
- sass/piecss/settings/_rhythm.scss
|
60
|
+
- sass/piecss/settings/_typography.scss
|
73
61
|
- sass/piecss/settings/fonts/_example.scss
|
74
|
-
- sass/piecss/settings/fonts/_lato.scss
|
75
62
|
- sass/piecss/settings/fonts/_monospace.scss
|
76
|
-
- sass/piecss/settings/fonts/_pt-sans.scss
|
77
|
-
- sass/piecss/settings/fonts/_raleway.scss
|
78
|
-
- sass/piecss/settings/fonts/_righteous.scss
|
79
|
-
- sass/piecss/settings/fonts/_roboto-slab.scss
|
80
|
-
- sass/piecss/settings/fonts/_roboto.scss
|
81
63
|
- sass/piecss/settings/fonts/_sans-serif.scss
|
82
64
|
- sass/piecss/settings/fonts/_serif.scss
|
83
|
-
- sass/piecss/settings/fonts/_sofia-pro.scss
|
84
|
-
- sass/piecss/settings/fonts/_varela-round.scss
|
85
65
|
- sass/piecss/settings/fonts/_verdana.scss
|
86
|
-
- sass/piecss/settings/fonts/icon-fonts/_fontawesome.scss
|
87
|
-
- sass/piecss/settings/fonts/icon-fonts/_foundation-accessability.scss
|
88
|
-
- sass/piecss/settings/fonts/icon-fonts/fontawesome/_bootstrap.scss
|
89
|
-
- sass/piecss/settings/fonts/icon-fonts/fontawesome/_core.scss
|
90
|
-
- sass/piecss/settings/fonts/icon-fonts/fontawesome/_extras.scss
|
91
|
-
- sass/piecss/settings/fonts/icon-fonts/fontawesome/_icons.scss
|
92
|
-
- sass/piecss/settings/fonts/icon-fonts/fontawesome/_mixins.scss
|
93
|
-
- sass/piecss/settings/fonts/icon-fonts/fontawesome/_path.scss
|
94
|
-
- sass/piecss/settings/fonts/icon-fonts/fontawesome/_variables.scss
|
95
|
-
- sass/piecss/settings/fonts/icon-fonts/foundation-accessability/_settings.scss
|
96
66
|
- sass/piecss/utilities/_breakpoint.scss
|
97
67
|
- sass/piecss/utilities/_cache.scss
|
68
|
+
- sass/piecss/utilities/_colour.scss
|
98
69
|
- sass/piecss/utilities/_element.scss
|
99
70
|
- sass/piecss/utilities/_image.scss
|
100
71
|
- sass/piecss/utilities/_layout.scss
|
@@ -102,6 +73,8 @@ files:
|
|
102
73
|
- sass/piecss/utilities/_miscellaneous.scss
|
103
74
|
- sass/piecss/utilities/_rhythm.scss
|
104
75
|
- sass/piecss/utilities/_side.scss
|
76
|
+
- sass/piecss/utilities/_string.scss
|
77
|
+
- sass/piecss/utilities/_svg.scss
|
105
78
|
- sass/piecss/utilities/_typography.scss
|
106
79
|
- sass/piecss/utilities/_unit.scss
|
107
80
|
- templates/project/_sets/_button.scss
|
@@ -131,7 +104,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
131
104
|
version: '0'
|
132
105
|
requirements: []
|
133
106
|
rubyforge_project:
|
134
|
-
rubygems_version: 2.0.14
|
107
|
+
rubygems_version: 2.0.14.1
|
135
108
|
signing_key:
|
136
109
|
specification_version: 4
|
137
110
|
summary: A collection of tools for building responsive websites.
|