flint-gs 1.0.9 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +32 -20
- data/lib/flint.rb +2 -2
- data/stylesheets/flint/functions/lib/_calc-margin.scss +6 -6
- data/stylesheets/flint/functions/lib/_calc-width.scss +0 -2
- data/stylesheets/flint/functions/lib/_instance.scss +2 -1
- data/stylesheets/flint/mixins/lib/_print-instance.scss +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 44d7c2f0b3754bf0d4951d67e5175a3ee9b7b796
|
4
|
+
data.tar.gz: 509f0b61cdb996e86af2327f25a49c98e856e370
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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
|
-
##
|
9
|
+
##Requirements
|
10
|
+
|
11
|
+
* Sass ~> 3.3.0
|
12
|
+
* Compass ~> 0.12.1
|
10
13
|
|
11
|
-
|
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
|
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
|
43
|
-
// @param float-style [
|
44
|
-
// @param max-width [
|
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, // [
|
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, // [
|
81
|
+
"gutter": 10px, // [value(unit)]
|
75
82
|
"float-style": "left", // [left | right]
|
76
|
-
"max-width": false, // [true
|
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
|
263
|
-
// instance, and it will calculate it's context based on that
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
DATE = "2014-05-
|
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"] :
|
7
|
-
// @param $span [Value] : span
|
8
|
-
// @param $context [Value] :
|
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
|
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
|
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-
|
12
|
+
date: 2014-05-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: sass
|