flint-gs 1.0.5 → 1.0.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0037eb31b05237d1557d5fb3f190ac036e2237bc
4
- data.tar.gz: fbbbe97e0fc1b5bf62d6a94057ac663b04c46a96
3
+ metadata.gz: 236ab4066ab2eb79b7548e55e03eb25dc8ecd673
4
+ data.tar.gz: 4c3efe7cf29b1b34592228e78b9da9775b41de7a
5
5
  SHA512:
6
- metadata.gz: 30087aa875518d81c981b3b3d1b497ab79d95d9900292af38308c6eeeba80b84b9fae70c546af10e7e2c44f6fd0fe8520be1de1ebbe50b62f5f77568cf131f73
7
- data.tar.gz: 3a79ea3e906b94bf05c073a936b5e0f9196a3b0cecba8207314070fdb1af1b78b911d88a44e653bf6bd73fd39012d5953b69aea987d21d16579b3d2cc630a6c8
6
+ metadata.gz: de1a4d49517d0cd4299cab60e7b96afab70dde800c317a8f1dd5a805c0e29e5024a4da3ff45231230744da7e680b683b72a6c3aba32fdae83e93bd1c707dd3cc
7
+ data.tar.gz: 1e85c4544c68a69a0afd825c5a9b4d21dc3237474b661bf3a61c8e483ae002178d084ab01d79619bb644555e9f87e2ba3539676c2eff7431eae32acf787e6ef4
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
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
- Here's a small [demo on Sassmeister](http://sassmeister.com/gist/9657552) *(older version : v0.0.3)* to show what Flint is capable of.
5
+ Here's a small [demo on Sassmeister](http://sassmeister.com/gist/9657552) to show what Flint is capable of. *This demo is outdated, and shows a pre-release version (0.0.3) of Flint.*
6
6
 
7
7
  Enjoy.
8
8
 
@@ -18,19 +18,23 @@ If you don't want to install the gem, download/clone the current build files and
18
18
 
19
19
  ###Config
20
20
 
21
- Flint's `config map` is unique in the ability that you may define an unlimited number of breakpoints for your project. Whether that be 2 breakpoints, or even 12. You're in full control of your columns as well. Also, unlike most frameworks, you may name these anything that you like. Flint is smart and will figure out which one you're talking about. 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 template below.
21
+ Flint's `config map` is unique in the ability that you may define an unlimited number of breakpoints for your project. Whether that be 2 breakpoints, or even 12 breakpoints. Flint gives you full control over the column count on each breakpoint, and unlike most frameworks, you may name these anything that you like. Flint is smart and will figure out which one you're talking about.
22
+
23
+ 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.
24
+
25
+ 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.
22
26
 
23
27
  Settings may be entered in `px` or `em`, and Flint will do the rest.
24
28
 
25
- *Keep in mind, whatever unit you choose to use here needs to be used consistently throughout Flint. No mixing of `px` and `em` units.*
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.*
26
30
 
27
31
  ```scss
28
32
  // Configuration map
29
33
  //--------------------------------------------------------------------------------
30
34
  // @param [Breakpoints] : Here you can set up your various breakpoints for your
31
35
  // project. Any number of breakpoints is acceptable. You must include a column
32
- // count and breakpoint value for each listed breakpoint. Order does not have
33
- // to follow `ASC` or `DESC`. Unit chosen here must be used consistently
36
+ // count and breakpoint value for each listed breakpoint. Flint does require that
37
+ // you follow a `DESC` order. Unit chosen here must be used consistently
34
38
  // throughout the rest of the config map.
35
39
  //--------------------------------------------------------------------------------
36
40
  // @param default [Alias] : alias of breakpoint that is your grid default
@@ -343,11 +347,13 @@ recursive {
343
347
 
344
348
  Use this if your content needs different spans across each breakpoints. The *order of operations* for this matches the order entered in your `config`.
345
349
 
350
+ To hide an element on a specific breakpoint, input `0` as its span.
351
+
346
352
  *You must include an argument for each breakpoint in your config.*
347
353
 
348
354
  ```scss
349
355
  .variable {
350
- @include _(8 6 4 4);
356
+ @include _(8 6 0 4);
351
357
  }
352
358
  ```
353
359
 
@@ -369,9 +375,7 @@ Outputs,
369
375
  }
370
376
  @media only screen and (min-width: 321px) and (max-width: 640px) {
371
377
  .variable {
372
- width: 46.875%;
373
- margin-right: 1.5625%;
374
- margin-left: 1.5625%;
378
+ display: none;
375
379
  }
376
380
  }
377
381
  @media only screen and (min-width: 0) and (max-width: 320px) {
@@ -531,27 +535,37 @@ Outputs,
531
535
  Here are different gutter modifiers that may be called in when defining spans using the `$gutter` variable. **You should note**, that when using shorthands the gutter modifiers are recursive across all breakpoints.
532
536
 
533
537
  ```scss
538
+ // default margins
539
+ .gutter-default { // other alias : `normal` | `regular`
540
+ @include _(desktop, 4, $gutter: default);
541
+ }
542
+
534
543
  // no left margin
535
- .gutter {
544
+ .gutter-alpha { // other alias : `no-left`
536
545
  @include _(desktop, 4, $gutter: alpha);
537
546
  }
538
547
 
539
548
  // no right margin
540
- .gutter {
549
+ .gutter-omega { // other alias : `no-right`
541
550
  @include _(desktop, 4, $gutter: omega);
542
551
  }
543
552
 
544
553
  // no margins
545
- .gutter {
554
+ .gutter-row { // other alias : `none`
546
555
  @include _(desktop, 4, $gutter: row);
547
556
  }
548
557
 
549
558
  // places gutters on inside by reducing column width by [gutter*2]
550
559
  // useful for nesting children inside of parents that have normal gutters on fixed grid layouts
551
- .gutter {
560
+ .gutter-inside {
552
561
  @include _(desktop, 4, $gutter: inside);
553
562
  }
554
563
 
564
+ // variable gutter
565
+ .variable-gutter {
566
+ @include _(16 12 8 4, $gutter: row alpha omega normal);
567
+ }
568
+
555
569
  // recursive
556
570
  .recursive-gutter {
557
571
  @include _(16 12 8 4, $gutter: row);
@@ -559,34 +573,62 @@ Here are different gutter modifiers that may be called in when defining spans us
559
573
  ```
560
574
  Outputs,
561
575
  ```scss
562
- .gutter {
576
+ .gutter-alpha {
563
577
  display: block;
564
578
  float: left;
565
579
  width: 24.21875%;
566
580
  margin-right: 0.78125%;
567
581
  margin-left: 0;
568
582
  }
569
- .gutter {
583
+ .gutter-omega {
570
584
  display: block;
571
585
  float: left;
572
586
  width: 24.21875%;
573
587
  margin-right: 0;
574
588
  margin-left: 0.78125%;
575
589
  }
576
- .gutter {
590
+ .gutter-row {
577
591
  display: block;
578
592
  float: left;
579
593
  width: 25%;
580
594
  margin-right: 0;
581
595
  margin-left: 0;
582
596
  }
583
- .gutter {
597
+ .gutter-inside {
584
598
  display: block;
585
599
  float: left;
586
600
  width: 21.875%;
587
601
  margin-right: 0.78125%;
588
602
  margin-left: 0.78125%;
589
603
  }
604
+ .variable-gutter {
605
+ display: block;
606
+ float: left;
607
+ width: 100%;
608
+ margin-right: 0;
609
+ margin-left: 0;
610
+ }
611
+ @media only screen and (min-width: 641px) and (max-width: 960px) {
612
+ .variable-gutter {
613
+ width: 98.95833%;
614
+ margin-right: 1.04167%;
615
+ margin-left: 0;
616
+ }
617
+ }
618
+ @media only screen and (min-width: 321px) and (max-width: 640px) {
619
+ .variable-gutter {
620
+ width: 98.4375%;
621
+ margin-right: 0;
622
+ margin-left: 1.5625%;
623
+ }
624
+ }
625
+ @media only screen and (min-width: 0) and (max-width: 320px) {
626
+ .variable-gutter {
627
+ width: 87.5%;
628
+ margin-right: 3.125%;
629
+ margin-left: 3.125%;
630
+ }
631
+ }
590
632
  .recursive-gutter {
591
633
  display: block;
592
634
  float: left;
@@ -633,13 +675,11 @@ Much like the gutter modifiers, you may also call in a shift parameter using the
633
675
  }
634
676
  ```
635
677
 
636
- **One more** cool thing about flint is that you are not bound to
637
- the grid you define. Feel free to use decimals in your arguments
638
- for extra fine tuned control over your layouts.
678
+ **One more** cool thing about flint is that you are not bound to the grid you define. Feel free to use decimals, math or ratios in your arguments for extra fine tuned control over your layouts.
639
679
 
640
680
  ```scss
641
681
  .break-the-grid {
642
- @include _(16/3 12.1 8.9 4, $shift: 1.2 0 2 0, $gutter: row);
682
+ @include _(16/3 12.1 8.9 (5 - 1), $shift: 1.2 0 2 0, $gutter: row);
643
683
  }
644
684
  ```
645
685
  Outputs,
@@ -773,6 +813,8 @@ Going to start keeping a log of changes starting **today (4/11/14).**
773
813
 
774
814
  ####4/24/14
775
815
  * Added `$gutter: inside` modifier
816
+ * Adjusted `$span: 0` to hide element instead of compiling with no width
817
+ * Corrected small issue with `less than x`, `greater than x` on fixed grids
776
818
  * Cleaned up variable/function names
777
819
  * Added detailed comments to all mixins/functions
778
820
 
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.5"
9
- DATE = "2014-04-24"
8
+ VERSION = "1.0.6"
9
+ DATE = "2014-04-25"
10
10
  end
11
11
 
12
12
  # Custom functions
@@ -61,7 +61,7 @@
61
61
 
62
62
  @if $calcShift != NULL and $calcContext == NULL {
63
63
 
64
- @if $calcGutter == NULL and get-value(settings, gutter) != false {
64
+ @if $calcGutter == NULL or $calcGutter == "normal" or $calcGutter == "default" or $calcGutter == "regular" and get-value(settings, gutter) != false {
65
65
 
66
66
  // Save to variables for instance creation
67
67
  $outputWidth: (calc-width($calcKey, $calcSpan)) - ((calc-margin($calcKey, $calcSpan))*2);
@@ -98,7 +98,7 @@
98
98
  @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft);
99
99
  @include debugPrintInstance($calcKey);
100
100
 
101
- } @else if $calcGutter == "alpha" and get-value(settings, gutter) != false {
101
+ } @else if $calcGutter == "alpha" or $calcGutter == "no-left" and get-value(settings, gutter) != false {
102
102
 
103
103
  $outputWidth: (calc-width($calcKey, $calcSpan)) - (calc-margin($calcKey, $calcSpan));
104
104
  $outputMarginRight: calc-margin($calcKey, $calcSpan);
@@ -114,7 +114,7 @@
114
114
  @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft);
115
115
  @include debugPrintInstance($calcKey);
116
116
 
117
- } @else if $calcGutter == "omega" and get-value(settings, gutter) != false {
117
+ } @else if $calcGutter == "omega" or $calcGutter == "no-right" and get-value(settings, gutter) != false {
118
118
 
119
119
  $outputWidth: (calc-width($calcKey, $calcSpan)) - ((calc-margin($calcKey, $calcSpan)));
120
120
  $outputMarginRight: 0;
@@ -130,7 +130,7 @@
130
130
  @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft);
131
131
  @include debugPrintInstance($calcKey);
132
132
 
133
- } @else if $calcGutter == "row" or get-value(settings, gutter) == false {
133
+ } @else if $calcGutter == "row" or $calcGutter == "none" or get-value(settings, gutter) == false {
134
134
 
135
135
  $outputWidth: (calc-width($calcKey, $calcSpan));
136
136
  $outputMarginRight: 0;
@@ -152,7 +152,7 @@
152
152
  $exists: get-family-instance($calcKey);
153
153
 
154
154
  @if $calcShift != NULL {
155
- @if $calcGutter == NULL and get-value(settings, gutter) != false {
155
+ @if $calcGutter == NULL or $calcGutter == "normal" or $calcGutter == "default" or $calcGutter == "regular" and get-value(settings, gutter) != false {
156
156
  // Check if context is set to auto
157
157
  @if $calcContext == "auto" {
158
158
  // Does parent exist?
@@ -235,7 +235,7 @@
235
235
  @include debugPrintInstance($calcKey);
236
236
  }
237
237
 
238
- } @else if $calcGutter == "alpha" and get-value(settings, gutter) != false {
238
+ } @else if $calcGutter == "alpha" or $calcGutter == "no-left" and get-value(settings, gutter) != false {
239
239
 
240
240
  @if $calcContext == "auto" {
241
241
  @if $exists != false {
@@ -274,7 +274,7 @@
274
274
  @include debugPrintInstance($calcKey);
275
275
  }
276
276
 
277
- } @else if $calcGutter == "omega" and get-value(settings, gutter) != false {
277
+ } @else if $calcGutter == "omega" or $calcGutter == "no-right" and get-value(settings, gutter) != false {
278
278
 
279
279
  @if $calcContext == "auto" {
280
280
  @if $exists != false {
@@ -313,7 +313,7 @@
313
313
  @include debugPrintInstance($calcKey);
314
314
  }
315
315
 
316
- } @else if $calcGutter == "row" or get-value(settings, gutter) == false {
316
+ } @else if $calcGutter == "row" or $calcGutter == "none" or get-value(settings, gutter) == false {
317
317
 
318
318
  @if $calcContext == "auto" {
319
319
  @if $exists != false {
@@ -353,7 +353,7 @@
353
353
  }
354
354
  }
355
355
  } @else {
356
- @if $calcGutter == NULL and get-value(settings, gutter) != false {
356
+ @if $calcGutter == NULL or $calcGutter == "normal" or $calcGutter == "default" or $calcGutter == "regular" and get-value(settings, gutter) != false {
357
357
  // Check if context is set to auto
358
358
  @if $calcContext == "auto" {
359
359
  // Did it exist?
@@ -422,7 +422,7 @@
422
422
  @include debugPrintInstance($calcKey);
423
423
  }
424
424
 
425
- } @else if $calcGutter == "alpha" and get-value(settings, gutter) != false {
425
+ } @else if $calcGutter == "alpha" or $calcGutter == "no-left" and get-value(settings, gutter) != false {
426
426
 
427
427
  @if $calcContext == "auto" {
428
428
  @if $exists != false {
@@ -455,7 +455,7 @@
455
455
  @include debugPrintInstance($calcKey);
456
456
  }
457
457
 
458
- } @else if $calcGutter == "omega" and get-value(settings, gutter) != false {
458
+ } @else if $calcGutter == "omega" or $calcGutter =="no-right" and get-value(settings, gutter) != false {
459
459
 
460
460
  @if $calcContext == "auto" {
461
461
  @if $exists != false {
@@ -488,7 +488,7 @@
488
488
  @include debugPrintInstance($calcKey);
489
489
  }
490
490
 
491
- } @else if $calcGutter == "row" or get-value(settings, gutter) == false {
491
+ } @else if $calcGutter == "row" or $calcGutter == "none" or get-value(settings, gutter) == false {
492
492
 
493
493
  @if $calcContext == "auto" {
494
494
  @if $exists != false {
@@ -525,7 +525,7 @@
525
525
 
526
526
  } @else {
527
527
 
528
- @if $calcGutter == NULL and get-value(settings, gutter) != false {
528
+ @if $calcGutter == NULL or $calcGutter == "normal" or $calcGutter == "default" or $calcGutter == "regular" and get-value(settings, gutter) != false {
529
529
 
530
530
  $outputWidth: (calc-width($calcKey, $calcSpan)) - ((calc-margin($calcKey, $calcSpan))*2);
531
531
  $outputMarginRight: calc-margin($calcKey, $calcSpan);
@@ -551,7 +551,7 @@
551
551
  @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft);
552
552
  @include debugPrintInstance($calcKey);
553
553
 
554
- } @else if $calcGutter == "alpha" and get-value(settings, gutter) != false {
554
+ } @else if $calcGutter == "alpha" or $calcGutter == "no-left" and get-value(settings, gutter) != false {
555
555
 
556
556
  $outputWidth: (calc-width($calcKey, $calcSpan)) - (calc-margin($calcKey, $calcSpan));
557
557
  $outputMarginRight: calc-margin($calcKey, $calcSpan);
@@ -564,7 +564,7 @@
564
564
  @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft);
565
565
  @include debugPrintInstance($calcKey);
566
566
 
567
- } @else if $calcGutter == "omega" and get-value(settings, gutter) != false {
567
+ } @else if $calcGutter == "omega" or $calcGutter == "no-right" and get-value(settings, gutter) != false {
568
568
 
569
569
  $outputWidth: (calc-width($calcKey, $calcSpan)) - (calc-margin($calcKey, $calcSpan));
570
570
  $outputMarginRight: 0;
@@ -577,7 +577,7 @@
577
577
  @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft);
578
578
  @include debugPrintInstance($calcKey);
579
579
 
580
- } @else if $calcGutter == "row" or get-value(settings, gutter) == false {
580
+ } @else if $calcGutter == "row" or $calcGutter == "none" or get-value(settings, gutter) == false {
581
581
 
582
582
  $outputWidth: calc-width($calcKey, $calcSpan);
583
583
  $outputMarginRight: 0;
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.5
4
+ version: 1.0.6
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-04-24 00:00:00.000000000 Z
12
+ date: 2014-04-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sass