piecss 0.3.0.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +48 -0
- data/sass/piecss/_behavior.css +97 -0
- data/sass/piecss/_behavior.css.map +7 -0
- data/sass/piecss/_settings.css +9 -0
- data/sass/piecss/_settings.css.map +7 -0
- data/sass/piecss/_settings.scss +1 -0
- data/sass/piecss/_utilities.css +3 -0
- data/sass/piecss/_utilities.css.map +7 -0
- data/sass/piecss/behavior/_anchor.scss +11 -11
- data/sass/piecss/behavior/_base.scss +1 -1
- data/sass/piecss/behavior/_button.scss +1 -1
- data/sass/piecss/behavior/_form.scss +18 -16
- data/sass/piecss/behavior/_grid.scss +1 -1
- data/sass/piecss/behavior/_list.scss +53 -53
- data/sass/piecss/behavior/grid/_layout.scss +22 -22
- data/sass/piecss/settings/_base.scss +3 -3
- data/sass/piecss/settings/_form.scss +2 -2
- data/sass/piecss/settings/_layout.scss +6 -30
- data/sass/piecss/settings/_rhythm.scss +26 -0
- data/sass/piecss/settings/_typography.scss +0 -13
- data/sass/piecss/utilities/_breakpoint.scss +4 -3
- data/sass/piecss/utilities/_layout.scss +115 -137
- data/sass/piecss/utilities/_list.scss +3 -5
- data/sass/piecss/utilities/_miscellaneous.scss +1 -3
- data/sass/piecss/utilities/_rhythm.scss +3 -3
- data/sass/piecss/utilities/_side.scss +3 -2
- data/sass/piecss/utilities/_string.scss +11 -8
- data/sass/piecss/utilities/_svg.scss +2 -2
- data/sass/piecss/utilities/_typography.scss +2 -12
- data/sass/piecss/utilities/_unit.scss +12 -12
- metadata +7 -1
@@ -14,7 +14,7 @@
|
|
14
14
|
/// Function to replace characters in a string.
|
15
15
|
///
|
16
16
|
/// @example
|
17
|
-
///
|
17
|
+
/// @include str-replace('Hello World', 'Hello', 'Yo');
|
18
18
|
///
|
19
19
|
/// @since 1.0
|
20
20
|
///
|
@@ -35,19 +35,20 @@
|
|
35
35
|
}
|
36
36
|
|
37
37
|
///
|
38
|
-
///
|
38
|
+
/// Implode lists
|
39
39
|
/// http://hugogiraudel.com/2013/08/08/advanced-sass-list-functions/#miscellaneous
|
40
40
|
///
|
41
41
|
/// @example
|
42
42
|
/// $list: a, b, c d e, f, g, h;
|
43
|
-
/// $new-list: implode($list); // abcdefgh
|
44
|
-
/// $new-list: implode($list
|
43
|
+
/// $new-list: implode($list, ""); // abcdefgh
|
44
|
+
/// $new-list: implode($list); // a, b, c, d, e, f, g, h
|
45
|
+
/// $new-list: implode($list, "-"); // a-b-c-d-e-f-g-h
|
45
46
|
///
|
46
47
|
/// @since 1.0
|
47
48
|
///
|
48
49
|
/// @param {List} $list - The list to implode
|
49
50
|
/// @param {String} $separator (, ) - A separator to join the list items
|
50
|
-
/// @param {Bool} $is-nested (false) - Set to true
|
51
|
+
/// @param {Bool} $is-nested (false) - Set to true if the list contains other lists
|
51
52
|
///
|
52
53
|
|
53
54
|
@function implode($list, $separator: ', ', $is-nested: false) {
|
@@ -57,10 +58,12 @@
|
|
57
58
|
$e: nth($list, $i);
|
58
59
|
|
59
60
|
@if type-of($e) == list {
|
60
|
-
$string: $string#{
|
61
|
+
$string: unquote("#{$string}#{implode($e, $separator, true)}");
|
61
62
|
}
|
62
|
-
@else {
|
63
|
-
$string: if($i != length($list) or $is-nested,
|
63
|
+
@else {
|
64
|
+
$string: if($i != length($list) or $is-nested,
|
65
|
+
unquote("#{$string}#{$e}#{$separator}"),
|
66
|
+
unquote("#{$string}#{$e}"));
|
64
67
|
}
|
65
68
|
}
|
66
69
|
|
@@ -11,10 +11,10 @@
|
|
11
11
|
|
12
12
|
|
13
13
|
///
|
14
|
-
/// Function to
|
14
|
+
/// Function to convert an svg into a data URI
|
15
15
|
///
|
16
16
|
/// @example
|
17
|
-
///
|
17
|
+
/// @include svg-url('<svg xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M0 0h10v10H0z"/></svg>');
|
18
18
|
///
|
19
19
|
/// @since 1.0
|
20
20
|
///
|
@@ -91,23 +91,13 @@
|
|
91
91
|
}
|
92
92
|
|
93
93
|
|
94
|
-
///
|
95
|
-
/// @alias to-unit
|
96
|
-
/// @deprecated
|
97
|
-
///
|
98
|
-
|
99
|
-
@function font-size($target-px, $unit: $unit, $context: $font-size) {
|
100
|
-
@return to-unit($target-px, $unit, $context);
|
101
|
-
}
|
102
|
-
|
103
|
-
|
104
94
|
///
|
105
95
|
/// Calculate the optimal line-height
|
106
96
|
///
|
107
97
|
/// @since 0.1
|
108
98
|
///
|
109
99
|
/// @param {Number} $font-size - The font-size in px
|
110
|
-
/// @param {Number} $min-ratio (Float) - The
|
100
|
+
/// @param {Number} $min-ratio (Float) - The minimum line-height ratio to maintain
|
111
101
|
///
|
112
102
|
/// @return {Number} - line-height in px
|
113
103
|
///
|
@@ -158,7 +148,7 @@
|
|
158
148
|
|
159
149
|
///
|
160
150
|
/// 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.
|
161
|
-
/// More info: [$font-size](./#variable-default-font-size), [$line-height](./#variable-default-line-height)
|
151
|
+
/// More info: [$font-size](./#variable-default-font-size), [$default-line-height](./#variable-default-line-height)
|
162
152
|
///
|
163
153
|
/// @since 0.1
|
164
154
|
///
|
@@ -37,12 +37,12 @@
|
|
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 ($font-size) - The context of the targeted element, for calculations to em
|
40
|
+
/// @param {Number} $context ($default-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: $font-size) {
|
45
|
+
@function to-unit($number, $unit: $unit, $context: $default-font-size) {
|
46
46
|
@if not(type-of($number) == number) {
|
47
47
|
@warn "Argument $number needs to be a number.";
|
48
48
|
@return $number;
|
@@ -68,7 +68,7 @@
|
|
68
68
|
$number: percentage($number / $context);
|
69
69
|
}
|
70
70
|
@elseif unit($unit) == "rem" {
|
71
|
-
$number: $number / $font-size * $unit;
|
71
|
+
$number: $number / $default-font-size * $unit;
|
72
72
|
}
|
73
73
|
@else {
|
74
74
|
$number: $number / $context * $unit;
|
@@ -86,12 +86,12 @@
|
|
86
86
|
///
|
87
87
|
/// @param {Number} $target-px - The final size in px
|
88
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
|
89
|
+
/// @param {Number} $context ($default-font-size) - The context of the targeted element, for calculations to em
|
90
90
|
///
|
91
91
|
/// @return {Number} - The value in the requested unit
|
92
92
|
///
|
93
93
|
|
94
|
-
@function px($value, $unit: $unit, $context: $font-size) {
|
94
|
+
@function px($value, $unit: $unit, $context: $default-font-size) {
|
95
95
|
|
96
96
|
@if unit($value) != "px" {
|
97
97
|
@warn "Argument $value needs to be unitless, or set in px.";
|
@@ -112,12 +112,12 @@
|
|
112
112
|
/// @since 0.1
|
113
113
|
///
|
114
114
|
/// @param {Number} $value - The value to convert, in any unit
|
115
|
-
/// @param {Number} $context ($font-size) - The context of the targeted element, for calculations to em
|
115
|
+
/// @param {Number} $context ($default-font-size) - The context of the targeted element, for calculations to em
|
116
116
|
///
|
117
117
|
/// @return {Number} - The value in px
|
118
118
|
///
|
119
119
|
|
120
|
-
@function to-px($value, $context: $font-size) {
|
120
|
+
@function to-px($value, $context: $default-font-size) {
|
121
121
|
|
122
122
|
@if unit($value) == "px" {
|
123
123
|
}
|
@@ -145,7 +145,7 @@
|
|
145
145
|
///
|
146
146
|
|
147
147
|
@function rem-to-px($value) {
|
148
|
-
@return $font-size * strip-unit($value);
|
148
|
+
@return $default-font-size * strip-unit($value);
|
149
149
|
}
|
150
150
|
|
151
151
|
///
|
@@ -154,12 +154,12 @@
|
|
154
154
|
/// @since 0.1
|
155
155
|
///
|
156
156
|
/// @param {Number} $value - The value to convert
|
157
|
-
/// @param {Number} $context ($font-size) - The context of the targeted element
|
157
|
+
/// @param {Number} $context ($default-font-size) - The context of the targeted element
|
158
158
|
///
|
159
159
|
/// @return {Number} - The value in px
|
160
160
|
///
|
161
161
|
|
162
|
-
@function em-to-px($value, $context: $font-size) {
|
162
|
+
@function em-to-px($value, $context: $default-font-size) {
|
163
163
|
@return $context * strip-unit($value);
|
164
164
|
}
|
165
165
|
|
@@ -171,11 +171,11 @@
|
|
171
171
|
/// @todo Needs to take into account the context
|
172
172
|
///
|
173
173
|
/// @param {Number} $value - The value to convert
|
174
|
-
/// @param {Number} $context ($font-size) - The context of the targeted element
|
174
|
+
/// @param {Number} $context ($default-font-size) - The context of the targeted element
|
175
175
|
///
|
176
176
|
/// @return {Number} - The value in px
|
177
177
|
///
|
178
178
|
|
179
|
-
@function percentage-to-px($value, $context: $font-size) {
|
179
|
+
@function percentage-to-px($value, $context: $default-font-size) {
|
180
180
|
@return $value / 100% * $context;
|
181
181
|
}
|
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.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Babs Gosgens
|
@@ -33,8 +33,14 @@ extra_rdoc_files: []
|
|
33
33
|
files:
|
34
34
|
- README.md
|
35
35
|
- lib/piecss.rb
|
36
|
+
- sass/piecss/_behavior.css
|
37
|
+
- sass/piecss/_behavior.css.map
|
36
38
|
- sass/piecss/_behavior.scss
|
39
|
+
- sass/piecss/_settings.css
|
40
|
+
- sass/piecss/_settings.css.map
|
37
41
|
- sass/piecss/_settings.scss
|
42
|
+
- sass/piecss/_utilities.css
|
43
|
+
- sass/piecss/_utilities.css.map
|
38
44
|
- sass/piecss/_utilities.scss
|
39
45
|
- sass/piecss/behavior/_anchor.scss
|
40
46
|
- sass/piecss/behavior/_base.scss
|