titon-toolkit 0.9.4 → 0.10.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. data/license.md +23 -0
  2. data/readme.md +93 -0
  3. data/src/lib/titon-toolkit.rb +2 -2
  4. data/src/scss/toolkit.scss +3 -3
  5. data/src/scss/toolkit/effects/visual.scss +47 -47
  6. data/src/scss/toolkit/layout/base.scss +32 -32
  7. data/src/scss/toolkit/layout/code.scss +38 -38
  8. data/src/scss/toolkit/layout/form.scss +86 -86
  9. data/src/scss/toolkit/layout/grid.scss +31 -31
  10. data/src/scss/toolkit/layout/input-group.scss +41 -41
  11. data/src/scss/toolkit/layout/responsive.scss +21 -21
  12. data/src/scss/toolkit/layout/table.scss +59 -59
  13. data/src/scss/toolkit/layout/typography.scss +18 -18
  14. data/src/scss/toolkit/mixins/_grid.scss +8 -8
  15. data/src/scss/toolkit/mixins/_layout.scss +36 -36
  16. data/src/scss/toolkit/mixins/_responsive.scss +56 -56
  17. data/src/scss/toolkit/mixins/_themes.scss +78 -78
  18. data/src/scss/toolkit/modules/accordion.scss +33 -33
  19. data/src/scss/toolkit/modules/blackout.scss +13 -13
  20. data/src/scss/toolkit/modules/carousel.scss +141 -141
  21. data/src/scss/toolkit/modules/flyout.scss +57 -57
  22. data/src/scss/toolkit/modules/modal.scss +206 -206
  23. data/src/scss/toolkit/modules/popover.scss +58 -58
  24. data/src/scss/toolkit/modules/showcase.scss +135 -135
  25. data/src/scss/toolkit/modules/tabs.scss +29 -29
  26. data/src/scss/toolkit/modules/tooltip.scss +109 -109
  27. data/src/scss/toolkit/modules/type-ahead.scss +44 -44
  28. data/src/scss/toolkit/themes/titon.scss +242 -242
  29. data/src/scss/toolkit/themes/tomorrow-night.scss +322 -322
  30. data/src/scss/toolkit/ui/alert.scss +29 -29
  31. data/src/scss/toolkit/ui/breadcrumbs.scss +41 -41
  32. data/src/scss/toolkit/ui/button-group.scss +181 -181
  33. data/src/scss/toolkit/ui/button.scss +31 -31
  34. data/src/scss/toolkit/ui/dropdown.scss +83 -83
  35. data/src/scss/toolkit/ui/icon.scss +5 -5
  36. data/src/scss/toolkit/ui/label-badge.scss +48 -48
  37. data/src/scss/toolkit/ui/lazy-load.scss +8 -5
  38. data/src/scss/toolkit/ui/matrix.scss +26 -0
  39. data/src/scss/toolkit/ui/pagination.scss +108 -108
  40. data/src/scss/toolkit/ui/pin.scss +5 -5
  41. data/src/scss/toolkit/ui/progress.scss +20 -20
  42. data/version.md +1 -0
  43. metadata +17 -5
  44. checksums.yaml +0 -15
@@ -4,21 +4,21 @@ $grid-width: (100% / $grid-columns) !default;
4
4
 
5
5
  // Calculate a width using a grid cell
6
6
  @function grid-span($n) {
7
- @return $grid-width * $n;
7
+ @return $grid-width * $n;
8
8
  }
9
9
 
10
10
  // Styles for the row containing the columns
11
11
  @mixin grid-row() {
12
- text-align: left;
13
- width: 100%;
14
- max-width: 100%;
12
+ text-align: left;
13
+ width: 100%;
14
+ max-width: 100%;
15
15
 
16
- @include clear-fix;
16
+ @include clear-fix;
17
17
  }
18
18
 
19
19
  // Styles for the column
20
20
  @mixin grid-column() {
21
- position: relative;
22
- min-height: 1px;
23
- float: left;
21
+ position: relative;
22
+ min-height: 1px;
23
+ float: left;
24
24
  }
@@ -13,78 +13,78 @@ $large-padding: 1rem !default;
13
13
 
14
14
  // Container clear fix for floats
15
15
  @mixin clear-fix {
16
- &:after {
17
- content: "";
18
- display: block;
19
- height: 0;
20
- line-height: 0;
21
- clear: both;
22
- visibility: hidden;
23
- }
16
+ &:after {
17
+ content: "";
18
+ display: block;
19
+ height: 0;
20
+ line-height: 0;
21
+ clear: both;
22
+ visibility: hidden;
23
+ }
24
24
  }
25
25
 
26
26
  // Reset an inline-block element to defaults
27
27
  @mixin reset-inline-block {
28
- display: inline-block;
29
- border: 0;
30
- margin: 0;
31
- padding: 0;
32
- position: relative;
33
- text-decoration: none;
34
- vertical-align: middle;
28
+ display: inline-block;
29
+ border: 0;
30
+ margin: 0;
31
+ padding: 0;
32
+ position: relative;
33
+ text-decoration: none;
34
+ vertical-align: middle;
35
35
  }
36
36
 
37
37
  // Remove the top and bottom margin from content elements
38
38
  // Allows for perfect spacing within content blocks
39
39
  @mixin content-spacing {
40
- p, ul, ol, hr, blockquote {
41
- &:first-child { margin-top: 0; }
42
- &:last-child { margin-bottom: 0; }
43
- }
40
+ p, ul, ol, hr, blockquote {
41
+ &:first-child { margin-top: 0; }
42
+ &:last-child { margin-bottom: 0; }
43
+ }
44
44
  }
45
45
 
46
46
  //-------------------- Sizes --------------------//
47
47
 
48
48
  @mixin size-small {
49
- font-size: $small-size;
50
- padding: $small-padding;
49
+ font-size: $small-size;
50
+ padding: $small-padding;
51
51
  }
52
52
 
53
53
  @mixin size-medium {
54
- font-size: $medium-size;
55
- padding: $medium-padding;
54
+ font-size: $medium-size;
55
+ padding: $medium-padding;
56
56
  }
57
57
 
58
58
  @mixin size-large {
59
- font-size: $large-size;
60
- padding: $large-padding;
59
+ font-size: $large-size;
60
+ padding: $large-padding;
61
61
  }
62
62
 
63
63
  //-------------------- States --------------------//
64
64
 
65
65
  // Contains hover and active styles (on self or inherited from parent)
66
66
  @mixin active-state {
67
- .is-active > &,
68
- &:hover,
69
- &.is-active,
70
- &.is-active:hover { @content; }
67
+ .is-active > &,
68
+ &:hover,
69
+ &.is-active,
70
+ &.is-active:hover { @content; }
71
71
  }
72
72
 
73
73
  // Contains disabled styles (on self or inherited from parent)
74
74
  @mixin disabled-state {
75
- .is-disabled > &,
76
- &.is-disabled,
77
- &.is-disabled:hover,
78
- &[disabled],
79
- &[disabled]:hover { @content; }
75
+ .is-disabled > &,
76
+ &.is-disabled,
77
+ &.is-disabled:hover,
78
+ &[disabled],
79
+ &[disabled]:hover { @content; }
80
80
  }
81
81
 
82
82
  //-------------------- Helpers --------------------//
83
83
 
84
84
  @function black($opacity){
85
- @return rgba(0, 0, 0, $opacity);
85
+ @return rgba(0, 0, 0, $opacity);
86
86
  }
87
87
 
88
88
  @function white($opacity){
89
- @return rgba(255, 255, 255, $opacity);
89
+ @return rgba(255, 255, 255, $opacity);
90
90
  }
@@ -8,104 +8,104 @@ $breakpoint-mobile-landscape: 480px !default;
8
8
  $breakpoint-mobile-portrait: 320px !default;
9
9
 
10
10
  @mixin if-min($min) {
11
- @media only screen and (min-width: $min) {
12
- @content;
13
- }
11
+ @media only screen and (min-width: $min) {
12
+ @content;
13
+ }
14
14
  }
15
15
 
16
16
  @mixin if-max($max) {
17
- @media only screen and (max-width: $max) {
18
- @content;
19
- }
17
+ @media only screen and (max-width: $max) {
18
+ @content;
19
+ }
20
20
  }
21
21
 
22
22
  @mixin if-min-max($min, $max) {
23
- @media only screen and (min-width: $min) and (max-width: $max) {
24
- @content;
25
- }
23
+ @media only screen and (min-width: $min) and (max-width: $max) {
24
+ @content;
25
+ }
26
26
  }
27
27
 
28
28
  @mixin if-landscape {
29
- @media only screen and (orientation: landscape) {
30
- @content;
31
- }
29
+ @media only screen and (orientation: landscape) {
30
+ @content;
31
+ }
32
32
  }
33
33
 
34
34
  @mixin if-portrait {
35
- @media only screen and (orientation: portrait) {
36
- @content;
37
- }
35
+ @media only screen and (orientation: portrait) {
36
+ @content;
37
+ }
38
38
  }
39
39
 
40
40
  // Either support desktop-first or mobile-first responsive pattern
41
41
  @mixin do-responsive($desktop, $mobile) {
42
- @if $responsive-design == "desktop" {
43
- @if $desktop {
44
- @include if-max($desktop) {
45
- @content;
46
- }
47
- } @else {
48
- @content;
49
- }
50
- } @else {
51
- @if $mobile {
52
- @include if-min($mobile) {
53
- @content;
54
- }
55
- } @else {
56
- @content;
57
- }
58
- }
42
+ @if $responsive-design == "desktop" {
43
+ @if $desktop {
44
+ @include if-max($desktop) {
45
+ @content;
46
+ }
47
+ } @else {
48
+ @content;
49
+ }
50
+ } @else {
51
+ @if $mobile {
52
+ @include if-min($mobile) {
53
+ @content;
54
+ }
55
+ } @else {
56
+ @content;
57
+ }
58
+ }
59
59
  }
60
60
 
61
61
  //-------------------- Breakpoints --------------------//
62
62
 
63
63
  // Uses min or max
64
64
  @mixin if-desktop {
65
- @include do-responsive(null, $breakpoint-tablet-landscape) {
66
- @content;
67
- }
65
+ @include do-responsive(null, $breakpoint-tablet-landscape) {
66
+ @content;
67
+ }
68
68
  }
69
69
 
70
70
  @mixin if-tablet-landscape {
71
- @include do-responsive($breakpoint-tablet-landscape, $breakpoint-tablet-portrait) {
72
- @content;
73
- }
71
+ @include do-responsive($breakpoint-tablet-landscape, $breakpoint-tablet-portrait) {
72
+ @content;
73
+ }
74
74
  }
75
75
 
76
76
  @mixin if-tablet-portrait {
77
- @include do-responsive($breakpoint-tablet-portrait, $breakpoint-mobile-landscape) {
78
- @content;
79
- }
77
+ @include do-responsive($breakpoint-tablet-portrait, $breakpoint-mobile-landscape) {
78
+ @content;
79
+ }
80
80
  }
81
81
 
82
82
  @mixin if-mobile-landscape {
83
- @include do-responsive($breakpoint-mobile-landscape, $breakpoint-mobile-portrait) {
84
- @content;
85
- }
83
+ @include do-responsive($breakpoint-mobile-landscape, $breakpoint-mobile-portrait) {
84
+ @content;
85
+ }
86
86
  }
87
87
 
88
88
  @mixin if-mobile-portrait {
89
- @include do-responsive($breakpoint-mobile-portrait, null) {
90
- @content;
91
- }
89
+ @include do-responsive($breakpoint-mobile-portrait, null) {
90
+ @content;
91
+ }
92
92
  }
93
93
 
94
94
  // Within 2 ranges
95
95
  @mixin in-desktop {
96
- @include if-min($breakpoint-tablet-landscape + 1) {
97
- @content;
98
- }
96
+ @include if-min($breakpoint-tablet-landscape + 1) {
97
+ @content;
98
+ }
99
99
  }
100
100
 
101
101
  @mixin in-tablet {
102
- @include if-min-max($breakpoint-mobile-landscape + 1, $breakpoint-tablet-landscape) {
103
- @content;
104
- }
102
+ @include if-min-max($breakpoint-mobile-landscape + 1, $breakpoint-tablet-landscape) {
103
+ @content;
104
+ }
105
105
  }
106
106
 
107
107
  @mixin in-mobile {
108
- @include if-max($breakpoint-mobile-landscape) {
109
- @content;
110
- }
108
+ @include if-max($breakpoint-mobile-landscape) {
109
+ @content;
110
+ }
111
111
  }
@@ -1,98 +1,98 @@
1
1
 
2
2
  @mixin alert-style($bg, $text) {
3
- color: $text;
4
- background: $bg;
5
- border: 1px solid shade($bg, 10%);
3
+ color: $text;
4
+ background: $bg;
5
+ border: 1px solid shade($bg, 10%);
6
6
 
7
- hr { border-color: shade($bg, 10%); }
7
+ hr { border-color: shade($bg, 10%); }
8
8
 
9
- a { color: shade($text, 10%); }
10
- a:hover { color: tint($text, 25%); }
9
+ a { color: shade($text, 10%); }
10
+ a:hover { color: tint($text, 25%); }
11
11
 
12
- @content;
12
+ @content;
13
13
  }
14
14
 
15
15
  @mixin button-style($base, $light, $dark) {
16
- font-weight: bold;
17
- background: shade($base, 5%);
18
- text-shadow: 1px 1px black(.2);
19
- border: 1px solid shade($base, 12%);
20
-
21
- @include active-state {
22
- color: #fff;
23
- background-color: shade($base, 20%);
24
- text-shadow: 1px 1px $dark;
25
- border-color: shade($base, 30%);
26
- }
27
-
28
- @include disabled-state {
29
- background: $base;
30
- border-color: $base;
31
- box-shadow: none;
32
- text-shadow: none;
33
- top: 0;
34
- opacity: $disabled-opacity;
35
- }
36
-
37
- @content;
16
+ font-weight: bold;
17
+ background: shade($base, 5%);
18
+ text-shadow: 1px 1px black(.2);
19
+ border: 1px solid shade($base, 12%);
20
+
21
+ @include active-state {
22
+ color: #fff;
23
+ background-color: shade($base, 20%);
24
+ text-shadow: 1px 1px $dark;
25
+ border-color: shade($base, 30%);
26
+ }
27
+
28
+ @include disabled-state {
29
+ background: $base;
30
+ border-color: $base;
31
+ box-shadow: none;
32
+ text-shadow: none;
33
+ top: 0;
34
+ opacity: $disabled-opacity;
35
+ }
36
+
37
+ @content;
38
38
  }
39
39
 
40
40
  @mixin label-style($bg, $text) {
41
- background: $bg;
42
- color: $text;
41
+ background: $bg;
42
+ color: $text;
43
43
 
44
- @content;
44
+ @content;
45
45
  }
46
46
 
47
47
  @mixin progress-style($bg, $border) {
48
- background: $bg;
49
- text-shadow: 1px 1px $border;
50
- border: 1px solid tint($border, 35%);
51
- border-right: 0;
48
+ background: $bg;
49
+ text-shadow: 1px 1px $border;
50
+ border: 1px solid tint($border, 35%);
51
+ border-right: 0;
52
52
 
53
- @content;
53
+ @content;
54
54
  }
55
55
 
56
56
  @mixin field-style() {
57
- &.has-error {
58
- .input,
59
- .select {
60
- border-color: $error;
61
-
62
- &:focus { box-shadow: 0 0 5px $error-light; }
63
- }
64
-
65
- .radio,
66
- .checkbox {
67
- color: $error-dark;
68
- }
69
- }
70
-
71
- &.has-warning {
72
- .input,
73
- .select {
74
- border-color: $warning;
75
-
76
- &:focus { box-shadow: 0 0 5px $warning-light; }
77
- }
78
-
79
- .radio,
80
- .checkbox {
81
- color: $warning-dark;
82
- }
83
- }
84
-
85
- &.has-success {
86
- .input,
87
- .select {
88
- border-color: $success;
89
-
90
- &:focus { box-shadow: 0 0 5px $success-light; }
91
- }
92
-
93
- .radio,
94
- .checkbox {
95
- color: $success-dark;
96
- }
97
- }
57
+ &.has-error {
58
+ .input,
59
+ .select {
60
+ border-color: $error;
61
+
62
+ &:focus { box-shadow: 0 0 5px $error-light; }
63
+ }
64
+
65
+ .radio,
66
+ .checkbox {
67
+ color: $error-dark;
68
+ }
69
+ }
70
+
71
+ &.has-warning {
72
+ .input,
73
+ .select {
74
+ border-color: $warning;
75
+
76
+ &:focus { box-shadow: 0 0 5px $warning-light; }
77
+ }
78
+
79
+ .radio,
80
+ .checkbox {
81
+ color: $warning-dark;
82
+ }
83
+ }
84
+
85
+ &.has-success {
86
+ .input,
87
+ .select {
88
+ border-color: $success;
89
+
90
+ &:focus { box-shadow: 0 0 5px $success-light; }
91
+ }
92
+
93
+ .radio,
94
+ .checkbox {
95
+ color: $success-dark;
96
+ }
97
+ }
98
98
  }