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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0c9cb7e7b2c4d6b8b6299d5e1671407fc57180ae
4
- data.tar.gz: 9a08cfdc193550c995a3fcaa0b5ed6b4a5699ef8
3
+ metadata.gz: a7ea091e2abe62febbead567390875257fe11b9f
4
+ data.tar.gz: d98788bd2b13fe1d84a6008cde922dfacba508f2
5
5
  SHA512:
6
- metadata.gz: da357a7f98b71a940e135ca04b68bb3ba6e44783467cf16b4d2c0d858de9c1309db6df6226fecdb3e4074f2a29df8beb784b576f864edbec7ae4015c3e91ff44
7
- data.tar.gz: 90d9fccccbe46a5a1024548bb1dafa28d645ec71cf51890fefba0c2ae8db04f1f88adc5d958ee8afaa519009a3657470a408fb52e6b852124d9acca3d93b3bd1
6
+ metadata.gz: 332f5b84710b6369b2a58dd403fc79e40a464c0b6207ad072d731cc184019e5a3dfdcea3ff25e4f1501480deb8239db389d6e3a14f40300e4fce5219e429017f
7
+ data.tar.gz: fcfc75d9b8a4894226ff95cd45870fa4edee388d27e26a90b8841120a1903ab91de949f793b00ff0bd2e2227af0bce79d762d9dd23e5e879dab56dcd9fa038b4
@@ -1,5 +1,5 @@
1
1
  module Flake
2
2
  module Scss
3
- VERSION = "0.1.8"
3
+ VERSION = "0.1.9"
4
4
  end
5
5
  end
@@ -1,29 +1,34 @@
1
1
  @import "variables";
2
2
 
3
- @import "flake/functions",
3
+ @import "flake/colors-list",
4
+ "flake/functions",
4
5
  "flake/breakpoints",
5
6
  "flake/mixins";
6
7
 
7
- @import "background/colors";
8
+ :root {
9
+ @import "background/colors";
8
10
 
9
- @import "border/general",
10
- "border/colors",
11
- "border/radius";
11
+ @import "border/general",
12
+ "border/colors",
13
+ "border/radius";
12
14
 
13
- @import "text/colors",
14
- "text/fonts",
15
- "text/style",
16
- "text/align",
17
- "text/sizes";
15
+ @import "text/colors",
16
+ "text/fonts",
17
+ "text/style",
18
+ "text/align",
19
+ "text/sizes";
18
20
 
19
- @import "sizing/spacing",
20
- "sizing/grid";
21
+ @import "sizing/spacing",
22
+ "sizing/grid";
21
23
 
22
- @import "layout/flex";
24
+ @import "layout/flex";
23
25
 
24
- @import "shadows/shadows";
26
+ @import "shadows/shadows";
25
27
 
26
- @import "general/display",
27
- "general/position",
28
- "general/general",
29
- "general/z-index";
28
+ @import "general/display",
29
+ "general/position",
30
+ "general/general",
31
+ "general/z-index";
32
+
33
+ @import "animations/transitions";
34
+ }
@@ -1 +1,23 @@
1
1
  $apply-classes: () !global;
2
+
3
+ $components: (
4
+ transition,
5
+ background-colors,
6
+ border-colors,
7
+ borders,
8
+ border-radius,
9
+ display,
10
+ position,
11
+ z-index,
12
+ flex,
13
+ shadows,
14
+ grid,
15
+ spacing,
16
+ text-align,
17
+ text-colors,
18
+ fonts,
19
+ font-sizes,
20
+ font-style,
21
+ font-weights,
22
+ text-decoration
23
+ ) !default;
@@ -0,0 +1,37 @@
1
+ $transitions-responsive: false !default;
2
+
3
+ $transitions: (
4
+ none: "none",
5
+ "": ".15s",
6
+ slow: ".5s"
7
+ ) !default;
8
+
9
+ @each $transition, $value in $transitions {
10
+ $sep: "";
11
+ @if $transition != "" {
12
+ $sep: "-"
13
+ }
14
+
15
+ .transition#{$sep}#{$transition} {
16
+ transition: #{$value};
17
+ }
18
+
19
+ $addme: add-to-apply-map(transition-#{$transition}, "transition", "#{$value}");
20
+ }
21
+
22
+ @if $transitions-responsive {
23
+ @each $breakpoint, $breakpoint-value in $breakpoints {
24
+ @include breakpoint($breakpoint) {
25
+ @each $transition, $value in $transitions {
26
+ $sep: "";
27
+ @if $transition != "" {
28
+ $sep: "-";
29
+ }
30
+
31
+ .#{$breakpoint}\:transition#{$sep}#{$transition} {
32
+ transition: #{$value};
33
+ }
34
+ }
35
+ }
36
+ }
37
+ }
@@ -1,64 +1,64 @@
1
- @import "../flake/colors-list";
2
-
3
1
  $bg-hover: true !default;
4
2
  $bg-responsive: true !default;
5
3
 
6
- @if $theme-colors != () {
7
- @each $color, $value in $theme-colors {
8
- $hover: "";
4
+ @if index($components, background-colors) {
5
+ @if $theme-colors != () {
6
+ @each $color, $value in $theme-colors {
7
+ $hover: "";
9
8
 
10
- @if $bg-hover {
11
- $hover: ", .hover\\:bg-#{"" + $color}:hover";
12
- }
9
+ @if $bg-hover {
10
+ $hover: ", .hover\\:bg-#{"" + $color}:hover";
11
+ }
13
12
 
14
- .bg-#{"" + $color}
15
- #{$hover} {
16
- background-color: #{$value};
17
- }
13
+ .bg-#{"" + $color}
14
+ #{$hover} {
15
+ background-color: #{$value};
16
+ }
18
17
 
19
- $addme: add-to-apply-map(bg-#{"" + $color}, "background-color", "#{$value}");
18
+ $addme: add-to-apply-map(bg-#{"" + $color}, "background-color", "#{$value}");
19
+ }
20
20
  }
21
- }
22
21
 
23
- @if $full-colors {
24
- @each $color in $colors {
25
- $medium: map-get($colors-list, $color);
22
+ @if $full-colors {
23
+ @each $color in $colors {
24
+ $medium: map-get($colors-list, $color);
26
25
 
27
- @each $shade, $value in $medium {
28
- $hover: "";
26
+ @each $shade, $value in $medium {
27
+ $hover: "";
29
28
 
30
- @if $bg-hover {
31
- $hover: ", .hover\\:bg-#{"" + $color}-#{"" + $shade}:hover";
32
- }
29
+ @if $bg-hover {
30
+ $hover: ", .hover\\:bg-#{"" + $color}-#{"" + $shade}:hover";
31
+ }
33
32
 
34
- .bg-#{"" + $color}-#{"" + $shade}
35
- #{$hover} {
36
- background-color: $value;
37
- }
33
+ .bg-#{"" + $color}-#{"" + $shade}
34
+ #{$hover} {
35
+ background-color: $value;
36
+ }
38
37
 
39
- $addme: add-to-apply-map(bg-#{"" + $color}-#{"" + $shade}, "background-color", "#{$value}");
38
+ $addme: add-to-apply-map(bg-#{"" + $color}-#{"" + $shade}, "background-color", "#{$value}");
39
+ }
40
40
  }
41
41
  }
42
- }
43
42
 
44
- @if $bg-responsive {
45
- @each $breakpoint, $breakpoint-value in $breakpoints {
46
- @include breakpoint($breakpoint) {
47
- @if $theme-colors != () {
48
- @each $color, $value in $theme-colors {
49
- .#{$breakpoint}\:bg-#{"" + $color} {
50
- background-color: #{$value};
43
+ @if $bg-responsive {
44
+ @each $breakpoint, $breakpoint-value in $breakpoints {
45
+ @include breakpoint($breakpoint) {
46
+ @if $theme-colors != () {
47
+ @each $color, $value in $theme-colors {
48
+ .#{$breakpoint}\:bg-#{"" + $color} {
49
+ background-color: #{$value};
50
+ }
51
51
  }
52
52
  }
53
- }
54
53
 
55
- @if $full-colors {
56
- @each $color in $colors {
57
- $medium: map-get($colors-list, $color);
54
+ @if $full-colors {
55
+ @each $color in $colors {
56
+ $medium: map-get($colors-list, $color);
58
57
 
59
- @each $shade, $value in $medium {
60
- .#{$breakpoint}\:bg-#{"" + $color}-#{"" + $shade} {
61
- background-color: $value;
58
+ @each $shade, $value in $medium {
59
+ .#{$breakpoint}\:bg-#{"" + $color}-#{"" + $shade} {
60
+ background-color: $value;
61
+ }
62
62
  }
63
63
  }
64
64
  }
@@ -1,63 +1,63 @@
1
- @import "../flake/colors-list";
2
-
3
1
  $border-color-hover: true !default;
4
2
  $border-color-responsive: false !default;
5
3
 
6
- @if $theme-colors != () {
7
- @each $color, $value in $theme-colors {
8
- $hover: "";
4
+ @if index($components, border-colors) {
5
+ @if $theme-colors != () {
6
+ @each $color, $value in $theme-colors {
7
+ $hover: "";
9
8
 
10
- @if $border-color-hover {
11
- $hover: ", .hover\\:b-#{"" + $color}:hover";
12
- }
9
+ @if $border-color-hover {
10
+ $hover: ", .hover\\:b-#{"" + $color}:hover";
11
+ }
13
12
 
14
- .b-#{"" + $color}
15
- #{$hover} {
16
- border-color: #{$value};
17
- }
13
+ .b-#{"" + $color}
14
+ #{$hover} {
15
+ border-color: #{$value};
16
+ }
18
17
 
19
- $addme: add-to-apply-map(b-#{"" + $color}, "border-color", "#{$value}");
18
+ $addme: add-to-apply-map(b-#{"" + $color}, "border-color", "#{$value}");
19
+ }
20
20
  }
21
- }
22
21
 
23
- @if $full-colors {
24
- @each $color in $colors {
25
- $medium: map-get($colors-list, $color);
22
+ @if $full-colors {
23
+ @each $color in $colors {
24
+ $medium: map-get($colors-list, $color);
26
25
 
27
- @each $shade, $value in $medium {
28
- $hover: "";
26
+ @each $shade, $value in $medium {
27
+ $hover: "";
29
28
 
30
- @if $border-color-hover {
31
- $hover: ", .hover\\:b-#{"" + $color}-#{"" + $shade}:hover";
32
- }
29
+ @if $border-color-hover {
30
+ $hover: ", .hover\\:b-#{"" + $color}-#{"" + $shade}:hover";
31
+ }
33
32
 
34
- .b-#{"" + $color}-#{"" + $shade}
35
- #{$hover} {
36
- border-color: $value;
37
- }
33
+ .b-#{"" + $color}-#{"" + $shade}
34
+ #{$hover} {
35
+ border-color: $value;
36
+ }
38
37
 
39
- $addme: add-to-apply-map(b-#{"" + $color}-#{"" + $shade}, "border-color", "#{$value}");
38
+ $addme: add-to-apply-map(b-#{"" + $color}-#{"" + $shade}, "border-color", "#{$value}");
39
+ }
40
40
  }
41
41
  }
42
- }
43
42
 
44
43
 
45
- @if $border-color-responsive {
46
- @each $breakpoint, $breakpoint-value in $breakpoints {
47
- @include breakpoint($breakpoint) {
48
- @if $theme-colors != () {
49
- @each $color, $value in $theme-colors {
50
- .#{$breakpoint}\:b-#{"" + $color} {
51
- border-color: #{$value};
44
+ @if $border-color-responsive {
45
+ @each $breakpoint, $breakpoint-value in $breakpoints {
46
+ @include breakpoint($breakpoint) {
47
+ @if $theme-colors != () {
48
+ @each $color, $value in $theme-colors {
49
+ .#{$breakpoint}\:b-#{"" + $color} {
50
+ border-color: #{$value};
51
+ }
52
52
  }
53
53
  }
54
- }
55
54
 
56
- @if $full-colors {
57
- @each $color in $colors {
58
- @each $shade, $value in $medium {
59
- .#{$breakpoint}\:bg-#{"" + $color}-#{"" + $shade} {
60
- border-color: $value;
55
+ @if $full-colors {
56
+ @each $color in $colors {
57
+ @each $shade, $value in $medium {
58
+ .#{$breakpoint}\:bg-#{"" + $color}-#{"" + $shade} {
59
+ border-color: $value;
60
+ }
61
61
  }
62
62
  }
63
63
  }
@@ -1,27 +1,22 @@
1
1
  $border-hover: true !default;
2
2
  $border-responsive: true !default;
3
+ $border-default-color: black;
3
4
 
4
- $borders: () !default;
5
- @if $borders == () {
6
- $borders: (
7
- "": "",
8
- t: "top",
9
- r: "right",
10
- b: "bottom",
11
- l: "left"
12
- );
13
- }
5
+ $borders: (
6
+ "": "",
7
+ t: "top",
8
+ r: "right",
9
+ b: "bottom",
10
+ l: "left"
11
+ ) !default;
14
12
 
15
- $border-sizes: () !default;
16
- @if $border-sizes == () {
17
- $border-sizes: (
18
- 1,
19
- 2,
20
- 3,
21
- 4,
22
- 5
23
- );
24
- }
13
+ $border-sizes: (
14
+ 1,
15
+ 2,
16
+ 3,
17
+ 4,
18
+ 5
19
+ ) !default;
25
20
 
26
21
  @mixin makeBorder($space, $value, $size, $breakpoint: 0) {
27
22
  $bp: "";
@@ -44,23 +39,25 @@ $border-sizes: () !default;
44
39
  }
45
40
 
46
41
  @if $breakpoint == 0 {
47
- $addme: add-to-apply-map(b#{$space}-#{$size}, "border#{$sep}#{$value}", "#{$size}px solid black");
42
+ $addme: add-to-apply-map(b#{$space}-#{$size}, "border#{$sep}#{$value}", "#{$size}px solid #{$border-default-color}");
48
43
  $addme: add-to-apply-map(b#{$space}-0, "border#{$sep}#{$value}", "0");
49
44
  }
50
45
  }
51
46
 
52
- @each $border, $value in $borders {
53
- @each $size in $border-sizes {
54
- @include makeBorder($border, $value, $size);
47
+ @if index($components, borders) {
48
+ @each $border, $value in $borders {
49
+ @each $size in $border-sizes {
50
+ @include makeBorder($border, $value, $size);
51
+ }
55
52
  }
56
- }
57
53
 
58
- @if $border-responsive {
59
- @each $breakpoint, $breakpoint-value in $breakpoints {
60
- @include breakpoint($breakpoint) {
61
- @each $border, $value in $borders {
62
- @each $size in $border-sizes {
63
- @include makeBorder($border, $value, $size, $breakpoint);
54
+ @if $border-responsive {
55
+ @each $breakpoint, $breakpoint-value in $breakpoints {
56
+ @include breakpoint($breakpoint) {
57
+ @each $border, $value in $borders {
58
+ @each $size in $border-sizes {
59
+ @include makeBorder($border, $value, $size, $breakpoint);
60
+ }
64
61
  }
65
62
  }
66
63
  }
@@ -1,34 +1,33 @@
1
1
  $radius-responsive: false !default;
2
2
 
3
- $radius: () !default;
4
- @if $radius == () {
5
- $radius: (
6
- 0: 0,
7
- 1: 1px,
8
- 2: 2px,
9
- 3: 3px,
10
- 4: 4px,
11
- 5: 5px,
12
- 10: 10px,
13
- round: 50%,
14
- rounded: 999px
15
- );
16
- }
3
+ $radius: (
4
+ 0: 0,
5
+ 1: 1px,
6
+ 2: 2px,
7
+ 3: 3px,
8
+ 4: 4px,
9
+ 5: 5px,
10
+ 10: 10px,
11
+ round: 50%,
12
+ rounded: 999px
13
+ ) !default;
17
14
 
18
- @each $radi, $value in $radius {
19
- .radius-#{$radi} {
20
- border-radius: $value;
21
- }
15
+ @if index($components, border-radius) {
16
+ @each $radi, $value in $radius {
17
+ .radius-#{$radi} {
18
+ border-radius: $value;
19
+ }
22
20
 
23
- $addme: add-to-apply-map(radius-#{$radi}, "border-radius", "#{$value}");
24
- }
21
+ $addme: add-to-apply-map(radius-#{$radi}, "border-radius", "#{$value}");
22
+ }
25
23
 
26
- @if $radius-responsive {
27
- @each $breakpoint, $breakpoint-value in $breakpoints {
28
- @include breakpoint($breakpoint) {
29
- @each $radi, $value in $radius {
30
- .#{$breakpoint}\:radius-#{$radi} {
31
- border-radius: $value;
24
+ @if $radius-responsive {
25
+ @each $breakpoint, $breakpoint-value in $breakpoints {
26
+ @include breakpoint($breakpoint) {
27
+ @each $radi, $value in $radius {
28
+ .#{$breakpoint}\:radius-#{$radi} {
29
+ border-radius: $value;
30
+ }
32
31
  }
33
32
  }
34
33
  }
@@ -1,9 +1,6 @@
1
- $breakpoints: () !default;
2
- @if $breakpoints == () {
3
- $breakpoints: (
4
- sm: 560px,
5
- md: 768px,
6
- lg: 960px,
7
- mw: 1200px
8
- );
9
- }
1
+ $breakpoints: (
2
+ sm: 560px,
3
+ md: 768px,
4
+ lg: 960px,
5
+ mw: 1200px
6
+ ) !default;
@@ -4,32 +4,37 @@
4
4
  $theme-colors: () !default;
5
5
  $full-colors: true !default;
6
6
 
7
- $colors: () !default;
8
- @if $colors == () {
9
- $colors: (
10
- red,
11
- pink,
12
- purple,
13
- deep-purple,
14
- indigo,
15
- blue,
16
- light-blue,
17
- cyan,
18
- teal,
19
- green,
20
- light-green,
21
- lime,
22
- yellow,
23
- amber,
24
- orange,
25
- deep-orange,
26
- brown,
27
- gray,
28
- blue-gray,
29
- general
30
- );
7
+ @if $theme-colors != () {
8
+ :root {
9
+ @each $color, $value in $theme-colors {
10
+ --#{$color}: #{$value};
11
+ }
12
+ }
31
13
  }
32
14
 
15
+ $colors: (
16
+ red,
17
+ pink,
18
+ purple,
19
+ deep-purple,
20
+ indigo,
21
+ blue,
22
+ light-blue,
23
+ cyan,
24
+ teal,
25
+ green,
26
+ light-green,
27
+ lime,
28
+ yellow,
29
+ amber,
30
+ orange,
31
+ deep-orange,
32
+ brown,
33
+ gray,
34
+ blue-gray,
35
+ general
36
+ ) !default;
37
+
33
38
  $colors-list: (
34
39
  red: (
35
40
  50: #FFEBEE,
@@ -308,4 +313,4 @@ $colors-list: (
308
313
  black: #000000,
309
314
  white: #FFFFFF
310
315
  ),
311
- );
316
+ ) !default;
@@ -1,45 +1,44 @@
1
1
  $display-responsive: true !default;
2
2
 
3
- $display: () !default;
4
- @if $display == () {
5
- $display: (
6
- inline,
7
- inline-block,
8
- block,
9
- flex,
10
- inline-flex
11
- );
12
- }
3
+ $display: (
4
+ inline,
5
+ inline-block,
6
+ block,
7
+ flex,
8
+ inline-flex
9
+ ) !default;
13
10
 
14
- @each $property in $display {
15
- .#{$property} {
16
- display: $property;
17
- }
11
+ @if index($components, display) {
12
+ @each $property in $display {
13
+ .#{$property} {
14
+ display: $property;
15
+ }
18
16
 
19
- $addme: add-to-apply-map(#{$property}, "display", "#{$property}");
20
- }
17
+ $addme: add-to-apply-map(#{$property}, "display", "#{$property}");
18
+ }
21
19
 
22
- @if $display-responsive {
23
- @each $breakpoint, $breakpoint-value in $breakpoints {
24
- @include breakpoint($breakpoint) {
25
- @each $property in $display {
26
- .#{$breakpoint}\:#{$property} {
27
- display: $property;
20
+ @if $display-responsive {
21
+ @each $breakpoint, $breakpoint-value in $breakpoints {
22
+ @include breakpoint($breakpoint) {
23
+ @each $property in $display {
24
+ .#{$breakpoint}\:#{$property} {
25
+ display: $property;
26
+ }
28
27
  }
29
28
  }
30
29
  }
31
30
  }
32
- }
33
31
 
34
- .hidden {
35
- display: none;
36
- }
32
+ .hidden {
33
+ display: none;
34
+ }
37
35
 
38
- @if $display-responsive {
39
- @each $breakpoint, $breakpoint-value in $breakpoints {
40
- @include breakpoint($breakpoint) {
41
- .#{$breakpoint}\:hidden {
42
- display: none;
36
+ @if $display-responsive {
37
+ @each $breakpoint, $breakpoint-value in $breakpoints {
38
+ @include breakpoint($breakpoint) {
39
+ .#{$breakpoint}\:hidden {
40
+ display: none;
41
+ }
43
42
  }
44
43
  }
45
44
  }
@@ -12,10 +12,6 @@ body {
12
12
  overflow: hidden;
13
13
  }
14
14
 
15
- .transition {
16
- transition: all .2s;
17
- }
18
-
19
15
  h1 {
20
16
  font-size: 2rem;
21
17
  }