flake-scss 0.1.3 → 0.1.4

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: d6fba40b5f9b69bec80ae0b03e341db2c9245a0a
4
- data.tar.gz: 4feff6862267c16c969cd9a598a9fa7742658230
3
+ metadata.gz: 8518cff97725bdd862ff0fa7105df9d0ae716596
4
+ data.tar.gz: f5c5ec5fe8265803ca5ce53fa411415f00dbeae3
5
5
  SHA512:
6
- metadata.gz: c18d02b18aed7812c8c8848260898be562a1f4d2bec2d86b1a96a50fe4951edc595901f55e5264947004d055814e50ccbc0a1fcb30b0edf7a4cca274325b3052
7
- data.tar.gz: 7245e39b81063c05d2b816988092f1c8e13db0e2f90fc9d019a3817361fb0eb0b0d25f78b73b4571dc845d04e93f38acb90cfa603429bdc3be507b988bd3335c
6
+ metadata.gz: 426f38623b909cc19fe8404eb5c2366e0ce1a4b3de6e54f596d1e070e0a5ee3ee09c40c8244eecf445d2751f7d2e267d7fb23870024d17a29e8624ddec759134
7
+ data.tar.gz: 121a66356358e392a7cb5690c18a9ac7a213367d2e70252a2dc6417d957f4738b834c7629c29faaf6139f55b5448adc17b4a0445980d7fd2b2128fac0fc3ab59
data/README.md CHANGED
@@ -1,8 +1,6 @@
1
- # Flake::Scss
1
+ # Flake-scss
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/flake/scss`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
3
+ [Work in Progress!] Documentation at [flakeframework.herokuapp.com](https://flakeframework.herokuapp.com).
6
4
 
7
5
  ## Installation
8
6
 
@@ -19,25 +17,3 @@ And then execute:
19
17
  Or install it yourself as:
20
18
 
21
19
  $ gem install flake-scss
22
-
23
- ## Usage
24
-
25
- TODO: Write usage instructions here
26
-
27
- ## Development
28
-
29
- After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
-
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
-
33
- ## Contributing
34
-
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/flake-scss. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
36
-
37
- ## License
38
-
39
- The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
40
-
41
- ## Code of Conduct
42
-
43
- Everyone interacting in the Flake::Scss project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/flake-scss/blob/master/CODE_OF_CONDUCT.md).
@@ -1,5 +1,5 @@
1
1
  module Flake
2
2
  module Scss
3
- VERSION = "0.1.3"
3
+ VERSION = "0.1.4"
4
4
  end
5
5
  end
@@ -1,5 +1,8 @@
1
+ @import "variables";
2
+
1
3
  @import "helpers/functions",
2
- "helpers/breakpoints";
4
+ "helpers/breakpoints",
5
+ "helpers/mixins";
3
6
 
4
7
  @import "background/colors";
5
8
 
@@ -0,0 +1 @@
1
+ $apply-classes: () !global;
@@ -17,6 +17,8 @@ $bg-responsive: true !default;
17
17
  #{$hover} {
18
18
  background-color: $value;
19
19
  }
20
+
21
+ $addme: add-to-apply-map(bg-#{$color}-#{$shade}, "background-color", "#{$value}");
20
22
  }
21
23
  }
22
24
 
@@ -18,9 +18,15 @@ $border-color-responsive: false !default;
18
18
  border-color: $value;
19
19
  }
20
20
 
21
- @if $border-color-responsive {
22
- @each $breakpoint, $breakpoint-value in $breakpoints {
23
- @include breakpoint($breakpoint) {
21
+ $addme: add-to-apply-map(b-#{$color}-#{$shade}, "border-color", "#{$value}");
22
+ }
23
+ }
24
+
25
+ @if $border-color-responsive {
26
+ @each $breakpoint, $breakpoint-value in $breakpoints {
27
+ @include breakpoint($breakpoint) {
28
+ @each $color in $colors {
29
+ @each $shade, $value in $medium {
24
30
  .#{$breakpoint}\:bg-#{$color}-#{$shade} {
25
31
  border-color: $value;
26
32
  }
@@ -12,9 +12,18 @@ $borders: () !default;
12
12
  );
13
13
  }
14
14
 
15
- $standard-border: 1px solid black;
15
+ $border-sizes: () !default;
16
+ @if $border-sizes == () {
17
+ $border-sizes: (
18
+ 1,
19
+ 2,
20
+ 3,
21
+ 4,
22
+ 5
23
+ );
24
+ }
16
25
 
17
- @mixin makeBorder($space, $value, $breakpoint: 0) {
26
+ @mixin makeBorder($space, $value, $size, $breakpoint: 0) {
18
27
  $bp: "";
19
28
  $sep: "";
20
29
 
@@ -26,24 +35,33 @@ $standard-border: 1px solid black;
26
35
  $sep: "-";
27
36
  }
28
37
 
29
- .#{$bp}b#{$space} {
30
- border#{$sep}#{$value}: $standard-border;
38
+ .#{$bp}b#{$space}-#{$size} {
39
+ border#{$sep}#{$value}: #{$size}px solid black;
31
40
  }
32
41
 
33
42
  .#{$bp}b#{$space}-0 {
34
43
  border#{$sep}#{$value}: 0;
35
44
  }
45
+
46
+ @if $breakpoint == 0 {
47
+ $addme: add-to-apply-map(b#{$space}-#{$size}, "border#{$sep}#{$value}", "#{$size}px solid black");
48
+ $addme: add-to-apply-map(b#{$space}-0, "border#{$sep}#{$value}", "0");
49
+ }
36
50
  }
37
51
 
38
52
  @each $border, $value in $borders {
39
- @include makeBorder($border, $value);
53
+ @each $size in $border-sizes {
54
+ @include makeBorder($border, $value, $size);
55
+ }
40
56
  }
41
57
 
42
58
  @if $border-responsive {
43
59
  @each $breakpoint, $breakpoint-value in $breakpoints {
44
60
  @include breakpoint($breakpoint) {
45
61
  @each $border, $value in $borders {
46
- @include makeBorder($border, $value, $breakpoint);
62
+ @each $size in $border-sizes {
63
+ @include makeBorder($border, $value, $size, $breakpoint);
64
+ }
47
65
  }
48
66
  }
49
67
  }
@@ -12,4 +12,6 @@ $radius: (
12
12
  .radius-#{$radi} {
13
13
  border-radius: $value;
14
14
  }
15
+
16
+ $addme: add-to-apply-map(radius-#{$radi}, "border-radius", "#{$value}");
15
17
  }
@@ -12,11 +12,11 @@ $display: () !default;
12
12
  }
13
13
 
14
14
  @each $property in $display {
15
- $hover: "";
16
-
17
15
  .#{$property} {
18
16
  display: $property;
19
17
  }
18
+
19
+ $addme: add-to-apply-map(#{$property}, "display", "#{$property}");
20
20
  }
21
21
 
22
22
  @if $display-responsive {
@@ -4,8 +4,6 @@
4
4
 
5
5
  html,
6
6
  body {
7
- margin: 0;
8
- padding: 0;
9
- font-size: map-get($sizes, normal);
7
+ @include apply(("m-0", "p-0", "bg-general-white", "text-size-normal"));
10
8
  line-height: 1.5em;
11
9
  }
@@ -15,6 +15,8 @@ $positions: () !default;
15
15
  .#{$position} {
16
16
  position: $position;
17
17
  }
18
+
19
+ $addme: add-to-apply-map(#{$position}, "position", "#{$position}");
18
20
  }
19
21
 
20
22
  @if $positions-responsive {
@@ -45,6 +47,8 @@ $pins: () !default;
45
47
  .pin-#{$pin} {
46
48
  #{$value}: 0;
47
49
  }
50
+
51
+ $addme: add-to-apply-map(pin-#{$pin}, "#{$value}", "0");
48
52
  }
49
53
 
50
54
  @if $pins-responsive {
@@ -1,3 +1,15 @@
1
1
  @function spacing($key: 0) {
2
2
  @return map-get($spacing, $key);
3
3
  }
4
+
5
+ @function add-to-apply-map($classname, $property, $value) {
6
+ $to-add-to-map: (
7
+ $classname: (
8
+ $property: $value
9
+ )
10
+ );
11
+
12
+ $apply-classes: map-merge($apply-classes, $to-add-to-map) !global;
13
+
14
+ @return $to-add-to-map;
15
+ }
@@ -0,0 +1,9 @@
1
+ @mixin apply($keys) {
2
+ @each $key in $keys {
3
+ $class: map-get($apply-classes, $key);
4
+
5
+ @each $key, $value in $class {
6
+ #{$key}: #{$value};
7
+ }
8
+ }
9
+ }
@@ -38,7 +38,7 @@ $flex-list: (
38
38
  stretch: "stretch"
39
39
  )
40
40
  ), "align-self": (
41
- "class": "self",
41
+ "class": "align-self",
42
42
  "values": (
43
43
  start: "flex-start",
44
44
  end: "flex-end",
@@ -72,6 +72,8 @@ $flex-list: (
72
72
  .#{$classstart}-#{$value-name} {
73
73
  #{$property}: #{$value-value};
74
74
  }
75
+
76
+ $addme: add-to-apply-map(#{$classstart}-#{$value-name}, "#{$property}", "#{$value-value}");
75
77
  }
76
78
  }
77
79
  }
@@ -10,4 +10,6 @@ $shadows: (
10
10
  .shadow-#{$shadow} {
11
11
  box-shadow: #{$value};
12
12
  }
13
+
14
+ $addme: add-to-apply-map(shadow-#{$shadow}, "box-shadow", "#{$value}");
13
15
  }
@@ -1,4 +1,4 @@
1
- $grid-size: 12;
1
+ $grid-size: 12 !default;
2
2
  $grid-full: true !default;
3
3
  $grid-single: false !default;
4
4
 
@@ -11,8 +11,11 @@ $grid-single: false !default;
11
11
  .#{$bp}w-#{$division}\/#{$divide} {
12
12
  width: (100% / $divide) * $division;
13
13
  }
14
- }
15
14
 
15
+ @if $breakpoint == 0 {
16
+ $addme: add-to-apply-map("#{$bp}w-#{$division}/#{$divide}", "width", "#{(100% / $divide) * $division}");
17
+ }
18
+ }
16
19
 
17
20
  // No Breakpoints
18
21
  @if $grid-single {
@@ -20,6 +23,8 @@ $grid-single: false !default;
20
23
  .w-#{$i} {
21
24
  width: (100% / $grid-size) * $i;
22
25
  }
26
+
27
+ $addme: add-to-apply-map("w-#{$i}", "width", "#{(100% / $grid-size) * $i}");
23
28
  }
24
29
  } @else {
25
30
  @for $i from 1 through $grid-size {
@@ -65,3 +70,7 @@ $grid-single: false !default;
65
70
  max-width: map-get($breakpoints, mw);
66
71
  }
67
72
  }
73
+
74
+ .h-1\/1 {
75
+ height: 100%;
76
+ }
@@ -5,7 +5,7 @@ $spacing: () !default;
5
5
  $spacing: (
6
6
  0: 0,
7
7
  1: .25rem,
8
- 2: .5rem,
8
+ 2: .75rem,
9
9
  3: 1.5rem,
10
10
  4: 3rem,
11
11
  5: 4rem,
@@ -59,6 +59,8 @@ $types: (
59
59
  }
60
60
 
61
61
  #{$type-value}#{$sep}#{$loc}: $value;
62
+
63
+ $addme: add-to-apply-map(#{$bp}#{$type}#{$l}#{$s}, "#{$type-value}#{$sep}#{$loc}", "#{$value}");
62
64
  }
63
65
  }
64
66
  }
@@ -10,6 +10,8 @@ $align: (
10
10
  .text-#{$value} {
11
11
  text-align: $value;
12
12
  }
13
+
14
+ $addme: add-to-apply-map(text-#{$value}, "text", "#{$value}");
13
15
  }
14
16
 
15
17
  @if $text-align-responsive {
@@ -16,5 +16,7 @@ $text-colors-hover: true !default;
16
16
  #{$hover} {
17
17
  color: $value;
18
18
  }
19
+
20
+ $addme: add-to-apply-map(text-#{$color}-#{$shade}, "color", "#{$value}");
19
21
  }
20
22
  }
@@ -65,4 +65,6 @@ $font-families: () !default;
65
65
  .font-#{$font-family} {
66
66
  font-family: $value;
67
67
  }
68
+
69
+ $addme: add-to-apply-map(font-#{$font-family}, "font-family", "#{$value}");
68
70
  }
@@ -5,7 +5,9 @@ $sizes: (
5
5
  );
6
6
 
7
7
  @each $size, $value in $sizes {
8
- .font-size-#{$size} {
8
+ .text-#{$size} {
9
9
  font-size: $value;
10
10
  }
11
+
12
+ $addme: add-to-apply-map(text-#{$size}, "font-size", "#{$value}");
11
13
  }
@@ -9,6 +9,8 @@ $decoration: (
9
9
  .text-#{$value} {
10
10
  text-decoration: $value;
11
11
  }
12
+
13
+ $addme: add-to-apply-map(text-#{$value}, "text-decoration", "#{$value}");
12
14
  }
13
15
 
14
16
  $style: (
@@ -21,6 +23,8 @@ $style: (
21
23
  .font-#{$value} {
22
24
  font-style: $value;
23
25
  }
26
+
27
+ $addme: add-to-apply-map(font-#{$value}, "font-style", "#{$value}");
24
28
  }
25
29
 
26
30
  $weight: (
@@ -34,6 +38,8 @@ $weight: (
34
38
  .font-#{$value} {
35
39
  font-weight: $value;
36
40
  }
41
+
42
+ $addme: add-to-apply-map(font-#{$value}, "font-weight", "#{$value}");
37
43
  }
38
44
 
39
45
  $transform: (
@@ -46,4 +52,6 @@ $transform: (
46
52
  .text-#{$value} {
47
53
  text-transform: $value;
48
54
  }
55
+
56
+ $addme: add-to-apply-map(text-#{$value}, "text-transform", "#{$value}");
49
57
  }
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.3
4
+ version: 0.1.4
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-10 00:00:00.000000000 Z
11
+ date: 2017-11-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -68,6 +68,7 @@ files:
68
68
  - vendor/assets/stylesheets/helpers/_breakpoints.scss
69
69
  - vendor/assets/stylesheets/helpers/_colors-list.scss
70
70
  - vendor/assets/stylesheets/helpers/_functions.scss
71
+ - vendor/assets/stylesheets/helpers/_mixins.scss
71
72
  - vendor/assets/stylesheets/layout/_flex.scss
72
73
  - vendor/assets/stylesheets/shadows/_shadows.scss
73
74
  - vendor/assets/stylesheets/sizing/_grid.scss