titon-toolkit 0.9.4 → 0.10.0
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.
- data/license.md +23 -0
- data/readme.md +93 -0
- data/src/lib/titon-toolkit.rb +2 -2
- data/src/scss/toolkit.scss +3 -3
- data/src/scss/toolkit/effects/visual.scss +47 -47
- data/src/scss/toolkit/layout/base.scss +32 -32
- data/src/scss/toolkit/layout/code.scss +38 -38
- data/src/scss/toolkit/layout/form.scss +86 -86
- data/src/scss/toolkit/layout/grid.scss +31 -31
- data/src/scss/toolkit/layout/input-group.scss +41 -41
- data/src/scss/toolkit/layout/responsive.scss +21 -21
- data/src/scss/toolkit/layout/table.scss +59 -59
- data/src/scss/toolkit/layout/typography.scss +18 -18
- data/src/scss/toolkit/mixins/_grid.scss +8 -8
- data/src/scss/toolkit/mixins/_layout.scss +36 -36
- data/src/scss/toolkit/mixins/_responsive.scss +56 -56
- data/src/scss/toolkit/mixins/_themes.scss +78 -78
- data/src/scss/toolkit/modules/accordion.scss +33 -33
- data/src/scss/toolkit/modules/blackout.scss +13 -13
- data/src/scss/toolkit/modules/carousel.scss +141 -141
- data/src/scss/toolkit/modules/flyout.scss +57 -57
- data/src/scss/toolkit/modules/modal.scss +206 -206
- data/src/scss/toolkit/modules/popover.scss +58 -58
- data/src/scss/toolkit/modules/showcase.scss +135 -135
- data/src/scss/toolkit/modules/tabs.scss +29 -29
- data/src/scss/toolkit/modules/tooltip.scss +109 -109
- data/src/scss/toolkit/modules/type-ahead.scss +44 -44
- data/src/scss/toolkit/themes/titon.scss +242 -242
- data/src/scss/toolkit/themes/tomorrow-night.scss +322 -322
- data/src/scss/toolkit/ui/alert.scss +29 -29
- data/src/scss/toolkit/ui/breadcrumbs.scss +41 -41
- data/src/scss/toolkit/ui/button-group.scss +181 -181
- data/src/scss/toolkit/ui/button.scss +31 -31
- data/src/scss/toolkit/ui/dropdown.scss +83 -83
- data/src/scss/toolkit/ui/icon.scss +5 -5
- data/src/scss/toolkit/ui/label-badge.scss +48 -48
- data/src/scss/toolkit/ui/lazy-load.scss +8 -5
- data/src/scss/toolkit/ui/matrix.scss +26 -0
- data/src/scss/toolkit/ui/pagination.scss +108 -108
- data/src/scss/toolkit/ui/pin.scss +5 -5
- data/src/scss/toolkit/ui/progress.scss +20 -20
- data/version.md +1 -0
- metadata +17 -5
- 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
|
-
|
7
|
+
@return $grid-width * $n;
|
8
8
|
}
|
9
9
|
|
10
10
|
// Styles for the row containing the columns
|
11
11
|
@mixin grid-row() {
|
12
|
-
|
13
|
-
|
14
|
-
|
12
|
+
text-align: left;
|
13
|
+
width: 100%;
|
14
|
+
max-width: 100%;
|
15
15
|
|
16
|
-
|
16
|
+
@include clear-fix;
|
17
17
|
}
|
18
18
|
|
19
19
|
// Styles for the column
|
20
20
|
@mixin grid-column() {
|
21
|
-
|
22
|
-
|
23
|
-
|
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
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
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
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
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
|
-
|
41
|
-
|
42
|
-
|
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
|
-
|
50
|
-
|
49
|
+
font-size: $small-size;
|
50
|
+
padding: $small-padding;
|
51
51
|
}
|
52
52
|
|
53
53
|
@mixin size-medium {
|
54
|
-
|
55
|
-
|
54
|
+
font-size: $medium-size;
|
55
|
+
padding: $medium-padding;
|
56
56
|
}
|
57
57
|
|
58
58
|
@mixin size-large {
|
59
|
-
|
60
|
-
|
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
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
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
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
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
|
-
|
85
|
+
@return rgba(0, 0, 0, $opacity);
|
86
86
|
}
|
87
87
|
|
88
88
|
@function white($opacity){
|
89
|
-
|
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
|
-
|
12
|
-
|
13
|
-
|
11
|
+
@media only screen and (min-width: $min) {
|
12
|
+
@content;
|
13
|
+
}
|
14
14
|
}
|
15
15
|
|
16
16
|
@mixin if-max($max) {
|
17
|
-
|
18
|
-
|
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
|
-
|
24
|
-
|
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
|
-
|
30
|
-
|
31
|
-
|
29
|
+
@media only screen and (orientation: landscape) {
|
30
|
+
@content;
|
31
|
+
}
|
32
32
|
}
|
33
33
|
|
34
34
|
@mixin if-portrait {
|
35
|
-
|
36
|
-
|
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
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
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
|
-
|
66
|
-
|
67
|
-
|
65
|
+
@include do-responsive(null, $breakpoint-tablet-landscape) {
|
66
|
+
@content;
|
67
|
+
}
|
68
68
|
}
|
69
69
|
|
70
70
|
@mixin if-tablet-landscape {
|
71
|
-
|
72
|
-
|
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
|
-
|
78
|
-
|
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
|
-
|
84
|
-
|
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
|
-
|
90
|
-
|
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
|
-
|
97
|
-
|
98
|
-
|
96
|
+
@include if-min($breakpoint-tablet-landscape + 1) {
|
97
|
+
@content;
|
98
|
+
}
|
99
99
|
}
|
100
100
|
|
101
101
|
@mixin in-tablet {
|
102
|
-
|
103
|
-
|
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
|
-
|
109
|
-
|
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
|
-
|
4
|
-
|
5
|
-
|
3
|
+
color: $text;
|
4
|
+
background: $bg;
|
5
|
+
border: 1px solid shade($bg, 10%);
|
6
6
|
|
7
|
-
|
7
|
+
hr { border-color: shade($bg, 10%); }
|
8
8
|
|
9
|
-
|
10
|
-
|
9
|
+
a { color: shade($text, 10%); }
|
10
|
+
a:hover { color: tint($text, 25%); }
|
11
11
|
|
12
|
-
|
12
|
+
@content;
|
13
13
|
}
|
14
14
|
|
15
15
|
@mixin button-style($base, $light, $dark) {
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
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
|
-
|
42
|
-
|
41
|
+
background: $bg;
|
42
|
+
color: $text;
|
43
43
|
|
44
|
-
|
44
|
+
@content;
|
45
45
|
}
|
46
46
|
|
47
47
|
@mixin progress-style($bg, $border) {
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
48
|
+
background: $bg;
|
49
|
+
text-shadow: 1px 1px $border;
|
50
|
+
border: 1px solid tint($border, 35%);
|
51
|
+
border-right: 0;
|
52
52
|
|
53
|
-
|
53
|
+
@content;
|
54
54
|
}
|
55
55
|
|
56
56
|
@mixin field-style() {
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
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
|
}
|