flake-scss 0.1.6 → 0.1.7

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4bd31f73a6cb717b121b3d51f0577b60a74bff2e
4
- data.tar.gz: 3137543fcc53e8674173a95cc700397765c62276
3
+ metadata.gz: 9d7aec877e2aff2966a6f35035b3b01cde42cd63
4
+ data.tar.gz: 7e7075e81448619b9906ea2d1ed18d327fe3ce67
5
5
  SHA512:
6
- metadata.gz: 1df05cacb38fac68a6203ce3100c62d922ffa64ae3170170a8eea9c8fe1f01d68a18c67ba5776f59e7870942cfa8526fd7958575ebdc4389c87b24fa467a2607
7
- data.tar.gz: 3e8d924f2c6fa8e7ec7bf023155adf9f19f544410b5e8ae1fc3937c8864191db170980130ddfc89e1285f53a614cb91f64f174ae173582329c833c821a3dcc50
6
+ metadata.gz: 1d9eb92d72e658dd0268ef87d81cc5e0b30e08a37497a5911a0b76724938f7a0fcb931ccf51cf89bbae5ee9214890de4f193a3ed5e39b26e44c86e7d542832ec
7
+ data.tar.gz: 76a6358677b6e642a7f5aa539b29bbdff26da842924bd4edf3c97c75e1e8938d1dd5a2b89f9d7d7332b5b12f2dcd8f3b975de0b4bd776ea5d66c6e84301feb6f
@@ -1,5 +1,5 @@
1
1
  module Flake
2
2
  module Scss
3
- VERSION = "0.1.6"
3
+ VERSION = "0.1.7"
4
4
  end
5
5
  end
@@ -1,8 +1,8 @@
1
1
  @import "variables";
2
2
 
3
- @import "helpers/functions",
4
- "helpers/breakpoints",
5
- "helpers/mixins";
3
+ @import "flake/functions",
4
+ "flake/breakpoints",
5
+ "flake/mixins";
6
6
 
7
7
  @import "background/colors";
8
8
 
@@ -1,36 +1,65 @@
1
- @import "../helpers/colors-list";
1
+ @import "../flake/colors-list";
2
2
 
3
3
  $bg-hover: true !default;
4
4
  $bg-responsive: true !default;
5
5
 
6
- @each $color in $colors {
7
- $medium: map-get($colors-list, $color);
8
-
9
- @each $shade, $value in $medium {
6
+ @if $theme-colors != () {
7
+ @each $color, $value in $theme-colors {
10
8
  $hover: "";
11
9
 
12
10
  @if $bg-hover {
13
- $hover: ", .hover\\:bg-#{"" + $color}-#{"" + $shade}:hover";
11
+ $hover: ", .hover\\:bg-#{"" + $color}:hover";
14
12
  }
15
13
 
16
- .bg-#{"" + $color}-#{"" + $shade}
14
+ .bg-#{"" + $color}
17
15
  #{$hover} {
18
- background-color: $value;
16
+ background-color: #{$value};
19
17
  }
20
18
 
21
- $addme: add-to-apply-map(bg-#{"" + $color}-#{"" + $shade}, "background-color", "#{$value}");
19
+ $addme: add-to-apply-map(bg-#{"" + $color}, "background-color", "#{$value}");
20
+ }
21
+ }
22
+
23
+ @if $full-colors {
24
+ @each $color in $colors {
25
+ $medium: map-get($colors-list, $color);
26
+
27
+ @each $shade, $value in $medium {
28
+ $hover: "";
29
+
30
+ @if $bg-hover {
31
+ $hover: ", .hover\\:bg-#{"" + $color}-#{"" + $shade}:hover";
32
+ }
33
+
34
+ .bg-#{"" + $color}-#{"" + $shade}
35
+ #{$hover} {
36
+ background-color: $value;
37
+ }
38
+
39
+ $addme: add-to-apply-map(bg-#{"" + $color}-#{"" + $shade}, "background-color", "#{$value}");
40
+ }
22
41
  }
23
42
  }
24
43
 
25
44
  @if $bg-responsive {
26
45
  @each $breakpoint, $breakpoint-value in $breakpoints {
27
46
  @include breakpoint($breakpoint) {
28
- @each $color in $colors {
29
- $medium: map-get($colors-list, $color);
47
+ @if $theme-colors != () {
48
+ @each $color, $value in $theme-colors {
49
+ .#{$breakpoint}\:bg-#{"" + $color} {
50
+ background-color: #{$value};
51
+ }
52
+ }
53
+ }
54
+
55
+ @if $full-colors {
56
+ @each $color in $colors {
57
+ $medium: map-get($colors-list, $color);
30
58
 
31
- @each $shade, $value in $medium {
32
- .#{$breakpoint}\:bg-#{"" + $color}-#{"" + $shade} {
33
- background-color: $value;
59
+ @each $shade, $value in $medium {
60
+ .#{$breakpoint}\:bg-#{"" + $color}-#{"" + $shade} {
61
+ background-color: $value;
62
+ }
34
63
  }
35
64
  }
36
65
  }
@@ -1,34 +1,64 @@
1
- @import "../helpers/colors-list";
1
+ @import "../flake/colors-list";
2
2
 
3
3
  $border-color-hover: true !default;
4
4
  $border-color-responsive: false !default;
5
5
 
6
- @each $color in $colors {
7
- $medium: map-get($colors-list, $color);
8
-
9
- @each $shade, $value in $medium {
6
+ @if $theme-colors != () {
7
+ @each $color, $value in $theme-colors {
10
8
  $hover: "";
11
9
 
12
10
  @if $border-color-hover {
13
- $hover: ", .hover\\:b-#{"" + $color}-#{"" + $shade}:hover";
11
+ $hover: ", .hover\\:b-#{"" + $color}:hover";
14
12
  }
15
13
 
16
- .b-#{"" + $color}-#{"" + $shade}
14
+ .b-#{"" + $color}
17
15
  #{$hover} {
18
- border-color: $value;
16
+ border-color: #{$value};
19
17
  }
20
18
 
21
- $addme: add-to-apply-map(b-#{"" + $color}-#{"" + $shade}, "border-color", "#{$value}");
19
+ $addme: add-to-apply-map(b-#{"" + $color}, "border-color", "#{$value}");
20
+ }
21
+ }
22
+
23
+ @if $full-colors {
24
+ @each $color in $colors {
25
+ $medium: map-get($colors-list, $color);
26
+
27
+ @each $shade, $value in $medium {
28
+ $hover: "";
29
+
30
+ @if $border-color-hover {
31
+ $hover: ", .hover\\:b-#{"" + $color}-#{"" + $shade}:hover";
32
+ }
33
+
34
+ .b-#{"" + $color}-#{"" + $shade}
35
+ #{$hover} {
36
+ border-color: $value;
37
+ }
38
+
39
+ $addme: add-to-apply-map(b-#{"" + $color}-#{"" + $shade}, "border-color", "#{$value}");
40
+ }
22
41
  }
23
42
  }
24
43
 
44
+
25
45
  @if $border-color-responsive {
26
46
  @each $breakpoint, $breakpoint-value in $breakpoints {
27
47
  @include breakpoint($breakpoint) {
28
- @each $color in $colors {
29
- @each $shade, $value in $medium {
30
- .#{$breakpoint}\:bg-#{"" + $color}-#{"" + $shade} {
31
- border-color: $value;
48
+ @if $theme-colors != () {
49
+ @each $color, $value in $theme-colors {
50
+ .#{$breakpoint}\:b-#{"" + $color} {
51
+ border-color: #{$value};
52
+ }
53
+ }
54
+ }
55
+
56
+ @if $full-colors {
57
+ @each $color in $colors {
58
+ @each $shade, $value in $medium {
59
+ .#{$breakpoint}\:bg-#{"" + $color}-#{"" + $shade} {
60
+ border-color: $value;
61
+ }
32
62
  }
33
63
  }
34
64
  }
@@ -1,6 +1,9 @@
1
1
  // scss-lint:disable ColorKeyword
2
2
  // scss-lint:disable ColorVariable
3
3
 
4
+ $theme-colors: () !default;
5
+ $full-colors: true !default;
6
+
4
7
  $colors: () !default;
5
8
  @if $colors == () {
6
9
  $colors: (
@@ -13,3 +13,11 @@
13
13
 
14
14
  @return $to-add-to-map;
15
15
  }
16
+
17
+ @function color($color, $shade) {
18
+ @return map-get(map-get($colors-list, $color), $shade);
19
+ }
20
+
21
+ @function spacing($space) {
22
+ @return map-get($spacing, $space);
23
+ }
@@ -1,22 +1,41 @@
1
- @import "../helpers/colors-list";
1
+ @import "../flake/colors-list";
2
2
 
3
3
  $text-colors-hover: true !default;
4
4
 
5
- @each $color in $colors {
6
- $medium: map-get($colors-list, $color);
7
-
8
- @each $shade, $value in $medium {
5
+ @if $theme-colors != () {
6
+ @each $color, $value in $theme-colors {
9
7
  $hover: "";
10
8
 
11
9
  @if $text-colors-hover {
12
- $hover: ", .hover\\:text-#{"" + $color}-#{"" + $shade}:hover";
10
+ $hover: ", .hover\\:text-#{"" + $color}:hover";
13
11
  }
14
12
 
15
- .text-#{"" + $color}-#{"" + $shade}
13
+ .text-#{"" + $color}
16
14
  #{$hover} {
17
- color: $value;
15
+ color: #{$value};
18
16
  }
19
17
 
20
- $addme: add-to-apply-map(text-#{"" + $color}-#{"" + $shade}, "color", "#{$value}");
18
+ $addme: add-to-apply-map(text-#{"" + $color}, "color", "#{$value}");
19
+ }
20
+ }
21
+
22
+ @if $full-colors {
23
+ @each $color in $colors {
24
+ $medium: map-get($colors-list, $color);
25
+
26
+ @each $shade, $value in $medium {
27
+ $hover: "";
28
+
29
+ @if $text-colors-hover {
30
+ $hover: ", .hover\\:text-#{"" + $color}-#{"" + $shade}:hover";
31
+ }
32
+
33
+ .text-#{"" + $color}-#{"" + $shade}
34
+ #{$hover} {
35
+ color: $value;
36
+ }
37
+
38
+ $addme: add-to-apply-map(text-#{"" + $color}-#{"" + $shade}, "color", "#{$value}");
39
+ }
21
40
  }
22
41
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flake-scss
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mitcheljager
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-11-16 00:00:00.000000000 Z
11
+ date: 2017-11-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -62,14 +62,14 @@ files:
62
62
  - vendor/assets/stylesheets/border/_colors.scss
63
63
  - vendor/assets/stylesheets/border/_general.scss
64
64
  - vendor/assets/stylesheets/border/_radius.scss
65
+ - vendor/assets/stylesheets/flake/_breakpoints.scss
66
+ - vendor/assets/stylesheets/flake/_colors-list.scss
67
+ - vendor/assets/stylesheets/flake/_functions.scss
68
+ - vendor/assets/stylesheets/flake/_mixins.scss
65
69
  - vendor/assets/stylesheets/general/_display.scss
66
70
  - vendor/assets/stylesheets/general/_general.scss
67
71
  - vendor/assets/stylesheets/general/_position.scss
68
72
  - vendor/assets/stylesheets/general/_z-index.scss
69
- - vendor/assets/stylesheets/helpers/_breakpoints.scss
70
- - vendor/assets/stylesheets/helpers/_colors-list.scss
71
- - vendor/assets/stylesheets/helpers/_functions.scss
72
- - vendor/assets/stylesheets/helpers/_mixins.scss
73
73
  - vendor/assets/stylesheets/layout/_flex.scss
74
74
  - vendor/assets/stylesheets/shadows/_shadows.scss
75
75
  - vendor/assets/stylesheets/sizing/_grid.scss