flint-gs 2.0.0.rc.1 → 2.0.0.rc.2
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 +4 -4
- data/README.md +22 -21
- data/lib/flint.rb +22 -28
- data/stylesheets/flint/config/_config.scss +0 -1
- data/stylesheets/flint/functions/helpers/_helpers.scss +32 -0
- data/stylesheets/flint/functions/lib/_calc-breakpoint.scss +2 -0
- data/stylesheets/flint/functions/lib/_calc-width.scss +2 -0
- data/stylesheets/flint/functions/lib/_exists.scss +3 -1
- data/stylesheets/flint/functions/lib/_fluid-width.scss +2 -0
- data/stylesheets/flint/functions/lib/_get-index.scss +2 -0
- data/stylesheets/flint/functions/lib/_get-instance-value.scss +2 -0
- data/stylesheets/flint/functions/lib/_get-value.scss +2 -0
- data/stylesheets/flint/functions/lib/_has-family-instance.scss +2 -0
- data/stylesheets/flint/functions/lib/_instance.scss +2 -0
- data/stylesheets/flint/functions/lib/_last.scss +2 -0
- data/stylesheets/flint/functions/lib/_list-to-string.scss +2 -0
- data/stylesheets/flint/functions/lib/_map-fetch.scss +2 -0
- data/stylesheets/flint/functions/lib/_next-index.scss +2 -0
- data/stylesheets/flint/functions/lib/_purge.scss +2 -0
- data/stylesheets/flint/functions/lib/_remove.scss +2 -0
- data/stylesheets/flint/functions/lib/_replace-substring.scss +2 -0
- data/stylesheets/flint/functions/lib/_replace.scss +2 -0
- data/stylesheets/flint/functions/lib/_steal-key.scss +2 -0
- data/stylesheets/flint/functions/lib/_steal-values.scss +2 -0
- data/stylesheets/flint/functions/lib/_string-to-list.scss +2 -0
- data/stylesheets/flint/functions/lib/_support-syntax-bem.scss +2 -0
- data/stylesheets/flint/functions/lib/_support-syntax.scss +2 -0
- data/stylesheets/flint/functions/lib/_types-in-list.scss +2 -0
- data/stylesheets/flint/functions/lib/_use-syntax.scss +2 -0
- data/stylesheets/flint/globals/_globals.scss +56 -8
- data/stylesheets/flint/mixins/lib/_box-sizing.scss +2 -0
- data/stylesheets/flint/mixins/lib/_calculate.scss +9 -5
- data/stylesheets/flint/mixins/lib/_clearfix.scss +2 -0
- data/stylesheets/flint/mixins/lib/_container.scss +2 -0
- data/stylesheets/flint/mixins/lib/_main.scss +45 -10
- data/stylesheets/flint/mixins/lib/_new-instance.scss +2 -0
- data/stylesheets/flint/mixins/lib/_print-instance.scss +4 -0
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 02a09b99c00123a921944c891d048c34e7e0b4a1
|
4
|
+
data.tar.gz: 97e2da293b83ff752d6d20f42bfd2e890893d8e4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c8a1542d622faccaa31b85cc8a9830a0e6505be79591f2bc8a523a7cea05322090564dabbc6ba7f1176c32d2353149b491d858b2d673faaa19119cfa96155251
|
7
|
+
data.tar.gz: f9d5b242956671f27b5486c0966d590206042bad5331a806a12360282fa0d673351ccd7936591e04bde12f5b0a0b7a0f356058f8d982e8cd38dbedf10b2d684a
|
data/README.md
CHANGED
@@ -36,17 +36,19 @@ Enjoy.
|
|
36
36
|
|
37
37
|
## Installation
|
38
38
|
|
39
|
-
1. Install via Ruby `gem install flint-gs`, or Bower `bower install flint --save-dev`
|
39
|
+
1. Install via Ruby `gem install flint-gs --pre`, or Bower `bower install flint --save-dev`
|
40
40
|
2. If you're using Compass, add `require "flint"` to your `config.rb`
|
41
41
|
3. Import it into your stylesheet with `@import "flint"`
|
42
42
|
|
43
|
-
If you're not using Compass, you can require
|
43
|
+
If you're not using Compass, you can require Flint and compile via:
|
44
44
|
```
|
45
45
|
scss --require ./lib/flint.rb example.scss > example.css
|
46
46
|
```
|
47
47
|
|
48
48
|
## Documentation
|
49
49
|
|
50
|
+
_Fully updated documentation on Flint `2.0` is coming soon. It will be housed on the [website](http:flint.gs) when the time comes. Keep an eye out!_
|
51
|
+
|
50
52
|
### Config
|
51
53
|
|
52
54
|
Getting up and running with Flint is simple: you can either configure your own grid, or use the default grid setup that ships with Flint. Being able to quickly configure a grid was at the forefront of my goals when developing Flint; and so it offers an immense configuration map, which is essentially a Sass map of all your project’s grid settings and breakpoints. You don’t have to mess with endless variables just to get your project up and running. Instead, you just create a single variable called `$flint`:
|
@@ -59,25 +61,24 @@ To begin, you can either use the default `config` (below) which comes baked in,
|
|
59
61
|
|
60
62
|
```scss
|
61
63
|
/**
|
62
|
-
* Configuration map
|
63
|
-
*
|
64
|
-
* @prop {Map} breakpoints - map of breakpoints, follow DSC order
|
65
|
-
* @prop {Map} breakpoints.alias - named map of breakpoint settings
|
66
|
-
* @prop {Number} breakpoints.alias.columns - column count for breakpoint
|
67
|
-
* @prop {Number} breakpoints.alias.breakpoint - breakpoint value for breakpoint
|
68
|
-
* @prop {Map} settings - map of settings for grid
|
69
|
-
* @prop {String} settings.default - alias of breakpoint to be grid default
|
70
|
-
* @prop {String} settings.grid - type of grid
|
71
|
-
* @prop {Number} settings.gutter - value for gutter
|
72
|
-
* @prop {String} settings.float-direction - direction of float
|
73
|
-
* @prop {Bool} settings.max-width - maximum width value
|
74
|
-
* @prop {Bool} settings.
|
75
|
-
* @prop {Bool} settings.
|
76
|
-
* @prop {Bool} settings.
|
77
|
-
* @prop {Bool} settings.
|
78
|
-
* @prop {Bool} settings.
|
79
|
-
|
80
|
-
*/
|
64
|
+
* Configuration map
|
65
|
+
*
|
66
|
+
* @prop {Map} breakpoints - map of breakpoints, follow DSC order
|
67
|
+
* @prop {Map} breakpoints.alias - named map of breakpoint settings
|
68
|
+
* @prop {Number} breakpoints.alias.columns - column count for breakpoint
|
69
|
+
* @prop {Number} breakpoints.alias.breakpoint - breakpoint value for breakpoint
|
70
|
+
* @prop {Map} settings - map of settings for grid
|
71
|
+
* @prop {String} settings.default - alias of breakpoint to be grid default
|
72
|
+
* @prop {String} settings.grid - type of grid
|
73
|
+
* @prop {Number} settings.gutter - value for gutter
|
74
|
+
* @prop {String} settings.float-direction - direction of float
|
75
|
+
* @prop {Bool} settings.max-width - maximum width value
|
76
|
+
* @prop {Bool} settings.center-container - center containers
|
77
|
+
* @prop {Bool} settings.border-box-sizing - use `box-sizing: border-box`
|
78
|
+
* @prop {Bool} settings.instance-maps - use instance maps for added features
|
79
|
+
* @prop {Bool} settings.support-syntax - support syntax within instance functions
|
80
|
+
* @prop {Bool} settings.debug-mode - enable debug mode
|
81
|
+
*/
|
81
82
|
$flint: (
|
82
83
|
"breakpoints": (
|
83
84
|
"desktop": (
|
data/lib/flint.rb
CHANGED
@@ -10,33 +10,30 @@ else
|
|
10
10
|
end
|
11
11
|
|
12
12
|
module Flint
|
13
|
-
VERSION = "2.0.0.rc.
|
14
|
-
DATE = "2014-09-
|
13
|
+
VERSION = "2.0.0.rc.2"
|
14
|
+
DATE = "2014-09-16"
|
15
15
|
end
|
16
16
|
|
17
|
-
# Custom functions
|
18
17
|
module Sass::Script::Functions
|
19
18
|
|
19
|
+
###
|
20
20
|
# Use ruby functions
|
21
|
-
#
|
21
|
+
#
|
22
|
+
# @return {Bool}
|
23
|
+
###
|
22
24
|
def flint_use_ruby()
|
23
25
|
Sass::Script::Bool.new(true)
|
24
26
|
end
|
25
27
|
|
26
|
-
|
27
|
-
# # ----
|
28
|
-
# # @return [string]
|
29
|
-
# def selector_string()
|
30
|
-
# Sass::Script::String.new(environment.selector.to_s)
|
31
|
-
# end
|
32
|
-
|
28
|
+
###
|
33
29
|
# Turns string into a flat list
|
34
|
-
#
|
35
|
-
# @param
|
36
|
-
# @param separator
|
37
|
-
# @param ignore
|
38
|
-
#
|
39
|
-
# @return
|
30
|
+
#
|
31
|
+
# @param {String} string - string
|
32
|
+
# @param {String} separator - item to find which separates substrings
|
33
|
+
# @param {String} ignore - removes remaining string beyond item
|
34
|
+
#
|
35
|
+
# @return {List}
|
36
|
+
###
|
40
37
|
def string_to_list(string, separator, ignore)
|
41
38
|
# Remove rest of string after ignore
|
42
39
|
ignore = string.value[/[^#{ignore}]+/]
|
@@ -50,19 +47,16 @@ module Sass::Script::Functions
|
|
50
47
|
end
|
51
48
|
end
|
52
49
|
|
50
|
+
###
|
53
51
|
# Replace substring
|
54
|
-
#
|
55
|
-
# @param
|
56
|
-
# @param find
|
57
|
-
# @param replace
|
58
|
-
#
|
59
|
-
# @return
|
52
|
+
#
|
53
|
+
# @param {String} string - string that contains substring
|
54
|
+
# @param {String} find - substring to replace
|
55
|
+
# @param {String} replace - new string to replace sub with
|
56
|
+
#
|
57
|
+
# @return {String}
|
58
|
+
###
|
60
59
|
def replace_substring(string, find, replace)
|
61
|
-
# Assert types
|
62
|
-
assert_type string, :String
|
63
|
-
assert_type find, :String
|
64
|
-
assert_type replace, :String
|
65
|
-
# Return new string
|
66
60
|
Sass::Script::String.new(string.value.gsub(find.value, replace.value))
|
67
61
|
end
|
68
62
|
|
@@ -11,7 +11,6 @@
|
|
11
11
|
* @prop {Number} settings.gutter - value for gutter
|
12
12
|
* @prop {String} settings.float-direction - direction of float
|
13
13
|
* @prop {Bool} settings.max-width - maximum width value
|
14
|
-
* @prop {Bool} settings.max-width - maximum width value
|
15
14
|
* @prop {Bool} settings.center-container - center containers
|
16
15
|
* @prop {Bool} settings.border-box-sizing - use `box-sizing: border-box`
|
17
16
|
* @prop {Bool} settings.instance-maps - use instance maps for added features
|
@@ -1,6 +1,8 @@
|
|
1
1
|
/**
|
2
2
|
* Returns truthiness of a value
|
3
3
|
*
|
4
|
+
* @access private
|
5
|
+
*
|
4
6
|
* @param {*} $value
|
5
7
|
*
|
6
8
|
* @return {Bool}
|
@@ -12,6 +14,8 @@
|
|
12
14
|
/**
|
13
15
|
* Checks if item is map
|
14
16
|
*
|
17
|
+
* @access private
|
18
|
+
*
|
15
19
|
* @param {Map} $n
|
16
20
|
*
|
17
21
|
* @return {Bool}
|
@@ -23,6 +27,8 @@
|
|
23
27
|
/**
|
24
28
|
* Checks if item is list
|
25
29
|
*
|
30
|
+
* @access private
|
31
|
+
*
|
26
32
|
* @param {List} $n
|
27
33
|
*
|
28
34
|
* @return {Bool}
|
@@ -34,6 +40,8 @@
|
|
34
40
|
/**
|
35
41
|
* Checks if item is number
|
36
42
|
*
|
43
|
+
* @access private
|
44
|
+
*
|
37
45
|
* @param {Number} $n
|
38
46
|
*
|
39
47
|
* @return {Bool}
|
@@ -45,6 +53,8 @@
|
|
45
53
|
/**
|
46
54
|
* Checks if item is string
|
47
55
|
*
|
56
|
+
* @access private
|
57
|
+
*
|
48
58
|
* @param {String} $n
|
49
59
|
*
|
50
60
|
* @return {Bool}
|
@@ -56,6 +66,8 @@
|
|
56
66
|
/**
|
57
67
|
* Checks if item is not string
|
58
68
|
*
|
69
|
+
* @access private
|
70
|
+
*
|
59
71
|
* @param {String} $n
|
60
72
|
*
|
61
73
|
* @return {Bool}
|
@@ -67,6 +79,8 @@
|
|
67
79
|
/**
|
68
80
|
* Get gutter value from config map
|
69
81
|
*
|
82
|
+
* @access private
|
83
|
+
*
|
70
84
|
* @return {Number}
|
71
85
|
*/
|
72
86
|
@function flint-get-gutter() {
|
@@ -76,6 +90,8 @@
|
|
76
90
|
/**
|
77
91
|
* Gets list of each breakpoint's key
|
78
92
|
*
|
93
|
+
* @access private
|
94
|
+
*
|
79
95
|
* @return {List}
|
80
96
|
*/
|
81
97
|
@function flint-get-all-keys() {
|
@@ -85,6 +101,8 @@
|
|
85
101
|
/**
|
86
102
|
* Gets list of all breakpoints
|
87
103
|
*
|
104
|
+
* @access private
|
105
|
+
*
|
88
106
|
* @return {List}
|
89
107
|
*/
|
90
108
|
@function flint-get-all-breakpoints() {
|
@@ -101,6 +119,8 @@
|
|
101
119
|
/**
|
102
120
|
* Checks if passed $key is the highest breakpoint
|
103
121
|
*
|
122
|
+
* @access private
|
123
|
+
*
|
104
124
|
* @param {String} $key - alias of breakpoint
|
105
125
|
*
|
106
126
|
* @return {Bool}
|
@@ -112,6 +132,8 @@
|
|
112
132
|
/**
|
113
133
|
* Checks if passed $key is the lowest breakpoint
|
114
134
|
*
|
135
|
+
* @access private
|
136
|
+
*
|
115
137
|
* @param {String} $key - alias of breakpoint
|
116
138
|
*
|
117
139
|
* @return {Bool}
|
@@ -123,6 +145,8 @@
|
|
123
145
|
/**
|
124
146
|
* Checks if $key is grid default
|
125
147
|
*
|
148
|
+
* @access private
|
149
|
+
*
|
126
150
|
* @param {String} $key - alias of breakpoint
|
127
151
|
*
|
128
152
|
* @return {Bool}
|
@@ -134,6 +158,8 @@
|
|
134
158
|
/**
|
135
159
|
* Gets all breakpoint column values
|
136
160
|
*
|
161
|
+
* @access private
|
162
|
+
*
|
137
163
|
* @return {List}
|
138
164
|
*/
|
139
165
|
@function flint-get-all-columns() {
|
@@ -150,6 +176,8 @@
|
|
150
176
|
/**
|
151
177
|
* Returns the unit used in config
|
152
178
|
*
|
179
|
+
* @access private
|
180
|
+
*
|
153
181
|
* @return {*}
|
154
182
|
*/
|
155
183
|
@function flint-get-config-unit() {
|
@@ -159,6 +187,8 @@
|
|
159
187
|
/**
|
160
188
|
* Convert pixel value to em
|
161
189
|
*
|
190
|
+
* @access private
|
191
|
+
*
|
162
192
|
* @param {Number} $target - pixel value
|
163
193
|
* @param {Number} $context - context to divide by
|
164
194
|
*
|
@@ -172,6 +202,8 @@
|
|
172
202
|
* Use Ruby functions in place of Sass functions where possible
|
173
203
|
* to speed up performance, especially with string functions
|
174
204
|
*
|
205
|
+
* @access private
|
206
|
+
*
|
175
207
|
* @return {Bool}
|
176
208
|
*/
|
177
209
|
@function flint-use-ruby-functions() {
|
@@ -1,6 +1,8 @@
|
|
1
1
|
/**
|
2
2
|
* Checks if instance flint-exists in selector familiy tree, falls back from current selector
|
3
3
|
*
|
4
|
+
* @access private
|
5
|
+
*
|
4
6
|
* @param {String} $key - breakpoint key to search for matching instance
|
5
7
|
* @param {String} $syntax - searches for instance using passed syntax parser
|
6
8
|
*
|
@@ -1,6 +1,8 @@
|
|
1
1
|
/**
|
2
2
|
* Keeps count of all instances with arguments, stores in global var
|
3
3
|
*
|
4
|
+
* @access private
|
5
|
+
*
|
4
6
|
* @param {String} $key - computed breakpoint of instance
|
5
7
|
* @param {Number} $span - computed span of instance
|
6
8
|
* @param {Number} $context - computed context of instance
|
@@ -1,52 +1,100 @@
|
|
1
1
|
/*
|
2
2
|
* Use development mode to silence fatal errors
|
3
|
+
*
|
4
|
+
* @access private
|
5
|
+
*
|
6
|
+
* @type {Bool}
|
3
7
|
*/
|
4
8
|
$flint__development-mode: false !global;
|
5
9
|
|
6
10
|
/*
|
7
|
-
* Set global variable to check if foundation has been
|
11
|
+
* Set global variable to check if foundation has been set
|
12
|
+
*
|
13
|
+
* @access private
|
14
|
+
*
|
15
|
+
* @type {String}
|
8
16
|
*/
|
9
17
|
$flint__foundation: "non-existent" !global;
|
10
18
|
|
11
19
|
/*
|
12
20
|
* Gather all keys, breakpoints and column counts
|
21
|
+
*
|
22
|
+
* @access private
|
23
|
+
*
|
24
|
+
* @type {List}
|
13
25
|
*/
|
14
|
-
$
|
15
|
-
$
|
16
|
-
$
|
26
|
+
$flint__all-keys: flint-get-all-keys() !global;
|
27
|
+
$flint__all-breakpoints: flint-get-all-breakpoints() !global;
|
28
|
+
$flint__all-columns: flint-get-all-columns() !global;
|
17
29
|
|
18
30
|
/*
|
19
|
-
* Keep
|
31
|
+
* Keep count of all instances
|
32
|
+
*
|
33
|
+
* @access private
|
34
|
+
*
|
35
|
+
* @type {Number}
|
20
36
|
*/
|
21
37
|
$flint__instance-count: 0 !global;
|
38
|
+
|
39
|
+
/*
|
40
|
+
* Keep map of all instances
|
41
|
+
*
|
42
|
+
* @access private
|
43
|
+
*
|
44
|
+
* @type {Map}
|
45
|
+
*/
|
22
46
|
$flint__instances: () !global;
|
23
47
|
|
24
48
|
/*
|
25
49
|
* Font size for em calculation
|
50
|
+
*
|
51
|
+
* @access private
|
52
|
+
*
|
53
|
+
* @type {Number}
|
26
54
|
*/
|
27
55
|
$flint__base-font-size: 16px !global;
|
28
56
|
|
29
57
|
/*
|
30
58
|
* Global syntax support
|
59
|
+
*
|
60
|
+
* @access private
|
61
|
+
*
|
62
|
+
* @type {String}
|
31
63
|
*/
|
32
64
|
$flint__support-syntax: flint-get-value("settings", "support-syntax") !global;
|
33
65
|
|
34
66
|
/*
|
35
67
|
* Detect if Ruby functions are available
|
68
|
+
*
|
69
|
+
* @access private
|
70
|
+
*
|
71
|
+
* @type {Bool}
|
36
72
|
*/
|
37
73
|
$flint__use-ruby-functions: if(flint-use-ruby-functions() == true, true, false) !global;
|
38
74
|
|
39
75
|
/*
|
40
|
-
*
|
76
|
+
* Cache selector instance lists
|
77
|
+
*
|
78
|
+
* @access private
|
79
|
+
*
|
80
|
+
* @type {Map}
|
41
81
|
*/
|
42
82
|
$flint__cached-instances: () !global;
|
43
83
|
|
44
84
|
/*
|
45
|
-
*
|
85
|
+
* Cache calculated values
|
86
|
+
*
|
87
|
+
* @access private
|
88
|
+
*
|
89
|
+
* @type {Map}
|
46
90
|
*/
|
47
91
|
$flint__cached-values: () !global;
|
48
92
|
|
49
93
|
/*
|
50
|
-
*
|
94
|
+
* Cache calculation results
|
95
|
+
*
|
96
|
+
* @access private
|
97
|
+
*
|
98
|
+
* @type {Map}
|
51
99
|
*/
|
52
100
|
$flint__cache-results: () !global;
|
@@ -1,9 +1,11 @@
|
|
1
1
|
/**
|
2
2
|
* Outputs calculated styles
|
3
3
|
*
|
4
|
-
* @
|
5
|
-
*
|
6
|
-
* @param {
|
4
|
+
* @access private
|
5
|
+
*
|
6
|
+
* @param {Map} $width - map of target / context values
|
7
|
+
* @param {Number} $margin-right - right margin value
|
8
|
+
* @param {Number} $margin-left - left margin value
|
7
9
|
*/
|
8
10
|
@mixin flint-output($width, $margin-right, $margin-left) {
|
9
11
|
|
@@ -29,6 +31,8 @@
|
|
29
31
|
/**
|
30
32
|
* Calculate widths, save all variables to instance
|
31
33
|
*
|
34
|
+
* @access private
|
35
|
+
*
|
32
36
|
* @param {String} $calc-key - breakpoint key
|
33
37
|
* @param {Number} $calc-span - span value
|
34
38
|
* @param {Number} $calc-context - context value
|
@@ -57,9 +61,9 @@
|
|
57
61
|
/*
|
58
62
|
* Check lengths, if invalid throw error
|
59
63
|
*/
|
60
|
-
@if flint-types-in-list($calc-gutter, "string") and length($calc-gutter) != length($
|
64
|
+
@if flint-types-in-list($calc-gutter, "string") and length($calc-gutter) != length($flint__all-keys) {
|
61
65
|
@if not $flint__development-mode {
|
62
|
-
@error "Invalid argument length of #{length($calc-gutter)} for gutter. If you're using a shorthand, please provide an argument for each breakpoint in your config (#{length($
|
66
|
+
@error "Invalid argument length of #{length($calc-gutter)} for gutter. If you're using a shorthand, please provide an argument for each breakpoint in your config (#{length($flint__all-keys)}). Your argument was: #{$calc-gutter}";
|
63
67
|
}
|
64
68
|
}
|
65
69
|
|
@@ -1,10 +1,15 @@
|
|
1
1
|
/**
|
2
2
|
* Main API
|
3
3
|
*
|
4
|
+
* @access public
|
5
|
+
*
|
4
6
|
* @param {String | Number | List} $key - key of breakpoint or shorthand span
|
5
7
|
* @param {String | Number | List} $span - value of span of column or shorthand context
|
6
|
-
* @param {Number | List}
|
8
|
+
* @param {String | Number | List} $context - context value of span
|
7
9
|
* @param {String | List} $gutter - alias for gutter modifier
|
10
|
+
*
|
11
|
+
* @author Ezekiel Gabrielse
|
12
|
+
* @link http://flint.gs
|
8
13
|
*/
|
9
14
|
@mixin _(
|
10
15
|
$key: null,
|
@@ -19,6 +24,9 @@
|
|
19
24
|
* else falls back to packaged.
|
20
25
|
*
|
21
26
|
* @param {String}
|
27
|
+
*
|
28
|
+
* @example scss
|
29
|
+
* _(clear)
|
22
30
|
*/
|
23
31
|
@if $key == "clear" or $span == "clear" or $context == "clear" {
|
24
32
|
|
@@ -68,6 +76,9 @@
|
|
68
76
|
* else falls back to packaged.
|
69
77
|
*
|
70
78
|
* @param {String}
|
79
|
+
*
|
80
|
+
* @example scss
|
81
|
+
* _(foundation)
|
71
82
|
*/
|
72
83
|
@if $key == "foundation" {
|
73
84
|
|
@@ -90,6 +101,9 @@
|
|
90
101
|
* Container instance
|
91
102
|
*
|
92
103
|
* @param {String}
|
104
|
+
*
|
105
|
+
* @example scss
|
106
|
+
* _(container)
|
93
107
|
*/
|
94
108
|
} @else if $key == "container" or $span == "container" or $context == "container" {
|
95
109
|
|
@@ -103,7 +117,7 @@
|
|
103
117
|
*/
|
104
118
|
@if $key == "container" and flint-get-value("settings", "grid") == "fixed" {
|
105
119
|
|
106
|
-
@for $i from 1 through length($
|
120
|
+
@for $i from 1 through length($flint__all-keys) {
|
107
121
|
|
108
122
|
// Set up variables
|
109
123
|
$calc-key: flint-steal-key($i);
|
@@ -196,10 +210,13 @@
|
|
196
210
|
}
|
197
211
|
|
198
212
|
/**
|
199
|
-
* Recursive shorthand with
|
213
|
+
* Recursive shorthand with no context
|
200
214
|
*
|
201
215
|
* @param {Number} $key - single span value for all breakpoints
|
202
216
|
* @param {Null} $span - null context value
|
217
|
+
*
|
218
|
+
* @example scss
|
219
|
+
* _(2)
|
203
220
|
*/
|
204
221
|
@if flint-is-number($key) and length($key) == 1 and $span == null
|
205
222
|
|
@@ -208,6 +225,9 @@
|
|
208
225
|
*
|
209
226
|
* @param {Number} $key - single span value for all breakpoints
|
210
227
|
* @param {Number | String} $span - single context value for all breakpoints
|
228
|
+
*
|
229
|
+
* @example scss
|
230
|
+
* _(2, 4)
|
211
231
|
*/
|
212
232
|
or flint-is-number($key) and length($key) == 1 and flint-is-number($span) and length($span) == 1
|
213
233
|
or flint-is-number($key) and length($key) == 1 and $span == "auto"
|
@@ -218,6 +238,9 @@
|
|
218
238
|
* @param {Number} $key - single span value for all breakpoints
|
219
239
|
* @param {List | String} $span - context value of span for each breakpoint
|
220
240
|
*
|
241
|
+
* @example scss
|
242
|
+
* _(1, 2 4 6 8) | _(1, auto)
|
243
|
+
*
|
221
244
|
* @throws error if lengths do not match number of breakpoints
|
222
245
|
*/
|
223
246
|
or flint-is-number($key) and length($key) == 1 and flint-types-in-list($span, "number")
|
@@ -229,6 +252,9 @@
|
|
229
252
|
* @param {List} $key - span value for each breakpoint
|
230
253
|
* @param {Null} $span - null context value
|
231
254
|
*
|
255
|
+
* @example scss
|
256
|
+
* _(1 2 3 4)
|
257
|
+
*
|
232
258
|
* @throws error if lengths do not match number of breakpoints
|
233
259
|
*/
|
234
260
|
or flint-types-in-list($key, "number") and $span == null
|
@@ -237,7 +263,10 @@
|
|
237
263
|
* Variable shorthand with context
|
238
264
|
*
|
239
265
|
* @param {List} $key - span value for each breakpoint
|
240
|
-
* @param {List} $span - context value for each breakpoint
|
266
|
+
* @param {List | String} $span - context value for each breakpoint
|
267
|
+
*
|
268
|
+
* @example scss
|
269
|
+
* _(1 2 3 4, 2 4 6 8) | _(1 2 3 4, auto)
|
241
270
|
*
|
242
271
|
* @throws error if lengths do not match number of breakpoints
|
243
272
|
*/
|
@@ -245,17 +274,17 @@
|
|
245
274
|
or flint-types-in-list($key, "number") and $span == "auto" {
|
246
275
|
|
247
276
|
// Emit erroring for invalid argument lengths
|
248
|
-
@if flint-types-in-list($key, "number") and length($key) != length($
|
277
|
+
@if flint-types-in-list($key, "number") and length($key) != length($flint__all-keys) {
|
249
278
|
@if not $flint__development-mode {
|
250
|
-
@error "Invalid argument length of #{length($key)} for span. Please provide an argument for each breakpoint in your config (#{length($
|
279
|
+
@error "Invalid argument length of #{length($key)} for span. Please provide an argument for each breakpoint in your config (#{length($flint__all-keys)}). Your argument was: #{$key}";
|
251
280
|
}
|
252
|
-
} @else if flint-types-in-list($span, "number") and length($span) != length($
|
281
|
+
} @else if flint-types-in-list($span, "number") and length($span) != length($flint__all-keys) {
|
253
282
|
@if not $flint__development-mode {
|
254
|
-
@error "Invalid argument length of #{length($span)} for context. Please provide an argument for each breakpoint in your config (#{length($
|
283
|
+
@error "Invalid argument length of #{length($span)} for context. Please provide an argument for each breakpoint in your config (#{length($flint__all-keys)}). Your argument was: #{$span}";
|
255
284
|
}
|
256
285
|
} @else {
|
257
286
|
|
258
|
-
@for $i from 1 through length($
|
287
|
+
@for $i from 1 through length($flint__all-keys) {
|
259
288
|
|
260
289
|
$calc-key: flint-steal-key($i);
|
261
290
|
$calc-span: $key;
|
@@ -326,17 +355,23 @@
|
|
326
355
|
* @param {Number} $span - span value for breakpoint
|
327
356
|
* @param {Null} $context - null context value
|
328
357
|
*
|
358
|
+
* @example scss
|
359
|
+
* _(desktop, 2)
|
360
|
+
*
|
329
361
|
* @throws error if breakpoint alias does not exist
|
330
362
|
*/
|
331
363
|
} @else if flint-is-string($key) and flint-is-number($span) and $context == null
|
332
364
|
|
333
365
|
/**
|
334
|
-
*
|
366
|
+
* Call by alias with context
|
335
367
|
*
|
336
368
|
* @param {String} $key - breakpoint alias
|
337
369
|
* @param {Number} $span - span value for breakpoint
|
338
370
|
* @param {Number | String} $context - context value for breakpoint
|
339
371
|
*
|
372
|
+
* @example scss
|
373
|
+
* _(desktop, 2, 4)
|
374
|
+
*
|
340
375
|
* @throws error if breakpoint alias does not exist
|
341
376
|
*/
|
342
377
|
or flint-is-string($key) and flint-is-number($span) and flint-is-number($context)
|
@@ -1,6 +1,8 @@
|
|
1
1
|
/**
|
2
2
|
* Prints debug properties
|
3
3
|
*
|
4
|
+
* @access private
|
5
|
+
*
|
4
6
|
* @param {String} $calc-key - breakpoint key to search for instance
|
5
7
|
*/
|
6
8
|
@mixin flint-debug-instance($calc-key) {
|
@@ -16,6 +18,8 @@
|
|
16
18
|
/**
|
17
19
|
* Prints all contents of instance map
|
18
20
|
*
|
21
|
+
* @access private
|
22
|
+
*
|
19
23
|
* @param {Map} $instance - instance map
|
20
24
|
*/
|
21
25
|
@mixin flint-print-instance($instance) {
|
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: 2.0.0.rc.
|
4
|
+
version: 2.0.0.rc.2
|
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-09-
|
11
|
+
date: 2014-09-16 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
|
27
|
+
description: Flint is a highly advanced Sass grid framework designed for rapid responsive
|
28
28
|
development.
|
29
29
|
email:
|
30
30
|
- ezekg@yahoo.com
|
@@ -95,5 +95,5 @@ rubyforge_project: flint
|
|
95
95
|
rubygems_version: 2.0.14
|
96
96
|
signing_key:
|
97
97
|
specification_version: 4
|
98
|
-
summary: A
|
98
|
+
summary: A highly advanced Sass grid framework designed for rapid responsive development.
|
99
99
|
test_files: []
|