This repository was archived by the owner on Apr 23, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +41
-5
lines changed Expand file tree Collapse file tree 3 files changed +41
-5
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " fa-css-utilities" ,
3- "version" : " 1.6.0 " ,
3+ "version" : " 1.6.1 " ,
44 "description" : " CSS utilities for using and managing FreeAgent design properties consistently" ,
55 "repository" : {
66 "type" : " git" ,
Original file line number Diff line number Diff line change 99/* *
1010 * Example usage:
1111 * `@include margin(default);`
12+ * `@include margin(default large);`
13+ * `@include padding(default large x-large xx-small);`
14+ * `@include margin(x-large small, !important);`
1215 * `@include margin-left(large);`
1316 * `@include margin-bottom(xx-large, !important);`
1417 */
1518
16- @mixin margin ($value , $important : null) {
17- margin : map-get ($spacing-values , $value ) $important ;
19+ /* *
20+ * This mixin allows us to use shorthand values for the `margin` property.
21+ *
22+ * The mixin runs through our spacing values, given in the first argument, then
23+ * creates another list of the mappings of those spacing values, which it then
24+ * feeds to the `margin` property.
25+ */
26+
27+ @mixin margin ($values , $important : null) {
28+ $valueList : ();
29+
30+ @for $i from 1 through length ($values ) {
31+ $value : map-get ($spacing-values , nth ($values , $i ));
32+ $valueList : append ($valueList , $value , space );
33+ }
34+
35+ margin : $valueList $important ;
1836}
1937
2038@mixin margin-bottom ($value , $important : null) {
Original file line number Diff line number Diff line change 99/* *
1010 * Example usage:
1111 * `@include padding(default);`
12+ * `@include padding(default large);`
13+ * `@include padding(default large x-large xx-small);`
14+ * `@include padding(x-large small, !important);`
1215 * `@include padding-left(large);`
1316 * `@include padding-bottom(xx-large, !important);`
1417 */
1518
16- @mixin padding ($value , $important : null) {
17- padding : map-get ($spacing-values , $value ) $important ;
19+ /* *
20+ * This mixin allows us to use shorthand values for the `padding` property.
21+ *
22+ * The mixin runs through our spacing values, given in the first argument, then
23+ * creates another list of the mappings of those spacing values, which it then
24+ * feeds to the `padding` property.
25+ */
26+
27+ @mixin padding ($values , $important : null) {
28+ $valueList : ();
29+
30+ @for $i from 1 through length ($values ) {
31+ $value : map-get ($spacing-values , nth ($values , $i ));
32+ $valueList : append ($valueList , $value , space );
33+ }
34+
35+ padding : $valueList $important ;
1836}
1937
2038@mixin padding-bottom ($value , $important : null) {
You can’t perform that action at this time.
0 commit comments