flint-gs 1.0.9 → 1.1.0

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: d31b1360c451f2dd049222e654738aa656a87629
4
- data.tar.gz: 3c43ec3f8ef0f0ede08ce86aaf9f96e5e8f6411b
3
+ metadata.gz: 44d7c2f0b3754bf0d4951d67e5175a3ee9b7b796
4
+ data.tar.gz: 509f0b61cdb996e86af2327f25a49c98e856e370
5
5
  SHA512:
6
- metadata.gz: aa871d5cf12e8d893be114e17ac4309d0dbadfd612fdd7372f71f72db032fa1949426a7c0a89908f30936921ab3be9b2d60b276109ec9c14f90504353456cad2
7
- data.tar.gz: 18411a48f4e810b7f5c88a88c4f92e0566f44c41c551858b5c16fe364379e84b16e547be5274d1e24c8daac2de3b1bc2f51096f82106d7dec90034c9c774a727
6
+ metadata.gz: 3584b4cfd3da94c7b4255bcbdf3d7187dfa5bdde57f595e92fc2f3f03c0a48a3688e863295920783b5726b1a92696cfbdada1e974cbe4da49917f206279558b2
7
+ data.tar.gz: 483a2fa33be09e96d05431dabd75cbccf46942c0dfffe24af6010821b2f8f4a11107bb44cf454b48ec1c8f1584bf8839d80fd8a6aa208f86f4e01c249d52bf6c
data/README.md CHANGED
@@ -1,20 +1,25 @@
1
1
  #Flint [![Gem Version](https://badge.fury.io/rb/flint-gs.svg)](http://badge.fury.io/rb/flint-gs)
2
2
 
3
- **Flint is designed to be a flexible layout toolkit that developers can use for any responsive grid-based project.** Built on *Sass 3.3*, Flint is capable of complex responsive layouts customized at each breakpoint; all while using a single mixin, having minimal output, as well as being completely semantic. All of your layout settings are housed in a simple config file and is immensely customizable. Flint will only output the code you need, and nothing else. We handle the hard stuff, so you can focus on the rest.
3
+ **Flint is designed to be a flexible layout toolkit that developers can use for any responsive grid-based project.** Built on Sass 3.3, Flint is capable of complex responsive layouts customized at each breakpoint; all while using a single mixin, having minimal output, as well as being completely semantic. All of your layout settings are housed in a simple config file and is immensely customizable. Flint will only output the code you need, and nothing else. We handle the hard stuff, so you can focus on the rest.
4
4
 
5
- Take it for a spin on [SassMeister.com](http://sassmeister.com/)!
5
+ Take it for a spin on [SassMeister.com](http://sassmeister.com/gist/11489231)!
6
6
 
7
7
  Enjoy.
8
8
 
9
- ##Documentation
9
+ ##Requirements
10
+
11
+ * Sass ~> 3.3.0
12
+ * Compass ~> 0.12.1
10
13
 
11
- ###Installation
14
+ ##Installation
12
15
 
13
16
  1. `gem install flint-gs`
14
17
  2. Add `require "flint"` to your `config.rb`
15
18
  3. Import it in your stylesheets with `@import "flint";`
16
19
 
17
- If you don't want to install the gem, download/clone the current build files and use the starter `config.rb` to require any custom functions Flint uses. Currently this is required, as we're making use of custom SassScript functions until the 'script `&`' [returns to Sass](https://gist.github.com/nex3/8050187). Adjust the paths according to your project.
20
+ If you don't want to install the gem (?!), download/clone the current build files and use the starter `config.rb` to require any custom functions Flint uses. Currently this is required, as we're making use of custom SassScript functions until the 'script `&`' [returns to Sass](https://gist.github.com/nex3/8050187). Adjust the paths according to your project.
21
+
22
+ ##Documentation
18
23
 
19
24
  ###Config
20
25
 
@@ -26,7 +31,9 @@ To begin, you can either use the default config (below) which comes baked in, or
26
31
 
27
32
  Settings may be entered in `px` or `em`, and Flint will do the rest.
28
33
 
29
- *Keep in mind, whatever unit you choose to use here needs to be used consistently throughout Flint. No mixing of `px` and `em` units. Also, Flint does require that you follow a `DESC` order for your breakpoint configuration, this way it can traverse the config map correctly to output valid media queries.*
34
+ *Keep in mind, whatever unit you choose to use here needs to be used consistently throughout Flint.*
35
+
36
+ No mixing of `px` and `em` units. Also, Flint does require that you follow a `DESC` order for your breakpoint configuration, this way it can traverse the config map correctly to output valid media queries.
30
37
 
31
38
  ```scss
32
39
  // Configuration map
@@ -39,9 +46,9 @@ Settings may be entered in `px` or `em`, and Flint will do the rest.
39
46
  // -------------------------------------------------------------------------------
40
47
  // @param default [Alias] : alias of breakpoint that is your grid default
41
48
  // @param grid [Style] : style of grid
42
- // @param gutter [Value | false] : contextual size of gutter
43
- // @param float-style [Value | false] : float direction
44
- // @param max-width [Value | false] : max-width for `containers`
49
+ // @param gutter [Value] : contextual size of gutter
50
+ // @param float-style [Direction] : float direction
51
+ // @param max-width [Boolean | Value] : max-width for `containers`
45
52
  // @param center-container [Boolean] : if you want a centered container
46
53
  // @param border-box-sizing [Boolean] : if you want box-sizing: border-box applied
47
54
  // @param debug-mode [Boolean] : ouputs debug properties
@@ -50,10 +57,10 @@ Settings may be entered in `px` or `em`, and Flint will do the rest.
50
57
  $flint: (
51
58
  // grid configuration
52
59
  "config": (
53
- // define breakpoints [any amount of breakpoints]
60
+ // define breakpoints [any (!!) amount of breakpoints]
54
61
  "desktop": ( // [any alias you like, minus reserved flint words (i.e. "settings", etc.)]
55
62
  "columns": 16, // [0-infinity]
56
- "breakpoint": 1280px, // [0-infinity(unit)]
63
+ "breakpoint": 1280px, // [value(unit)]
57
64
  ),
58
65
  "laptop": (
59
66
  "columns": 12,
@@ -71,12 +78,12 @@ $flint: (
71
78
  "settings": (
72
79
  "default": "desktop", // [any breakpoint's alias]
73
80
  "grid": "fluid", // [fluid | fixed]
74
- "gutter": 10px, // [0-infinity(unit) | false]
81
+ "gutter": 10px, // [value(unit)]
75
82
  "float-style": "left", // [left | right]
76
- "max-width": false, // [true : uses highest breakpoint | false | value(unit)]
83
+ "max-width": false, // [true (uses highest breakpoint) | false | value(unit)]
77
84
  "center-container": true, // [true | false]
78
85
  "border-box-sizing": true, // [true | false]
79
- "debug-mode": true, // [true | false ]
86
+ "debug-mode": true, // [true | false]
80
87
  ),
81
88
  ),
82
89
  );
@@ -259,8 +266,9 @@ Use this if your nested context is *identical* across all breakpoints. The `cont
259
266
  @include _(3, auto); // Equivalent to : _(3, 6)
260
267
  }
261
268
 
262
- // When using `auto`, Flint 'falls back' from the topmost selector until one is found that has an
263
- // instance, and it will calculate it's context based on that instances span for the current breakpoint.
269
+ // When using `auto`, Flint 'falls back' from the topmost selector until one is
270
+ // found that has an instance, and it will calculate it's context based on that
271
+ // instances span for the current breakpoint.
264
272
  ```
265
273
 
266
274
  Outputs,
@@ -537,22 +545,26 @@ Here are different gutter modifiers that may be called in when defining spans us
537
545
  ```scss
538
546
  // default margins
539
547
  .gutter-default {
540
- @include _(desktop, 4, $gutter: default); // other aliases : `normal` | `regular`
548
+ // other aliases : `normal` | `regular`
549
+ @include _(desktop, 4, $gutter: default);
541
550
  }
542
551
 
543
552
  // no left margin
544
553
  .gutter-alpha {
545
- @include _(desktop, 4, $gutter: alpha); // other alias : `no-left`
554
+ // other aliases : `no-left` | `first`
555
+ @include _(desktop, 4, $gutter: alpha);
546
556
  }
547
557
 
548
558
  // no right margin
549
559
  .gutter-omega {
550
- @include _(desktop, 4, $gutter: omega); // other alias : `no-right`
560
+ // other aliases : `no-right` | `last`
561
+ @include _(desktop, 4, $gutter: omega);
551
562
  }
552
563
 
553
564
  // no margins
554
565
  .gutter-row {
555
- @include _(desktop, 4, $gutter: row); // other alias : `none`
566
+ // other alias : `none`
567
+ @include _(desktop, 4, $gutter: row);
556
568
  }
557
569
 
558
570
  // places gutters on inside by reducing column width by [gutter*2]
data/lib/flint.rb CHANGED
@@ -5,8 +5,8 @@ Compass::Frameworks.register('flint', :path => extension_path)
5
5
  # Version is a number. If a version contains alphas, it will be created as a prerelease version
6
6
  # Date is in the form of YYYY-MM-DD
7
7
  module Flint
8
- VERSION = "1.0.9"
9
- DATE = "2014-05-02"
8
+ VERSION = "1.1.0"
9
+ DATE = "2014-05-09"
10
10
  end
11
11
 
12
12
  # Custom functions
@@ -3,9 +3,9 @@
3
3
  // @dependence `get-value()`
4
4
  // @dependence `fluid-width()`
5
5
  // -------------------------------------------------------------------------------
6
- // @param $key [Breakpoint | "container"] : how to calculate value
7
- // @param $span [Value] : span
8
- // @param $context [Value] : if context is needed
6
+ // @param $key [Breakpoint | "container"] : key for lookup
7
+ // @param $span [Value] : span of element
8
+ // @param $context [Value] : context of element
9
9
  // -------------------------------------------------------------------------------
10
10
  // @return [Value] | false
11
11
 
@@ -15,14 +15,14 @@
15
15
  @return 0;
16
16
  } @else if $context == NULL {
17
17
  @return fluid-width(get-value(settings, gutter), get-value($key, breakpoint));
18
- } @else {
18
+ } @else if $context <= get-value($key, columns) {
19
19
  @return fluid-width(get-value(settings, gutter), ((get-value($key, breakpoint) / get-value($key, columns) * $context)));
20
+ } @else {
21
+ @return fluid-width(get-value(settings, gutter) / get-value($key, columns) * $context, ((get-value($key, breakpoint) / get-value($key, columns) * $context)));
20
22
  }
21
23
  } @if get-value(settings, grid) == "fixed" {
22
24
  @if $key == "container" or $span == "container" {
23
25
  @return 0;
24
- } @if $context == NULL {
25
- @return get-value(settings, gutter);
26
26
  } @else {
27
27
  @return get-value(settings, gutter);
28
28
  }
@@ -21,8 +21,6 @@
21
21
  } @if get-value(settings, grid) == "fixed" {
22
22
  @if $key == "container" or $span == "container" {
23
23
  @return get-value($key, breakpoint);
24
- } @else if $context == NULL {
25
- @return get-value($key, breakpoint) / get-value($key, columns) * $span;
26
24
  } @else {
27
25
  @return get-value($key, breakpoint) / get-value($key, columns) * $span;
28
26
  }
@@ -19,11 +19,12 @@
19
19
  $flint__instance: (
20
20
  "#{selector_string()}::#{$key}": (
21
21
  "instance-count": #{$flint__instance-count},
22
+ "parent": #{if(get-family-instance($key) != false, get-family-instance($key), none)},
22
23
  "key": #{$key},
23
24
  "breakpoint": #{get-value($key, breakpoint)},
24
25
  "columns": #{get-value($key, columns)},
25
26
  "span": #{$span},
26
- "context": #{$context},
27
+ "context": #{if($context == "auto", get-instance-value($key, span), $context)},
27
28
  "gutter": #{$gutter},
28
29
  "shift": #{$shift},
29
30
  "outputted": (
@@ -27,7 +27,7 @@
27
27
  // Check if value is output map
28
28
  @if is-map($value) {
29
29
  @each $mod_property, $mod_value in $value {
30
- -flint--output-#{$mod_property}: #{$mod_value};
30
+ -flint-output-#{$mod_property}: #{$mod_value};
31
31
  }
32
32
  // Else, print values as flagged comments
33
33
  } @else {
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flint-gs
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.9
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ezekiel Gabrielse
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-05-02 00:00:00.000000000 Z
12
+ date: 2014-05-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sass