flint-gs 1.7.1 → 1.7.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE +21 -21
- data/README.md +906 -906
- data/lib/flint.rb +67 -77
- data/stylesheets/_flint.scss +6 -6
- data/stylesheets/flint/config/_config.scss +83 -83
- data/stylesheets/flint/functions/_functions.scss +40 -41
- data/stylesheets/flint/functions/helpers/_helpers.scss +181 -181
- data/stylesheets/flint/functions/lib/_calc-breakpoint.scss +33 -33
- data/stylesheets/flint/functions/lib/_calc-margin.scss +57 -57
- data/stylesheets/flint/functions/lib/_calc-width.scss +50 -50
- data/stylesheets/flint/functions/lib/_exists.scss +22 -22
- data/stylesheets/flint/functions/lib/_fluid-width.scss +10 -10
- data/stylesheets/flint/functions/lib/_get-index.scss +13 -13
- data/stylesheets/flint/functions/lib/_get-instance-value.scss +17 -17
- data/stylesheets/flint/functions/lib/_get-value.scss +14 -14
- data/stylesheets/flint/functions/lib/_has-family-instance.scss +74 -74
- data/stylesheets/flint/functions/lib/_instance.scss +46 -46
- data/stylesheets/flint/functions/lib/_last.scss +9 -9
- data/stylesheets/flint/functions/lib/_list-to-string.scss +25 -25
- data/stylesheets/flint/functions/lib/_map-fetch.scss +30 -30
- data/stylesheets/flint/functions/lib/_next-index.scss +15 -15
- data/stylesheets/flint/functions/lib/_purge.scss +19 -19
- data/stylesheets/flint/functions/lib/_remove.scss +13 -13
- data/stylesheets/flint/functions/lib/_replace-substring.scss +34 -34
- data/stylesheets/flint/functions/lib/_replace.scss +25 -25
- data/stylesheets/flint/functions/lib/_steal-key.scss +13 -13
- data/stylesheets/flint/functions/lib/_steal-values.scss +14 -14
- data/stylesheets/flint/functions/lib/_string-to-list.scss +90 -90
- data/stylesheets/flint/functions/lib/_support-syntax-bem.scss +31 -31
- data/stylesheets/flint/functions/lib/_support-syntax.scss +28 -28
- data/stylesheets/flint/functions/lib/_types-in-list.scss +119 -119
- data/stylesheets/flint/functions/lib/_use-syntax.scss +14 -14
- data/stylesheets/flint/globals/_globals.scss +38 -38
- data/stylesheets/flint/mixins/_mixins.scss +7 -7
- data/stylesheets/flint/mixins/lib/_calculate.scss +571 -571
- data/stylesheets/flint/mixins/lib/_clearfix.scss +19 -19
- data/stylesheets/flint/mixins/lib/_main.scss +935 -935
- data/stylesheets/flint/mixins/lib/_new-instance.scss +27 -27
- data/stylesheets/flint/mixins/lib/_print-instance.scss +42 -42
- metadata +16 -23
- data/stylesheets/flint/functions/lib/_string-to-number.scss +0 -77
@@ -1,27 +1,27 @@
|
|
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) {
|
15
|
-
$flint__instances:
|
16
|
-
flint-instance(
|
17
|
-
$calc-key,
|
18
|
-
$calc-span,
|
19
|
-
$calc-context,
|
20
|
-
$calc-gutter,
|
21
|
-
$calc-shift,
|
22
|
-
$output-width,
|
23
|
-
$output-margin-right,
|
24
|
-
$output-margin-left
|
25
|
-
)
|
26
|
-
!global;
|
27
|
-
}
|
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) {
|
15
|
+
$flint__instances:
|
16
|
+
flint-instance(
|
17
|
+
$calc-key,
|
18
|
+
$calc-span,
|
19
|
+
$calc-context,
|
20
|
+
$calc-gutter,
|
21
|
+
$calc-shift,
|
22
|
+
$output-width,
|
23
|
+
$output-margin-right,
|
24
|
+
$output-margin-left
|
25
|
+
)
|
26
|
+
!global;
|
27
|
+
}
|
@@ -1,42 +1,42 @@
|
|
1
|
-
// Prints debug properties
|
2
|
-
// -------------------------------------------------------------------------------
|
3
|
-
// @dependence `flint-print-instance()`
|
4
|
-
// -------------------------------------------------------------------------------
|
5
|
-
// @param $calc-key [string] : breakpoint key to search for instance
|
6
|
-
// -------------------------------------------------------------------------------
|
7
|
-
// @output instance map
|
8
|
-
|
9
|
-
@mixin flint-debug-instance($calc-key) {
|
10
|
-
@if flint-get-value("settings", "debug-mode") {
|
11
|
-
// Lets clean up the selector a bit...
|
12
|
-
$selector-string: selector_string();
|
13
|
-
$selector-list: flint-string-to-list($selector-string);
|
14
|
-
$selector-cleaned: flint-list-to-string($selector-list, " ");
|
15
|
-
|
16
|
-
$printKey: "#{$selector-cleaned}" + "::" + "#{$calc-key}";
|
17
|
-
@include flint-print-instance( map-get( $flint__instances, unquote($printKey) ) );
|
18
|
-
}
|
19
|
-
}
|
20
|
-
|
21
|
-
// Prints all contents of instance
|
22
|
-
// -------------------------------------------------------------------------------
|
23
|
-
// @param $instance [map] : instance
|
24
|
-
// -------------------------------------------------------------------------------
|
25
|
-
// @output instance map
|
26
|
-
|
27
|
-
@mixin flint-print-instance($instance) {
|
28
|
-
|
29
|
-
// Loop through each property in passed instance
|
30
|
-
@each $property, $value in $instance {
|
31
|
-
|
32
|
-
// Check if value is output map
|
33
|
-
@if flint-is-map($value) {
|
34
|
-
@each $p, $v in $value {
|
35
|
-
-flint-output-#{$p}: #{$v};
|
36
|
-
}
|
37
|
-
// Else, print values as flagged comments
|
38
|
-
} @else {
|
39
|
-
-flint-#{$property}: #{$value};
|
40
|
-
}
|
41
|
-
}
|
42
|
-
}
|
1
|
+
// Prints debug properties
|
2
|
+
// -------------------------------------------------------------------------------
|
3
|
+
// @dependence `flint-print-instance()`
|
4
|
+
// -------------------------------------------------------------------------------
|
5
|
+
// @param $calc-key [string] : breakpoint key to search for instance
|
6
|
+
// -------------------------------------------------------------------------------
|
7
|
+
// @output instance map
|
8
|
+
|
9
|
+
@mixin flint-debug-instance($calc-key) {
|
10
|
+
@if flint-get-value("settings", "debug-mode") {
|
11
|
+
// Lets clean up the selector a bit...
|
12
|
+
$selector-string: selector_string();
|
13
|
+
$selector-list: flint-string-to-list($selector-string);
|
14
|
+
$selector-cleaned: flint-list-to-string($selector-list, " ");
|
15
|
+
|
16
|
+
$printKey: "#{$selector-cleaned}" + "::" + "#{$calc-key}";
|
17
|
+
@include flint-print-instance( map-get( $flint__instances, unquote($printKey) ) );
|
18
|
+
}
|
19
|
+
}
|
20
|
+
|
21
|
+
// Prints all contents of instance
|
22
|
+
// -------------------------------------------------------------------------------
|
23
|
+
// @param $instance [map] : instance
|
24
|
+
// -------------------------------------------------------------------------------
|
25
|
+
// @output instance map
|
26
|
+
|
27
|
+
@mixin flint-print-instance($instance) {
|
28
|
+
|
29
|
+
// Loop through each property in passed instance
|
30
|
+
@each $property, $value in $instance {
|
31
|
+
|
32
|
+
// Check if value is output map
|
33
|
+
@if flint-is-map($value) {
|
34
|
+
@each $p, $v in $value {
|
35
|
+
-flint-output-#{$p}: #{$v};
|
36
|
+
}
|
37
|
+
// Else, print values as flagged comments
|
38
|
+
} @else {
|
39
|
+
-flint-#{$property}: #{$value};
|
40
|
+
}
|
41
|
+
}
|
42
|
+
}
|
metadata
CHANGED
@@ -1,46 +1,41 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flint-gs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.7.
|
5
|
-
prerelease:
|
4
|
+
version: 1.7.2
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Ezekiel Gabrielse
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2014-07-
|
11
|
+
date: 2014-07-14 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: sass
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - ">="
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: 3.3.0
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- -
|
24
|
+
- - ">="
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: 3.3.0
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: compass
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
|
-
- -
|
31
|
+
- - ">="
|
36
32
|
- !ruby/object:Gem::Version
|
37
33
|
version: 0.12.1
|
38
34
|
type: :runtime
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
|
-
- -
|
38
|
+
- - ">="
|
44
39
|
- !ruby/object:Gem::Version
|
45
40
|
version: 0.12.1
|
46
41
|
description: Flint is designed to be a flexible layout toolkit that developers can
|
@@ -51,8 +46,12 @@ executables: []
|
|
51
46
|
extensions: []
|
52
47
|
extra_rdoc_files: []
|
53
48
|
files:
|
49
|
+
- LICENSE
|
50
|
+
- README.md
|
54
51
|
- lib/flint.rb
|
52
|
+
- stylesheets/_flint.scss
|
55
53
|
- stylesheets/flint/config/_config.scss
|
54
|
+
- stylesheets/flint/functions/_functions.scss
|
56
55
|
- stylesheets/flint/functions/helpers/_helpers.scss
|
57
56
|
- stylesheets/flint/functions/lib/_calc-breakpoint.scss
|
58
57
|
- stylesheets/flint/functions/lib/_calc-margin.scss
|
@@ -75,45 +74,39 @@ files:
|
|
75
74
|
- stylesheets/flint/functions/lib/_steal-key.scss
|
76
75
|
- stylesheets/flint/functions/lib/_steal-values.scss
|
77
76
|
- stylesheets/flint/functions/lib/_string-to-list.scss
|
78
|
-
- stylesheets/flint/functions/lib/_string-to-number.scss
|
79
77
|
- stylesheets/flint/functions/lib/_support-syntax-bem.scss
|
80
78
|
- stylesheets/flint/functions/lib/_support-syntax.scss
|
81
79
|
- stylesheets/flint/functions/lib/_types-in-list.scss
|
82
80
|
- stylesheets/flint/functions/lib/_use-syntax.scss
|
83
|
-
- stylesheets/flint/functions/_functions.scss
|
84
81
|
- stylesheets/flint/globals/_globals.scss
|
82
|
+
- stylesheets/flint/mixins/_mixins.scss
|
85
83
|
- stylesheets/flint/mixins/lib/_calculate.scss
|
86
84
|
- stylesheets/flint/mixins/lib/_clearfix.scss
|
87
85
|
- stylesheets/flint/mixins/lib/_main.scss
|
88
86
|
- stylesheets/flint/mixins/lib/_new-instance.scss
|
89
87
|
- stylesheets/flint/mixins/lib/_print-instance.scss
|
90
|
-
- stylesheets/flint/mixins/_mixins.scss
|
91
|
-
- stylesheets/_flint.scss
|
92
|
-
- LICENSE
|
93
|
-
- README.md
|
94
88
|
homepage: https://github.com/ezekg/flint/
|
95
89
|
licenses:
|
96
90
|
- MIT
|
91
|
+
metadata: {}
|
97
92
|
post_install_message:
|
98
93
|
rdoc_options: []
|
99
94
|
require_paths:
|
100
95
|
- lib
|
101
96
|
required_ruby_version: !ruby/object:Gem::Requirement
|
102
|
-
none: false
|
103
97
|
requirements:
|
104
|
-
- -
|
98
|
+
- - ">="
|
105
99
|
- !ruby/object:Gem::Version
|
106
100
|
version: '0'
|
107
101
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
108
|
-
none: false
|
109
102
|
requirements:
|
110
|
-
- -
|
103
|
+
- - ">="
|
111
104
|
- !ruby/object:Gem::Version
|
112
105
|
version: 1.3.6
|
113
106
|
requirements: []
|
114
107
|
rubyforge_project: flint
|
115
|
-
rubygems_version:
|
108
|
+
rubygems_version: 2.2.2
|
116
109
|
signing_key:
|
117
|
-
specification_version:
|
110
|
+
specification_version: 4
|
118
111
|
summary: A powerful Sass grid-system designed for complex responsive layouts.
|
119
112
|
test_files: []
|
@@ -1,77 +0,0 @@
|
|
1
|
-
// Converts number[unit] string into value
|
2
|
-
// -------------------------------------------------------------------------------
|
3
|
-
// @documentation http://hugogiraudel.com/2014/01/15/sass-string-to-number/
|
4
|
-
// -------------------------------------------------------------------------------
|
5
|
-
// @param $number [string] : number
|
6
|
-
// @param $unit [string] : unit
|
7
|
-
// -------------------------------------------------------------------------------
|
8
|
-
// @return [number]
|
9
|
-
|
10
|
-
@function flint-num-length($number, $unit) {
|
11
|
-
$strings: 'px' 'cm' 'mm' '%' 'ch' 'pica' 'in' 'em' 'rem' 'pt' 'pc' 'ex' 'vw' 'vh' 'vmin' 'vmax';
|
12
|
-
$units: 1px 1cm 1mm 1% 1ch 1pica 1in 1em 1rem 1pt 1pc 1ex 1vw 1vh 1vmin 1vmax;
|
13
|
-
$index: index($strings, $unit);
|
14
|
-
|
15
|
-
@if not $index {
|
16
|
-
@warn "Unknown unit `#{$unit}`.";
|
17
|
-
@return false;
|
18
|
-
}
|
19
|
-
|
20
|
-
@return $number * nth($units, $index);
|
21
|
-
}
|
22
|
-
|
23
|
-
// Converts string to number
|
24
|
-
// -------------------------------------------------------------------------------
|
25
|
-
// @documentation http://hugogiraudel.com/2014/01/15/sass-string-to-number/
|
26
|
-
// -------------------------------------------------------------------------------
|
27
|
-
// @param $string [string] : string
|
28
|
-
// -------------------------------------------------------------------------------
|
29
|
-
// @return [number]
|
30
|
-
|
31
|
-
@function flint-to-number($string) {
|
32
|
-
// Use Ruby function if available
|
33
|
-
@if $flint__use-ruby-functions {
|
34
|
-
@return string_to_number($string);
|
35
|
-
} @else {
|
36
|
-
// Matrices
|
37
|
-
$strings: '0' '1' '2' '3' '4' '5' '6' '7' '8' '9';
|
38
|
-
$numbers: 0 1 2 3 4 5 6 7 8 9;
|
39
|
-
|
40
|
-
// Result
|
41
|
-
$result: 0;
|
42
|
-
$divider: 0;
|
43
|
-
$minus: false;
|
44
|
-
|
45
|
-
// Looping through all characters
|
46
|
-
@for $i from 1 through str-length($string) {
|
47
|
-
$character: str-slice($string, $i, $i);
|
48
|
-
$index: index($strings, $character);
|
49
|
-
|
50
|
-
@if $character == '-' {
|
51
|
-
$minus: true;
|
52
|
-
} @else if $character == '.' {
|
53
|
-
$divider: 1;
|
54
|
-
} @else {
|
55
|
-
|
56
|
-
@if not $index {
|
57
|
-
$result: if($minus, $result * -1, $result);
|
58
|
-
@return flint-num-length($result, str-slice($string, $i));
|
59
|
-
}
|
60
|
-
|
61
|
-
$number: nth($numbers, $index);
|
62
|
-
|
63
|
-
@if $divider == 0 {
|
64
|
-
$result: $result * 10;
|
65
|
-
} @else {
|
66
|
-
// Move the decimal dot to the left
|
67
|
-
$divider: $divider * 10;
|
68
|
-
$number: $number / $divider;
|
69
|
-
}
|
70
|
-
|
71
|
-
$result: $result + $number;
|
72
|
-
}
|
73
|
-
}
|
74
|
-
|
75
|
-
@return if($minus, $result * -1, $result);
|
76
|
-
}
|
77
|
-
}
|