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.
- checksums.yaml +4 -4
- data/README.md +71 -207
- data/lib/flint.rb +8 -8
- data/stylesheets/_flint.scss +3 -2
- data/stylesheets/flint/config/_config.scss +37 -68
- data/stylesheets/flint/functions/_functions.scss +15 -7
- data/stylesheets/flint/functions/helpers/_helpers.scss +115 -117
- data/stylesheets/flint/functions/lib/_calc-breakpoint.scss +23 -32
- data/stylesheets/flint/functions/lib/_calc-width.scss +40 -26
- data/stylesheets/flint/functions/lib/_exists.scss +8 -7
- data/stylesheets/flint/functions/lib/_fluid-width.scss +8 -7
- data/stylesheets/flint/functions/lib/_get-index.scss +12 -10
- data/stylesheets/flint/functions/lib/_get-instance-value.scss +10 -16
- data/stylesheets/flint/functions/lib/_get-value.scss +9 -13
- data/stylesheets/flint/functions/lib/_has-family-instance.scss +21 -20
- data/stylesheets/flint/functions/lib/_instance.scss +19 -22
- data/stylesheets/flint/functions/lib/_last.scss +7 -6
- data/stylesheets/flint/functions/lib/_list-to-string.scss +11 -9
- data/stylesheets/flint/functions/lib/_map-fetch.scss +13 -19
- data/stylesheets/flint/functions/lib/_next-index.scss +9 -14
- data/stylesheets/flint/functions/lib/_purge.scss +9 -8
- data/stylesheets/flint/functions/lib/_remove.scss +11 -10
- data/stylesheets/flint/functions/lib/_replace-substring.scss +9 -8
- data/stylesheets/flint/functions/lib/_replace.scss +11 -10
- data/stylesheets/flint/functions/lib/_steal-key.scss +24 -13
- data/stylesheets/flint/functions/lib/_steal-values.scss +9 -12
- data/stylesheets/flint/functions/lib/_string-to-list.scss +11 -10
- data/stylesheets/flint/functions/lib/_support-syntax-bem.scss +10 -9
- data/stylesheets/flint/functions/lib/_support-syntax.scss +14 -12
- data/stylesheets/flint/functions/lib/_types-in-list.scss +9 -8
- data/stylesheets/flint/functions/lib/_use-syntax.scss +12 -8
- data/stylesheets/flint/globals/_globals.scss +35 -21
- data/stylesheets/flint/mixins/_mixins.scss +3 -2
- data/stylesheets/flint/mixins/lib/_box-sizing.scss +7 -7
- data/stylesheets/flint/mixins/lib/_calculate.scss +112 -583
- data/stylesheets/flint/mixins/lib/_clearfix.scss +7 -7
- data/stylesheets/flint/mixins/lib/_container.scss +6 -12
- data/stylesheets/flint/mixins/lib/_main.scss +271 -202
- data/stylesheets/flint/mixins/lib/_new-instance.scss +12 -15
- data/stylesheets/flint/mixins/lib/_print-instance.scss +16 -20
- metadata +3 -4
- data/stylesheets/flint/functions/lib/_calc-margin.scss +0 -57
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4395d92039fd59ac3d1a014a9be9da91de0b572a
|
4
|
+
data.tar.gz: 7b9b29f7cdfbfad0c3222517171d1b559578e67f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 215c6c6d3c6b81878958aa133adb5eb369ac1645b5d76ca8fc64e5cc807549cd976cb2dcff9570dda67eb2eeb2fa3f933aa2dc5125f2b0528429ac626edbf668
|
7
|
+
data.tar.gz: 125c5148f136d0842f6ef5496539544c549a1d313b9d8c44ca0f23d603646861018f8ea9cb487d9f9e1f07524bea416ad4bcfe21dd587e37a33eb0e8ca3f0f2c
|
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
[![Gem Version](https://badge.fury.io/rb/flint-gs.svg)](http://badge.fury.io/rb/flint-gs)
|
4
4
|
|
5
|
-
|
5
|
+
Flint is a responsive grid system written in Sass, created to allow developers to rapidly produce responsive layouts that are built on a sophisticated foundation. Being a designer myself, a large amount of time was spent on the syntax itself. Flint is very unique in the fact that it uses only a single mixin for all output: `_( )`. Yes, it really is just simply an underscore. Easy to remember, huh? It shoves the function mumbo-jumbo out of the way and allows us to focus on the aspect that matters most: the layout. [Check out this short introduction over at Sitepoint.com](http://www.sitepoint.com/rapid-responsive-development-sass-flint/).
|
6
6
|
|
7
7
|
Take it for a spin on [SassMeister.com](http://sassmeister.com/gist/228449011362bcdfe38c)!
|
8
8
|
|
@@ -25,16 +25,14 @@ Enjoy.
|
|
25
25
|
* [Wrapping in media queries](#wrapping-in-media-queries)
|
26
26
|
* [Call by alias](#call-by-alias)
|
27
27
|
* [Gutter modifiers](#gutter-modifiers)
|
28
|
-
* [Shift modifiers](#shift) _[Deprecated]_
|
29
28
|
1. [Syntax support](#syntax-support)
|
29
|
+
1. [Support](#support)
|
30
30
|
1. [Authors](#authors)
|
31
31
|
1. [License](#license)
|
32
32
|
|
33
33
|
## Requirements
|
34
34
|
|
35
|
-
* Sass ~> `3.
|
36
|
-
|
37
|
-
_Currently, Flint is only available for Ruby Sass; so it will not work with libSass until they support the map data-type. Flint depends on a few custom Ruby functions, but in `2.0` I hope to have those dependencies relieved._
|
35
|
+
* Sass ~> `3.4.0`
|
38
36
|
|
39
37
|
## Installation
|
40
38
|
|
@@ -42,8 +40,6 @@ _Currently, Flint is only available for Ruby Sass; so it will not work with libS
|
|
42
40
|
2. If you're using Compass, add `require "flint"` to your `config.rb`
|
43
41
|
3. Import it into your stylesheet with `@import "flint"`
|
44
42
|
|
45
|
-
If you don't want to install it, then simply download or clone the current build files. Use your `config.rb` to require any custom functions Flint uses; currently this is required, as we're making use of custom SassScript functions until the SassScript `&` [returns to Sass](https://gist.github.com/nex3/8050187) **(set for integration with Sass `3.4` in `2.0`)**. Adjust the paths according to your project.
|
46
|
-
|
47
43
|
If you're not using Compass, you can require the custom Ruby functions and compile via:
|
48
44
|
```
|
49
45
|
scss --require ./lib/flint.rb example.scss > example.css
|
@@ -53,99 +49,66 @@ scss --require ./lib/flint.rb example.scss > example.css
|
|
53
49
|
|
54
50
|
### Config
|
55
51
|
|
56
|
-
|
57
|
-
|
58
|
-
Speaking of not being like most frameworks, Flint does not require you to set a ridiculous amount of variables just to use a single breakpoint. It actually doesn't require you to set *any* variables. It also doesn't require you to install a seperate extension so that you can define your breakpoints; *all of these features are baked into Flint.* Your columns are fully related to your breakpoints, so that there is never any confusion and everything is kept nice and simple.
|
52
|
+
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
53
|
|
60
54
|
##### Usage
|
61
55
|
|
62
|
-
To begin, you can either use the default `config` (below) which comes baked in, or you can define your own using the `$flint` variable, using the default config as a template. Settings may be entered in `px` or `em`, and Flint will do the rest.
|
56
|
+
To begin, you can either use the default `config` (below) which comes baked in, or you can define your own using the `$flint` variable, using the default config as a template. Settings may be entered in `px` or `em`, and Flint will do the rest. One of the immediate advantages of using Flint is that it allows you to create an unlimited number of breakpoints for your project, with any alias that you want. If you like to call your breakpoints crazy names like ‘high-tide’ or ‘ex-presidents’, that’s completely fine with me.
|
63
57
|
|
64
58
|
*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.*
|
65
59
|
|
66
60
|
```scss
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
61
|
+
/**
|
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.max-width - maximum width value
|
75
|
+
* @prop {Bool} settings.center-container - center containers
|
76
|
+
* @prop {Bool} settings.border-box-sizing - use `box-sizing: border-box`
|
77
|
+
* @prop {Bool} settings.instance-maps - use instance maps for added features
|
78
|
+
* @prop {Bool} settings.support-syntax - support syntax within instance functions
|
79
|
+
* @prop {Bool} settings.debug-mode - enable debug mode
|
80
|
+
*/
|
86
81
|
$flint: (
|
87
|
-
|
88
|
-
// Grid configuration
|
89
|
-
"config": (
|
90
|
-
|
91
|
-
// Define breakpoints [any amount of breakpoints]
|
92
|
-
// Any alias you like, minus reserved Flint words [i.e. "settings", "config", etc.]
|
82
|
+
"breakpoints": (
|
93
83
|
"desktop": (
|
94
|
-
|
95
|
-
// Options: 0-infinity
|
96
84
|
"columns": 16,
|
97
|
-
|
98
|
-
// Options: number[unit]
|
99
|
-
"breakpoint": 80em,
|
85
|
+
"breakpoint": 80em
|
100
86
|
),
|
101
|
-
|
102
|
-
// Same applies for other breakpoints
|
103
|
-
// ----
|
104
|
-
// Remember, you're not fixed to just 4 breakpoints like we have here
|
105
87
|
"laptop": (
|
106
88
|
"columns": 12,
|
107
|
-
"breakpoint": 60em
|
89
|
+
"breakpoint": 60em
|
108
90
|
),
|
109
91
|
"tablet": (
|
110
92
|
"columns": 8,
|
111
|
-
"breakpoint": 40em
|
93
|
+
"breakpoint": 40em
|
112
94
|
),
|
113
95
|
"mobile": (
|
114
96
|
"columns": 4,
|
115
|
-
"breakpoint": 20em
|
116
|
-
)
|
117
|
-
|
118
|
-
// Additional grid settings [required]
|
119
|
-
"settings": (
|
120
|
-
|
121
|
-
// Any breakpoint's alias
|
122
|
-
"default": "mobile",
|
123
|
-
|
124
|
-
// Options: fluid | fixed
|
125
|
-
"grid": "fluid",
|
126
|
-
|
127
|
-
// Options: number[unit]
|
128
|
-
"gutter": 0.625em,
|
129
|
-
|
130
|
-
// Options: left | right
|
131
|
-
"float-style": "left",
|
132
|
-
|
133
|
-
// Options: true [uses highest breakpoint] | false | number[unit]
|
134
|
-
"max-width": true,
|
135
|
-
|
136
|
-
// Options: true | false
|
137
|
-
"center-container": true,
|
138
|
-
|
139
|
-
// Options: true | false
|
140
|
-
"border-box-sizing": true,
|
141
|
-
|
142
|
-
// Syntax support: string | false
|
143
|
-
"support-syntax": false,
|
144
|
-
|
145
|
-
// Options: true | false
|
146
|
-
"debug-mode": false,
|
147
|
-
),
|
97
|
+
"breakpoint": 20em
|
98
|
+
)
|
148
99
|
),
|
100
|
+
"settings": (
|
101
|
+
"default": "mobile",
|
102
|
+
"grid": "fluid",
|
103
|
+
"gutter": 0.625em,
|
104
|
+
"float-direction": "left",
|
105
|
+
"max-width": true,
|
106
|
+
"center-container": true,
|
107
|
+
"border-box-sizing": true,
|
108
|
+
"instance-maps": true,
|
109
|
+
"support-syntax": false,
|
110
|
+
"debug-mode": false
|
111
|
+
)
|
149
112
|
) !default;
|
150
113
|
```
|
151
114
|
|
@@ -240,9 +203,9 @@ Outputs, *(with debug mode on)*
|
|
240
203
|
-flint-context: null;
|
241
204
|
-flint-gutter: null;
|
242
205
|
-flint-shift: null;
|
243
|
-
-flint-
|
244
|
-
-flint-
|
245
|
-
-flint-
|
206
|
+
-flint-internal-width: 17.1875%;
|
207
|
+
-flint-internal-margin-right: 0.78125%;
|
208
|
+
-flint-internal-margin-left: 0.78125%;
|
246
209
|
}
|
247
210
|
@media only screen and (min-width: 641px) and (max-width: 960px) {
|
248
211
|
.recursive {
|
@@ -258,9 +221,9 @@ Outputs, *(with debug mode on)*
|
|
258
221
|
-flint-context: null;
|
259
222
|
-flint-gutter: null;
|
260
223
|
-flint-shift: null;
|
261
|
-
-flint-
|
262
|
-
-flint-
|
263
|
-
-flint-
|
224
|
+
-flint-internal-width: 22.91667%;
|
225
|
+
-flint-internal-margin-right: 1.04167%;
|
226
|
+
-flint-internal-margin-left: 1.04167%;
|
264
227
|
}
|
265
228
|
}
|
266
229
|
@media only screen and (min-width: 321px) and (max-width: 640px) {
|
@@ -277,9 +240,9 @@ Outputs, *(with debug mode on)*
|
|
277
240
|
-flint-context: null;
|
278
241
|
-flint-gutter: null;
|
279
242
|
-flint-shift: null;
|
280
|
-
-flint-
|
281
|
-
-flint-
|
282
|
-
-flint-
|
243
|
+
-flint-internal-width: 34.375%;
|
244
|
+
-flint-internal-margin-right: 1.5625%;
|
245
|
+
-flint-internal-margin-left: 1.5625%;
|
283
246
|
}
|
284
247
|
}
|
285
248
|
@media only screen and (min-width: 0) and (max-width: 320px) {
|
@@ -296,9 +259,9 @@ Outputs, *(with debug mode on)*
|
|
296
259
|
-flint-context: null;
|
297
260
|
-flint-gutter: null;
|
298
261
|
-flint-shift: null;
|
299
|
-
-flint-
|
300
|
-
-flint-
|
301
|
-
-flint-
|
262
|
+
-flint-internal-width: 68.75%;
|
263
|
+
-flint-internal-margin-right: 3.125%;
|
264
|
+
-flint-internal-margin-left: 3.125%;
|
302
265
|
}
|
303
266
|
}
|
304
267
|
```
|
@@ -779,111 +742,6 @@ Outputs,
|
|
779
742
|
}
|
780
743
|
```
|
781
744
|
|
782
|
-
### Shift
|
783
|
-
|
784
|
-
_The `$shift` modifier has been deprecated as of `1.8.0`. It is set to be removed in version `2.0`._
|
785
|
-
|
786
|
-
Much like the gutter modifiers, you may also call in a shift parameter using the `$shift` variable. This will cause the element to shift the desired amount of columns using positive/negative left margins.
|
787
|
-
|
788
|
-
```scss
|
789
|
-
// Shift 4 columns to the right across all breakpoints
|
790
|
-
.name {
|
791
|
-
@include _(12 12 8 4, $shift: 4);
|
792
|
-
}
|
793
|
-
|
794
|
-
// Shift 2 columns to the left across specified breakpoints
|
795
|
-
.name {
|
796
|
-
@include _(12 12 8 4, $shift: -2 -2 0 0);
|
797
|
-
}
|
798
|
-
```
|
799
|
-
|
800
|
-
**One more** cool thing about flint is that you are not bound to the grid you define. Feel free to use decimals and math based on the breakpoint's column count in your arguments for extra fine tuned control over your layouts. Examples include, `decimals: (1.25), (3.333)`, `math: (3 - 2), (2 + 9), (16 / 3)`.
|
801
|
-
|
802
|
-
```scss
|
803
|
-
.break-the-grid {
|
804
|
-
@include _(16/3 12.1 8.9 (5 - 1), $shift: 1.2 0 2 0, $gutter: row);
|
805
|
-
}
|
806
|
-
```
|
807
|
-
Outputs,
|
808
|
-
```scss
|
809
|
-
.break-the-grid {
|
810
|
-
display: block;
|
811
|
-
float: left;
|
812
|
-
width: 33.33333%;
|
813
|
-
margin-right: 0;
|
814
|
-
margin-left: 7.5%;
|
815
|
-
-flint-instance-count: 9;
|
816
|
-
-flint-parent-instance: none;
|
817
|
-
-flint-key: desktop;
|
818
|
-
-flint-breakpoint: 1280px;
|
819
|
-
-flint-columns: 16;
|
820
|
-
-flint-span: 5.33333;
|
821
|
-
-flint-context: null;
|
822
|
-
-flint-gutter: row;
|
823
|
-
-flint-shift: 1.2;
|
824
|
-
-flint--output-width: 33.33333%;
|
825
|
-
-flint--output-margin-right: 0;
|
826
|
-
-flint--output-margin-left: 7.5%;
|
827
|
-
}
|
828
|
-
@media only screen and (min-width: 641px) and (max-width: 960px) {
|
829
|
-
.break-the-grid {
|
830
|
-
width: 100.83333%;
|
831
|
-
margin-right: 0;
|
832
|
-
margin-left: 0%;
|
833
|
-
-flint-instance-count: 10;
|
834
|
-
-flint-parent-instance: none;
|
835
|
-
-flint-key: laptop;
|
836
|
-
-flint-breakpoint: 960px;
|
837
|
-
-flint-columns: 12;
|
838
|
-
-flint-span: 12.1;
|
839
|
-
-flint-context: null;
|
840
|
-
-flint-gutter: row;
|
841
|
-
-flint-shift: 0;
|
842
|
-
-flint--output-width: 100.83333%;
|
843
|
-
-flint--output-margin-right: 0;
|
844
|
-
-flint--output-margin-left: 0%;
|
845
|
-
}
|
846
|
-
}
|
847
|
-
@media only screen and (min-width: 321px) and (max-width: 640px) {
|
848
|
-
.break-the-grid {
|
849
|
-
width: 111.25%;
|
850
|
-
margin-right: 0;
|
851
|
-
margin-left: 25%;
|
852
|
-
-flint-instance-count: 11;
|
853
|
-
-flint-parent-instance: none;
|
854
|
-
-flint-key: tablet;
|
855
|
-
-flint-breakpoint: 640px;
|
856
|
-
-flint-columns: 8;
|
857
|
-
-flint-span: 8.9;
|
858
|
-
-flint-context: null;
|
859
|
-
-flint-gutter: row;
|
860
|
-
-flint-shift: 2;
|
861
|
-
-flint--output-width: 111.25%;
|
862
|
-
-flint--output-margin-right: 0;
|
863
|
-
-flint--output-margin-left: 25%;
|
864
|
-
}
|
865
|
-
}
|
866
|
-
@media only screen and (min-width: 0) and (max-width: 320px) {
|
867
|
-
.break-the-grid {
|
868
|
-
width: 100%;
|
869
|
-
margin-right: 0;
|
870
|
-
margin-left: 0%;
|
871
|
-
-flint-instance-count: 12;
|
872
|
-
-flint-parent-instance: none;
|
873
|
-
-flint-key: mobile;
|
874
|
-
-flint-breakpoint: 320px;
|
875
|
-
-flint-columns: 4;
|
876
|
-
-flint-span: 4;
|
877
|
-
-flint-context: null;
|
878
|
-
-flint-gutter: row;
|
879
|
-
-flint-shift: 0;
|
880
|
-
-flint--output-width: 100%;
|
881
|
-
-flint--output-margin-right: 0;
|
882
|
-
-flint--output-margin-left: 0%;
|
883
|
-
}
|
884
|
-
}
|
885
|
-
```
|
886
|
-
|
887
745
|
## Syntax support
|
888
746
|
|
889
747
|
As of `1.6.0`, you can add syntax support for your preferred syntax. I built the system for BEM, but it should be easily extendable to
|
@@ -891,17 +749,18 @@ support your preferred syntax. Simply create a function which parses a string of
|
|
891
749
|
function parses the selector string (for example, `.block__element__element`) like so,
|
892
750
|
|
893
751
|
```scss
|
894
|
-
|
895
|
-
|
896
|
-
|
897
|
-
|
898
|
-
|
899
|
-
|
752
|
+
/**
|
753
|
+
* Parser to support BEM syntax
|
754
|
+
*
|
755
|
+
* @param {List} $selectors - string of selectors to parse
|
756
|
+
*
|
757
|
+
* @return {List} - parsed list of selectors according to syntax
|
758
|
+
*/
|
900
759
|
@function flint-support-syntax-bem($selectors) {
|
901
760
|
// Clean up selector, remove double underscores for spaces
|
902
|
-
// add
|
903
|
-
$selectors: flint-replace-substring($selectors, "__", "/");
|
904
|
-
// Parse string to list
|
761
|
+
// add pseudo character to differentiate selectors
|
762
|
+
$selectors: flint-replace-substring(inspect($selectors), "__", "/");
|
763
|
+
// Parse string back to list without pseudo character
|
905
764
|
$selectors: flint-string-to-list($selectors, "/");
|
906
765
|
// Define top-most parent of selector
|
907
766
|
$parent: nth($selectors, 1);
|
@@ -922,6 +781,7 @@ function parses the selector string (for example, `.block__element__element`) li
|
|
922
781
|
// Return the list of parsed selectors
|
923
782
|
@return $selector-list;
|
924
783
|
}
|
784
|
+
|
925
785
|
```
|
926
786
|
|
927
787
|
This will be parsed into a list of selectors: `.block, .block__element, .block__element__element`. The list of selectors can then be used by
|
@@ -932,7 +792,11 @@ order to parse the selector string.
|
|
932
792
|
#### Officially supported syntaxes
|
933
793
|
* [BEM](http://bem.info/)
|
934
794
|
|
935
|
-
If you
|
795
|
+
If you use one that isn't here, let me know and I'll look into officially supporting it.
|
796
|
+
|
797
|
+
## Support
|
798
|
+
|
799
|
+
You can tweet [@FlintGrid](https://twitter.com/FlintGrid) with any questions or issues and I'll look into it. Be sure to include a [Gist](https://gist.github.com) or a [SassMeister](http://sassmeister.com) link.
|
936
800
|
|
937
801
|
## Authors
|
938
802
|
|
data/lib/flint.rb
CHANGED
@@ -10,8 +10,8 @@ else
|
|
10
10
|
end
|
11
11
|
|
12
12
|
module Flint
|
13
|
-
VERSION = "
|
14
|
-
DATE = "2014-
|
13
|
+
VERSION = "2.0.0.rc.1"
|
14
|
+
DATE = "2014-09-12"
|
15
15
|
end
|
16
16
|
|
17
17
|
# Custom functions
|
@@ -23,12 +23,12 @@ module Sass::Script::Functions
|
|
23
23
|
Sass::Script::Bool.new(true)
|
24
24
|
end
|
25
25
|
|
26
|
-
# Returns stringified selector
|
27
|
-
# ----
|
28
|
-
# @return [string]
|
29
|
-
def selector_string()
|
30
|
-
|
31
|
-
end
|
26
|
+
# # Returns stringified selector
|
27
|
+
# # ----
|
28
|
+
# # @return [string]
|
29
|
+
# def selector_string()
|
30
|
+
# Sass::Script::String.new(environment.selector.to_s)
|
31
|
+
# end
|
32
32
|
|
33
33
|
# Turns string into a flat list
|
34
34
|
# ----
|
data/stylesheets/_flint.scss
CHANGED
@@ -1,83 +1,52 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
1
|
+
/**
|
2
|
+
* Configuration map
|
3
|
+
*
|
4
|
+
* @prop {Map} breakpoints - map of breakpoints, follow DSC order
|
5
|
+
* @prop {Map} breakpoints.alias - named map of breakpoint settings
|
6
|
+
* @prop {Number} breakpoints.alias.columns - column count for breakpoint
|
7
|
+
* @prop {Number} breakpoints.alias.breakpoint - breakpoint value for breakpoint
|
8
|
+
* @prop {Map} settings - map of settings for grid
|
9
|
+
* @prop {String} settings.default - alias of breakpoint to be grid default
|
10
|
+
* @prop {String} settings.grid - type of grid
|
11
|
+
* @prop {Number} settings.gutter - value for gutter
|
12
|
+
* @prop {String} settings.float-direction - direction of float
|
13
|
+
* @prop {Bool} settings.max-width - maximum width value
|
14
|
+
* @prop {Bool} settings.max-width - maximum width value
|
15
|
+
* @prop {Bool} settings.center-container - center containers
|
16
|
+
* @prop {Bool} settings.border-box-sizing - use `box-sizing: border-box`
|
17
|
+
* @prop {Bool} settings.instance-maps - use instance maps for added features
|
18
|
+
* @prop {Bool} settings.support-syntax - support syntax within instance functions
|
19
|
+
* @prop {Bool} settings.debug-mode - enable debug mode
|
20
|
+
*/
|
20
21
|
$flint: (
|
21
|
-
|
22
|
-
// Grid configuration
|
23
|
-
"config": (
|
24
|
-
|
25
|
-
// Define breakpoints [any amount of breakpoints]
|
26
|
-
// Any alias you like, minus reserved Flint words [i.e. "settings", "config", etc.]
|
22
|
+
"breakpoints": (
|
27
23
|
"desktop": (
|
28
|
-
|
29
|
-
// Options: 0-infinity
|
30
24
|
"columns": 16,
|
31
|
-
|
32
|
-
// Options: number[unit]
|
33
|
-
"breakpoint": 80em,
|
25
|
+
"breakpoint": 80em
|
34
26
|
),
|
35
|
-
|
36
|
-
// Same applies for other breakpoints
|
37
|
-
// ----
|
38
|
-
// Remember, you're not fixed to just 4 breakpoints like we have here
|
39
27
|
"laptop": (
|
40
28
|
"columns": 12,
|
41
|
-
"breakpoint": 60em
|
29
|
+
"breakpoint": 60em
|
42
30
|
),
|
43
31
|
"tablet": (
|
44
32
|
"columns": 8,
|
45
|
-
"breakpoint": 40em
|
33
|
+
"breakpoint": 40em
|
46
34
|
),
|
47
35
|
"mobile": (
|
48
36
|
"columns": 4,
|
49
|
-
"breakpoint": 20em
|
50
|
-
),
|
51
|
-
|
52
|
-
// Additional grid settings [required]
|
53
|
-
"settings": (
|
54
|
-
|
55
|
-
// Any breakpoint's alias
|
56
|
-
"default": "mobile",
|
57
|
-
|
58
|
-
// Options: fluid | fixed
|
59
|
-
"grid": "fluid",
|
60
|
-
|
61
|
-
// Options: number[unit]
|
62
|
-
"gutter": 0.625em,
|
63
|
-
|
64
|
-
// Options: left | right
|
65
|
-
"float-style": "left",
|
66
|
-
|
67
|
-
// Options: true [uses highest breakpoint] | false | number[unit]
|
68
|
-
"max-width": true,
|
69
|
-
|
70
|
-
// Options: true | false
|
71
|
-
"center-container": true,
|
72
|
-
|
73
|
-
// Options: true | false
|
74
|
-
"border-box-sizing": true,
|
75
|
-
|
76
|
-
// Syntax support: string | false
|
77
|
-
"support-syntax": false,
|
78
|
-
|
79
|
-
// Options: true | false
|
80
|
-
"debug-mode": false,
|
37
|
+
"breakpoint": 20em
|
81
38
|
)
|
39
|
+
),
|
40
|
+
"settings": (
|
41
|
+
"default": "mobile",
|
42
|
+
"grid": "fluid",
|
43
|
+
"gutter": 0.625em,
|
44
|
+
"float-direction": "left",
|
45
|
+
"max-width": true,
|
46
|
+
"center-container": true,
|
47
|
+
"border-box-sizing": true,
|
48
|
+
"instance-maps": true,
|
49
|
+
"support-syntax": false,
|
50
|
+
"debug-mode": false
|
82
51
|
)
|
83
52
|
) !default;
|