flake-scss 0.1.8 → 0.1.9

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.
@@ -1,30 +1,29 @@
1
1
  $positions-responsive: true !default;
2
2
 
3
- $positions: () !default;
4
- @if $positions == () {
5
- $positions: (
6
- fixed,
7
- relative,
8
- absolute,
9
- static,
10
- sticky
11
- );
12
- }
3
+ $positions: (
4
+ fixed,
5
+ relative,
6
+ absolute,
7
+ static,
8
+ sticky
9
+ ) !default;
10
+
11
+ @if index($components, position) {
12
+ @each $position in $positions {
13
+ .#{$position} {
14
+ position: $position;
15
+ }
13
16
 
14
- @each $position in $positions {
15
- .#{$position} {
16
- position: $position;
17
+ $addme: add-to-apply-map(#{$position}, "position", "#{$position}");
17
18
  }
18
19
 
19
- $addme: add-to-apply-map(#{$position}, "position", "#{$position}");
20
- }
21
-
22
- @if $positions-responsive {
23
- @each $breakpoint, $breakpoint-value in $breakpoints {
24
- @include breakpoint($breakpoint) {
25
- @each $position in $positions {
26
- .#{$breakpoint}\:#{$position} {
27
- position: $position;
20
+ @if $positions-responsive {
21
+ @each $breakpoint, $breakpoint-value in $breakpoints {
22
+ @include breakpoint($breakpoint) {
23
+ @each $position in $positions {
24
+ .#{$breakpoint}\:#{$position} {
25
+ position: $position;
26
+ }
28
27
  }
29
28
  }
30
29
  }
@@ -33,30 +32,29 @@ $positions: () !default;
33
32
 
34
33
  $pins-responsive: true !default;
35
34
 
36
- $pins: () !default;
37
- @if $pins == () {
38
- $pins: (
39
- t: "top",
40
- r: "right",
41
- b: "bottom",
42
- l: "left"
43
- );
44
- }
35
+ $pins: (
36
+ t: "top",
37
+ r: "right",
38
+ b: "bottom",
39
+ l: "left"
40
+ ) !default;
41
+
42
+ @if index($components, position) {
43
+ @each $pin, $value in $pins {
44
+ .pin-#{$pin} {
45
+ #{$value}: 0;
46
+ }
45
47
 
46
- @each $pin, $value in $pins {
47
- .pin-#{$pin} {
48
- #{$value}: 0;
48
+ $addme: add-to-apply-map(pin-#{$pin}, "#{$value}", "0");
49
49
  }
50
50
 
51
- $addme: add-to-apply-map(pin-#{$pin}, "#{$value}", "0");
52
- }
53
-
54
- @if $pins-responsive {
55
- @each $breakpoint, $breakpoint-value in $breakpoints {
56
- @include breakpoint($breakpoint) {
57
- @each $pin, $value in $pins {
58
- .#{$breakpoint}\:pin-#{$pin} {
59
- #{$value}: 0;
51
+ @if $pins-responsive {
52
+ @each $breakpoint, $breakpoint-value in $breakpoints {
53
+ @include breakpoint($breakpoint) {
54
+ @each $pin, $value in $pins {
55
+ .#{$breakpoint}\:pin-#{$pin} {
56
+ #{$value}: 0;
57
+ }
60
58
  }
61
59
  }
62
60
  }
@@ -1,20 +1,19 @@
1
- $z-index: () !default;
2
- @if $z-index == () {
3
- $z-index: (
4
- -1,
5
- 0,
6
- 1,
7
- 2,
8
- 3,
9
- 4,
10
- 5
11
- );
12
- }
1
+ $z-index: (
2
+ -1,
3
+ 0,
4
+ 1,
5
+ 2,
6
+ 3,
7
+ 4,
8
+ 5
9
+ ) !default;
13
10
 
14
- @each $value in $z-index {
15
- .z-#{$value} {
16
- z-index: $value;
17
- }
11
+ @if index($components, z-index) {
12
+ @each $value in $z-index {
13
+ .z-#{$value} {
14
+ z-index: $value;
15
+ }
18
16
 
19
- $addme: add-to-apply-map(z-#{$value}, "z-index", "#{$value}");
17
+ $addme: add-to-apply-map(z-#{$value}, "z-index", "#{$value}");
18
+ }
20
19
  }
@@ -1,15 +1,12 @@
1
1
  $flex-responsive: true !default;
2
2
 
3
- $flex: () !default;
4
- @if $flex == () {
5
- $flex: (
6
- flex-direction,
7
- flex-wrap,
8
- align-items,
9
- align-self,
10
- justify-content
11
- );
12
- }
3
+ $flex: (
4
+ flex-direction,
5
+ flex-wrap,
6
+ align-items,
7
+ align-self,
8
+ justify-content
9
+ ) !default;
13
10
 
14
11
  $flex-list: (
15
12
  "flex-direction": (
@@ -58,43 +55,45 @@ $flex-list: (
58
55
  )
59
56
  );
60
57
 
61
- @each $property in $flex {
62
- $medium: map-get($flex-list, $property);
63
- $classstart: "";
58
+ @if index($components, flex) {
59
+ @each $property in $flex {
60
+ $medium: map-get($flex-list, $property);
61
+ $classstart: "";
64
62
 
65
- @each $name, $value in $medium {
66
- @if $name == "class" {
67
- $classstart: #{$value};
68
- }
63
+ @each $name, $value in $medium {
64
+ @if $name == "class" {
65
+ $classstart: #{$value};
66
+ }
69
67
 
70
- @if $name == "values" {
71
- @each $value-name, $value-value in $value {
72
- .#{$classstart}-#{$value-name} {
73
- #{$property}: #{$value-value};
74
- }
68
+ @if $name == "values" {
69
+ @each $value-name, $value-value in $value {
70
+ .#{$classstart}-#{$value-name} {
71
+ #{$property}: #{$value-value};
72
+ }
75
73
 
76
- $addme: add-to-apply-map(#{$classstart}-#{$value-name}, "#{$property}", "#{$value-value}");
74
+ $addme: add-to-apply-map(#{$classstart}-#{$value-name}, "#{$property}", "#{$value-value}");
75
+ }
77
76
  }
78
77
  }
79
78
  }
80
- }
81
79
 
82
- @if $flex-responsive {
83
- @each $breakpoint, $breakpoint-value in $breakpoints {
84
- @include breakpoint($breakpoint) {
85
- @each $property in $flex {
86
- $medium: map-get($flex-list, $property);
87
- $classstart: "";
80
+ @if $flex-responsive {
81
+ @each $breakpoint, $breakpoint-value in $breakpoints {
82
+ @include breakpoint($breakpoint) {
83
+ @each $property in $flex {
84
+ $medium: map-get($flex-list, $property);
85
+ $classstart: "";
88
86
 
89
- @each $name, $value in $medium {
90
- @if $name == "class" {
91
- $classstart: #{$value};
92
- }
87
+ @each $name, $value in $medium {
88
+ @if $name == "class" {
89
+ $classstart: #{$value};
90
+ }
93
91
 
94
- @if $name == "values" {
95
- @each $value-name, $value-value in $value {
96
- .#{$breakpoint}\:#{$classstart}-#{$value-name} {
97
- #{$property}: #{$value-value};
92
+ @if $name == "values" {
93
+ @each $value-name, $value-value in $value {
94
+ .#{$breakpoint}\:#{$classstart}-#{$value-name} {
95
+ #{$property}: #{$value-value};
96
+ }
98
97
  }
99
98
  }
100
99
  }
@@ -1,39 +1,38 @@
1
1
  $shadows-hover: true !default;
2
2
  $shadows-responsive: true !default;
3
3
 
4
- $shadows: () !default;
5
- @if $shadows == () {
6
- $shadows: (
7
- 0: "none",
8
- 1: "0 1px 3px #{rgba(map-get(map-get($colors-list, gray), 900), .05)}, 0 1px 2px #{rgba(map-get(map-get($colors-list, gray), 900), .11)}",
9
- 2: "0 3px 6px #{rgba(map-get(map-get($colors-list, gray), 900), .07)}, 0 3px 6px #{rgba(map-get(map-get($colors-list, gray), 900), .10)}",
10
- 3: "0 10px 20px #{rgba(map-get(map-get($colors-list, gray), 900), .15)}, 0 6px 6px #{rgba(map-get(map-get($colors-list, gray), 900), .10)}",
11
- 4: "0 14px 28px #{rgba(map-get(map-get($colors-list, gray), 900), .12)}, 0 10px 10px #{rgba(map-get(map-get($colors-list, gray), 900), .09)}",
12
- 5: "0 19px 38px #{rgba(map-get(map-get($colors-list, gray), 900), .17)}, 0 15px 12px #{rgba(map-get(map-get($colors-list, gray), 900), .09)}"
13
- );
14
- }
4
+ $shadows: (
5
+ 0: "none",
6
+ 1: "0 1px 3px #{rgba(map-get(map-get($colors-list, gray), 900), .05)}, 0 1px 2px #{rgba(map-get(map-get($colors-list, gray), 900), .11)}",
7
+ 2: "0 3px 6px #{rgba(map-get(map-get($colors-list, gray), 900), .07)}, 0 3px 6px #{rgba(map-get(map-get($colors-list, gray), 900), .10)}",
8
+ 3: "0 10px 20px #{rgba(map-get(map-get($colors-list, gray), 900), .15)}, 0 6px 6px #{rgba(map-get(map-get($colors-list, gray), 900), .10)}",
9
+ 4: "0 14px 28px #{rgba(map-get(map-get($colors-list, gray), 900), .12)}, 0 10px 10px #{rgba(map-get(map-get($colors-list, gray), 900), .09)}",
10
+ 5: "0 19px 38px #{rgba(map-get(map-get($colors-list, gray), 900), .17)}, 0 15px 12px #{rgba(map-get(map-get($colors-list, gray), 900), .09)}"
11
+ ) !default;
15
12
 
16
- @each $shadow, $value in $shadows {
17
- $hover: "";
13
+ @if index($components, shadows) {
14
+ @each $shadow, $value in $shadows {
15
+ $hover: "";
18
16
 
19
- @if $shadows-hover {
20
- $hover: ", .hover\\:shadow-#{$shadow}:hover";
21
- }
17
+ @if $shadows-hover {
18
+ $hover: ", .hover\\:shadow-#{$shadow}:hover";
19
+ }
22
20
 
23
- .shadow-#{$shadow}
24
- #{$hover} {
25
- box-shadow: #{$value};
26
- }
21
+ .shadow-#{$shadow}
22
+ #{$hover} {
23
+ box-shadow: #{$value};
24
+ }
27
25
 
28
- $addme: add-to-apply-map(shadow-#{$shadow}, "box-shadow", "#{$value}");
29
- }
26
+ $addme: add-to-apply-map(shadow-#{$shadow}, "box-shadow", "#{$value}");
27
+ }
30
28
 
31
- @if $shadows-responsive {
32
- @each $breakpoint, $breakpoint-value in $breakpoints {
33
- @include breakpoint($breakpoint) {
34
- @each $shadow, $value in $shadows {
35
- .#{$breakpoint}\:shadow-#{$shadow} {
36
- box-shadow: #{$value};
29
+ @if $shadows-responsive {
30
+ @each $breakpoint, $breakpoint-value in $breakpoints {
31
+ @include breakpoint($breakpoint) {
32
+ @each $shadow, $value in $shadows {
33
+ .#{$breakpoint}\:shadow-#{$shadow} {
34
+ box-shadow: #{$value};
35
+ }
37
36
  }
38
37
  }
39
38
  }
@@ -1,7 +1,3 @@
1
- $grid-size: 12 !default;
2
- $grid-full: true !default;
3
- $grid-single: false !default;
4
-
5
1
  @mixin widthify($divide: 0, $division: 0, $breakpoint: 0) {
6
2
  $bp: "";
7
3
  @if $breakpoint != 0 {
@@ -17,64 +13,70 @@ $grid-single: false !default;
17
13
  }
18
14
  }
19
15
 
20
- // No Breakpoints
21
- @if $grid-single {
22
- @for $i from 1 through $grid-size {
23
- .w-#{$i} {
24
- width: (100% / $grid-size) * $i;
25
- }
16
+ $grid-size: 12 !default;
17
+ $grid-full: true !default;
18
+ $grid-single: false !default;
26
19
 
27
- $addme: add-to-apply-map("w-#{$i}", "width", "#{(100% / $grid-size) * $i}");
28
- }
29
- } @else {
30
- @for $i from 1 through $grid-size {
31
- @if $grid-full {
32
- @for $j from 1 through $i {
33
- @include widthify($i, $j);
20
+ @if index($components, grid) {
21
+ // No Breakpoints
22
+ @if $grid-single {
23
+ @for $i from 1 through $grid-size {
24
+ .w-#{$i} {
25
+ width: (100% / $grid-size) * $i;
26
+ }
27
+
28
+ $addme: add-to-apply-map("w-#{$i}", "width", "#{(100% / $grid-size) * $i}");
29
+ }
30
+ } @else {
31
+ @for $i from 1 through $grid-size {
32
+ @if $grid-full {
33
+ @for $j from 1 through $i {
34
+ @include widthify($i, $j);
35
+ }
36
+ } @else {
37
+ @include widthify($i, 1);
34
38
  }
35
- } @else {
36
- @include widthify($i, 1);
37
39
  }
38
40
  }
39
- }
40
41
 
41
- // Breakpoints
42
- @if $grid-single {
43
- @each $breakpoint, $breakpoint-value in $breakpoints {
44
- @include breakpoint($breakpoint) {
45
- @for $i from 1 through $grid-size {
46
- .#{$breakpoint}\:w-#{$i} {
47
- width: (100% / $grid-size) * $i;
42
+ // Breakpoints
43
+ @if $grid-single {
44
+ @each $breakpoint, $breakpoint-value in $breakpoints {
45
+ @include breakpoint($breakpoint) {
46
+ @for $i from 1 through $grid-size {
47
+ .#{$breakpoint}\:w-#{$i} {
48
+ width: (100% / $grid-size) * $i;
49
+ }
48
50
  }
49
51
  }
50
52
  }
51
- }
52
- } @else {
53
- @each $breakpoint, $breakpoint-value in $breakpoints {
54
- @include breakpoint($breakpoint) {
55
- @for $i from 1 through $grid-size {
56
- @if $grid-full {
57
- @for $j from 1 through $i {
58
- @include widthify($i, $j, $breakpoint);
53
+ } @else {
54
+ @each $breakpoint, $breakpoint-value in $breakpoints {
55
+ @include breakpoint($breakpoint) {
56
+ @for $i from 1 through $grid-size {
57
+ @if $grid-full {
58
+ @for $j from 1 through $i {
59
+ @include widthify($i, $j, $breakpoint);
60
+ }
61
+ } @else {
62
+ @include widthify($i, 1, $breakpoint);
59
63
  }
60
- } @else {
61
- @include widthify($i, 1, $breakpoint);
62
64
  }
63
65
  }
64
66
  }
65
67
  }
66
- }
67
68
 
68
- @if map-get($breakpoints, mw) {
69
- .w-max {
70
- max-width: map-get($breakpoints, mw);
69
+ @if map-get($breakpoints, mw) {
70
+ .w-max {
71
+ max-width: map-get($breakpoints, mw);
72
+ }
71
73
  }
72
- }
73
74
 
74
- .h-1\/1 {
75
- height: 100%;
76
- }
75
+ .h-1\/1 {
76
+ height: 100%;
77
+ }
77
78
 
78
- .h-auto {
79
- height: auto;
79
+ .h-auto {
80
+ height: auto;
81
+ }
80
82
  }
@@ -1,17 +1,14 @@
1
1
  $spacing-responsive: true !default;
2
2
 
3
- $spacing: () !default;
4
- @if $spacing == () {
5
- $spacing: (
6
- 0: 0,
7
- 1: .25rem,
8
- 2: .5rem,
9
- 3: 1rem,
10
- 4: 2rem,
11
- 5: 4rem,
12
- auto: auto
13
- );
14
- }
3
+ $spacing: (
4
+ 0: 0,
5
+ 1: .25rem,
6
+ 2: .5rem,
7
+ 3: 1rem,
8
+ 4: 2rem,
9
+ 5: 4rem,
10
+ auto: auto
11
+ ) !default;
15
12
 
16
13
  $spacing-locations: (
17
14
  t: "top",
@@ -25,7 +22,7 @@ $spacing-locations: (
25
22
  left: "left",
26
23
  right: "right"
27
24
  )
28
- );
25
+ ) !default;
29
26
 
30
27
  $types: (
31
28
  m: margin,
@@ -80,47 +77,49 @@ $types: (
80
77
  }
81
78
  }
82
79
 
83
- @each $space, $value in $spacing {
84
- @include paddingmargin($space, $value);
80
+ @if index($components, spacing) {
81
+ @each $space, $value in $spacing {
82
+ @include paddingmargin($space, $value);
85
83
 
86
- @each $location, $location-value in $spacing-locations {
87
- @include paddingmargin($space, $value, 0, $location, $location-value);
84
+ @each $location, $location-value in $spacing-locations {
85
+ @include paddingmargin($space, $value, 0, $location, $location-value);
86
+ }
88
87
  }
89
- }
90
88
 
91
- @if $spacing-responsive {
92
- @each $space, $value in $spacing {
93
- @each $breakpoint, $breakpoint-value in $breakpoints {
94
- @include breakpoint($breakpoint) {
95
- @include paddingmargin($space, $value, $breakpoint);
89
+ @if $spacing-responsive {
90
+ @each $space, $value in $spacing {
91
+ @each $breakpoint, $breakpoint-value in $breakpoints {
92
+ @include breakpoint($breakpoint) {
93
+ @include paddingmargin($space, $value, $breakpoint);
96
94
 
97
- @each $location, $location-value in $spacing-locations {
98
- @include paddingmargin($space, $value, $breakpoint, $location, $location-value);
95
+ @each $location, $location-value in $spacing-locations {
96
+ @include paddingmargin($space, $value, $breakpoint, $location, $location-value);
97
+ }
99
98
  }
100
99
  }
101
100
  }
102
101
  }
103
- }
104
102
 
105
- @each $space, $value in $spacing {
106
- @if type-of($value) == "number" {
107
- .-mx-#{$space} {
108
- margin-left: $value * -1;
109
- margin-right: $value * -1;
110
- }
103
+ @each $space, $value in $spacing {
104
+ @if type-of($value) == "number" {
105
+ .-mx-#{$space} {
106
+ margin-left: $value * -1;
107
+ margin-right: $value * -1;
108
+ }
111
109
 
112
- $addme: add-to-apply-map(-mx-#{$space}, ("margin-left": "", "margin-right": ""), "#{$value * -1}");
110
+ $addme: add-to-apply-map(-mx-#{$space}, ("margin-left": "", "margin-right": ""), "#{$value * -1}");
111
+ }
113
112
  }
114
- }
115
113
 
116
- @if $spacing-responsive {
117
- @each $breakpoint, $breakpoint-value in $breakpoints {
118
- @include breakpoint($breakpoint) {
119
- @each $space, $value in $spacing {
120
- @if type-of($value) == "number" {
121
- .#{$breakpoint}\:-mx-#{$space} {
122
- margin-left: $value * -1;
123
- margin-right: $value * -1;
114
+ @if $spacing-responsive {
115
+ @each $breakpoint, $breakpoint-value in $breakpoints {
116
+ @include breakpoint($breakpoint) {
117
+ @each $space, $value in $spacing {
118
+ @if type-of($value) == "number" {
119
+ .#{$breakpoint}\:-mx-#{$space} {
120
+ margin-left: $value * -1;
121
+ margin-right: $value * -1;
122
+ }
124
123
  }
125
124
  }
126
125
  }
@@ -4,22 +4,24 @@ $align: (
4
4
  left,
5
5
  center,
6
6
  right
7
- );
7
+ ) !default;
8
8
 
9
- @each $value in $align {
10
- .text-#{$value} {
11
- text-align: $value;
12
- }
9
+ @if index($components, text-align) {
10
+ @each $value in $align {
11
+ .text-#{$value} {
12
+ text-align: $value;
13
+ }
13
14
 
14
- $addme: add-to-apply-map(text-#{$value}, "text", "#{$value}");
15
- }
15
+ $addme: add-to-apply-map(text-#{$value}, "text", "#{$value}");
16
+ }
16
17
 
17
- @if $text-align-responsive {
18
- @each $breakpoint, $breakpoint-value in $breakpoints {
19
- @include breakpoint($breakpoint) {
20
- @each $value in $align {
21
- .#{$breakpoint}\:text-#{$value} {
22
- text-align: $value;
18
+ @if $text-align-responsive {
19
+ @each $breakpoint, $breakpoint-value in $breakpoints {
20
+ @include breakpoint($breakpoint) {
21
+ @each $value in $align {
22
+ .#{$breakpoint}\:text-#{$value} {
23
+ text-align: $value;
24
+ }
23
25
  }
24
26
  }
25
27
  }
@@ -1,41 +1,41 @@
1
- @import "../flake/colors-list";
2
-
3
1
  $text-colors-hover: true !default;
4
2
 
5
- @if $theme-colors != () {
6
- @each $color, $value in $theme-colors {
7
- $hover: "";
3
+ @if index($components, text-colors) {
4
+ @if $theme-colors != () {
5
+ @each $color, $value in $theme-colors {
6
+ $hover: "";
8
7
 
9
- @if $text-colors-hover {
10
- $hover: ", .hover\\:text-#{"" + $color}:hover";
11
- }
8
+ @if $text-colors-hover {
9
+ $hover: ", .hover\\:text-#{"" + $color}:hover";
10
+ }
12
11
 
13
- .text-#{"" + $color}
14
- #{$hover} {
15
- color: #{$value};
16
- }
12
+ .text-#{"" + $color}
13
+ #{$hover} {
14
+ color: #{$value};
15
+ }
17
16
 
18
- $addme: add-to-apply-map(text-#{"" + $color}, "color", "#{$value}");
17
+ $addme: add-to-apply-map(text-#{"" + $color}, "color", "#{$value}");
18
+ }
19
19
  }
20
- }
21
20
 
22
- @if $full-colors {
23
- @each $color in $colors {
24
- $medium: map-get($colors-list, $color);
21
+ @if $full-colors {
22
+ @each $color in $colors {
23
+ $medium: map-get($colors-list, $color);
25
24
 
26
- @each $shade, $value in $medium {
27
- $hover: "";
25
+ @each $shade, $value in $medium {
26
+ $hover: "";
28
27
 
29
- @if $text-colors-hover {
30
- $hover: ", .hover\\:text-#{"" + $color}-#{"" + $shade}:hover";
31
- }
28
+ @if $text-colors-hover {
29
+ $hover: ", .hover\\:text-#{"" + $color}-#{"" + $shade}:hover";
30
+ }
32
31
 
33
- .text-#{"" + $color}-#{"" + $shade}
34
- #{$hover} {
35
- color: $value;
36
- }
32
+ .text-#{"" + $color}-#{"" + $shade}
33
+ #{$hover} {
34
+ color: $value;
35
+ }
37
36
 
38
- $addme: add-to-apply-map(text-#{"" + $color}-#{"" + $shade}, "color", "#{$value}");
37
+ $addme: add-to-apply-map(text-#{"" + $color}-#{"" + $shade}, "color", "#{$value}");
38
+ }
39
39
  }
40
40
  }
41
41
  }