flint-gs 1.12.0 → 2.0.0.rc.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +71 -207
  3. data/lib/flint.rb +8 -8
  4. data/stylesheets/_flint.scss +3 -2
  5. data/stylesheets/flint/config/_config.scss +37 -68
  6. data/stylesheets/flint/functions/_functions.scss +15 -7
  7. data/stylesheets/flint/functions/helpers/_helpers.scss +115 -117
  8. data/stylesheets/flint/functions/lib/_calc-breakpoint.scss +23 -32
  9. data/stylesheets/flint/functions/lib/_calc-width.scss +40 -26
  10. data/stylesheets/flint/functions/lib/_exists.scss +8 -7
  11. data/stylesheets/flint/functions/lib/_fluid-width.scss +8 -7
  12. data/stylesheets/flint/functions/lib/_get-index.scss +12 -10
  13. data/stylesheets/flint/functions/lib/_get-instance-value.scss +10 -16
  14. data/stylesheets/flint/functions/lib/_get-value.scss +9 -13
  15. data/stylesheets/flint/functions/lib/_has-family-instance.scss +21 -20
  16. data/stylesheets/flint/functions/lib/_instance.scss +19 -22
  17. data/stylesheets/flint/functions/lib/_last.scss +7 -6
  18. data/stylesheets/flint/functions/lib/_list-to-string.scss +11 -9
  19. data/stylesheets/flint/functions/lib/_map-fetch.scss +13 -19
  20. data/stylesheets/flint/functions/lib/_next-index.scss +9 -14
  21. data/stylesheets/flint/functions/lib/_purge.scss +9 -8
  22. data/stylesheets/flint/functions/lib/_remove.scss +11 -10
  23. data/stylesheets/flint/functions/lib/_replace-substring.scss +9 -8
  24. data/stylesheets/flint/functions/lib/_replace.scss +11 -10
  25. data/stylesheets/flint/functions/lib/_steal-key.scss +24 -13
  26. data/stylesheets/flint/functions/lib/_steal-values.scss +9 -12
  27. data/stylesheets/flint/functions/lib/_string-to-list.scss +11 -10
  28. data/stylesheets/flint/functions/lib/_support-syntax-bem.scss +10 -9
  29. data/stylesheets/flint/functions/lib/_support-syntax.scss +14 -12
  30. data/stylesheets/flint/functions/lib/_types-in-list.scss +9 -8
  31. data/stylesheets/flint/functions/lib/_use-syntax.scss +12 -8
  32. data/stylesheets/flint/globals/_globals.scss +35 -21
  33. data/stylesheets/flint/mixins/_mixins.scss +3 -2
  34. data/stylesheets/flint/mixins/lib/_box-sizing.scss +7 -7
  35. data/stylesheets/flint/mixins/lib/_calculate.scss +112 -583
  36. data/stylesheets/flint/mixins/lib/_clearfix.scss +7 -7
  37. data/stylesheets/flint/mixins/lib/_container.scss +6 -12
  38. data/stylesheets/flint/mixins/lib/_main.scss +271 -202
  39. data/stylesheets/flint/mixins/lib/_new-instance.scss +12 -15
  40. data/stylesheets/flint/mixins/lib/_print-instance.scss +16 -20
  41. metadata +3 -4
  42. data/stylesheets/flint/functions/lib/_calc-margin.scss +0 -57
@@ -1,24 +1,21 @@
1
- // Creates a new instance, adds to global instance map
2
- // -------------------------------------------------------------------------------
3
- // @param $calc-key [string] : breakpoint key
4
- // @param $calc-span [number] : span
5
- // @param $calc-context [number] : context
6
- // @param $calc-gutter [number] : gutter
7
- // @param $calc-shift [number] : shift
8
- // @param $output-width [number] : width
9
- // @param $output-margin-right [number] : right margin
10
- // @param $output-margin-left [number] : left margin
11
- // -------------------------------------------------------------------------------
12
- // @output new instance map
13
-
14
- @mixin flint-new-instance($calc-key, $calc-span, $calc-context, $calc-gutter, $calc-shift, $output-width, $output-margin-right, $output-margin-left) {
1
+ /**
2
+ * Creates a new instance, adds to global instance map
3
+ *
4
+ * @param {String} $calc-key
5
+ * @param {Number} $calc-span
6
+ * @param {Number} $calc-context
7
+ * @param {Number} $calc-gutter
8
+ * @param {Number} $output-width
9
+ * @param {Number} $output-margin-right
10
+ * @param {Number} $output-margin-left
11
+ */
12
+ @mixin flint-new-instance($calc-key, $calc-span, $calc-context, $calc-gutter, $output-width, $output-margin-right, $output-margin-left) {
15
13
  $flint__instances:
16
14
  flint-instance(
17
15
  $calc-key,
18
16
  $calc-span,
19
17
  $calc-context,
20
18
  $calc-gutter,
21
- $calc-shift,
22
19
  $output-width,
23
20
  $output-margin-right,
24
21
  $output-margin-left
@@ -1,27 +1,23 @@
1
- // Prints debug properties
2
- // -------------------------------------------------------------------------------
3
- // @param $calc-key [string] : breakpoint key to search for instance
4
- // -------------------------------------------------------------------------------
5
- // @output instance map
6
-
1
+ /**
2
+ * Prints debug properties
3
+ *
4
+ * @param {String} $calc-key - breakpoint key to search for instance
5
+ */
7
6
  @mixin flint-debug-instance($calc-key) {
8
7
  @if flint-get-value("settings", "debug-mode") {
9
8
  // Lets clean up the selector a bit...
10
- $selector-string: selector_string();
11
- $selector-list: flint-string-to-list($selector-string);
12
- $selector-cleaned: flint-list-to-string($selector-list, " ");
13
-
14
- $printKey: "#{$selector-cleaned}" + "::" + "#{$calc-key}";
15
- @include flint-print-instance( map-get( $flint__instances, unquote($printKey) ) );
9
+ $selector: nth(&, 1);
10
+ // Append key to selector
11
+ $print-selector: "#{$selector}" + "::" + "#{$calc-key}";
12
+ @include flint-print-instance(map-get($flint__instances, unquote($print-selector)));
16
13
  }
17
14
  }
18
15
 
19
- // Prints all contents of instance
20
- // -------------------------------------------------------------------------------
21
- // @param $instance [map] : instance
22
- // -------------------------------------------------------------------------------
23
- // @output instance map
24
-
16
+ /**
17
+ * Prints all contents of instance map
18
+ *
19
+ * @param {Map} $instance - instance map
20
+ */
25
21
  @mixin flint-print-instance($instance) {
26
22
 
27
23
  // Loop through each property in passed instance
@@ -29,8 +25,8 @@
29
25
 
30
26
  // Check if value is output map
31
27
  @if flint-is-map($value) {
32
- @each $p, $v in $value {
33
- -flint-output-#{$p}: #{$v};
28
+ @each $prop, $val in $value {
29
+ -flint-output-#{$prop}: #{$val};
34
30
  }
35
31
  // Else, print values as flagged comments
36
32
  } @else {
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flint-gs
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.12.0
4
+ version: 2.0.0.rc.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ezekiel Gabrielse
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-29 00:00:00.000000000 Z
11
+ date: 2014-09-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sass
@@ -24,7 +24,7 @@ dependencies:
24
24
  - - ~>
25
25
  - !ruby/object:Gem::Version
26
26
  version: '3.3'
27
- description: Flint is a highly advanced Sass grid-system designed for rapid responsive
27
+ description: Flint is a highly advanced Sass grid system designed for rapid responsive
28
28
  development.
29
29
  email:
30
30
  - ezekg@yahoo.com
@@ -38,7 +38,6 @@ files:
38
38
  - stylesheets/flint/functions/_functions.scss
39
39
  - stylesheets/flint/functions/helpers/_helpers.scss
40
40
  - stylesheets/flint/functions/lib/_calc-breakpoint.scss
41
- - stylesheets/flint/functions/lib/_calc-margin.scss
42
41
  - stylesheets/flint/functions/lib/_calc-width.scss
43
42
  - stylesheets/flint/functions/lib/_exists.scss
44
43
  - stylesheets/flint/functions/lib/_fluid-width.scss
@@ -1,57 +0,0 @@
1
- // Calculate margin
2
- // -------------------------------------------------------------------------------
3
- // @param $key [string] : key for lookup
4
- // @param $span [number] : span value of element
5
- // @param $context [number] : context value of element
6
- // -------------------------------------------------------------------------------
7
- // @return calculated value | false
8
-
9
- @function flint-calc-margin($key, $span, $context: null) {
10
- $result: false;
11
-
12
- // Check to see if value has been cached
13
- @if map-has-key($flint__cached-values, "#{$key, $span, $context}::margin") and $context != "auto" {
14
- @return map-get($flint__cached-values, "#{$key, $span, $context}::margin");
15
- }
16
-
17
- @if flint-get-value("settings", "grid") == "fluid" {
18
-
19
- @if $key == "container" or $span == "container" {
20
-
21
- $result: 0;
22
-
23
- } @else if $context == null {
24
-
25
- $result: flint-fluid-width(flint-get-value("settings", "gutter"), flint-get-value($key, "breakpoint"));
26
-
27
- } @else if $context <= flint-get-value($key, "columns") {
28
-
29
- $result: flint-fluid-width(flint-get-value("settings", "gutter"), ((flint-get-value($key, "breakpoint") / flint-get-value($key, "columns") * $context)));
30
-
31
- } @else {
32
-
33
- $result: flint-fluid-width(flint-get-value("settings", "gutter") / flint-get-value($key, "columns") * $context, ((flint-get-value($key, "breakpoint") / flint-get-value($key, "columns") * $context)));
34
-
35
- }
36
-
37
- } @if flint-get-value("settings", "grid") == "fixed" {
38
-
39
- @if $key == "container" or $span == "container" {
40
-
41
- $result: 0;
42
-
43
- } @else {
44
-
45
- $result: flint-get-value("settings", "gutter");
46
- }
47
-
48
- }
49
-
50
- // Save result to cache
51
- @if $context != "auto" {
52
- $flint__cached-values: map-merge($flint__cached-values, ("#{$key, $span, $context}::margin": $result));
53
- }
54
-
55
- // Return result
56
- @return $result;
57
- }