titon-toolkit 2.0.2 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/changelog.md +66 -183
- data/readme.md +17 -8
- data/roadmap.md +13 -11
- data/scss/toolkit.scss +3 -2
- data/scss/toolkit/_common.scss +72 -22
- data/scss/toolkit/base.scss +12 -1
- data/scss/toolkit/components/accordion.scss +19 -17
- data/scss/toolkit/components/blackout.scss +20 -18
- data/scss/toolkit/components/breadcrumb.scss +37 -36
- data/scss/toolkit/components/button-group.scss +130 -128
- data/scss/toolkit/components/button.scss +100 -98
- data/scss/toolkit/components/carousel.scss +63 -63
- data/scss/toolkit/components/code.scss +49 -47
- data/scss/toolkit/components/divider.scss +34 -32
- data/scss/toolkit/components/drop.scss +82 -79
- data/scss/toolkit/components/flex.scss +110 -0
- data/scss/toolkit/components/flyout.scss +59 -53
- data/scss/toolkit/components/form.scss +178 -170
- data/scss/toolkit/components/grid.scss +36 -34
- data/scss/toolkit/components/icon.scss +28 -25
- data/scss/toolkit/components/input-group.scss +35 -33
- data/scss/toolkit/components/input.scss +102 -99
- data/scss/toolkit/components/label.scss +99 -97
- data/scss/toolkit/components/lazy-load.scss +6 -4
- data/scss/toolkit/components/loader.scss +124 -122
- data/scss/toolkit/components/mask.scss +24 -22
- data/scss/toolkit/components/matrix.scss +16 -14
- data/scss/toolkit/components/modal.scss +104 -102
- data/scss/toolkit/components/notice.scss +24 -23
- data/scss/toolkit/components/off-canvas.scss +118 -116
- data/scss/toolkit/components/pagination.scss +90 -66
- data/scss/toolkit/components/pin.scss +11 -9
- data/scss/toolkit/components/popover.scss +50 -48
- data/scss/toolkit/components/progress.scss +42 -40
- data/scss/toolkit/components/responsive.scss +61 -66
- data/scss/toolkit/components/showcase.scss +62 -60
- data/scss/toolkit/components/step.scss +51 -44
- data/scss/toolkit/components/switch.scss +96 -93
- data/scss/toolkit/components/tab.scss +25 -25
- data/scss/toolkit/components/table.scss +76 -75
- data/scss/toolkit/components/toast.scss +91 -89
- data/scss/toolkit/components/tooltip.scss +82 -80
- data/scss/toolkit/components/type-ahead.scss +53 -52
- data/scss/toolkit/components/typography.scss +45 -43
- data/scss/toolkit/mixins/_flex.scss +80 -0
- data/scss/toolkit/mixins/_grid.scss +6 -29
- data/scss/toolkit/mixins/_helper.scss +33 -4
- data/scss/toolkit/mixins/_layout.scss +28 -1
- data/version.md +1 -1
- metadata +4 -2
@@ -6,60 +6,67 @@
|
|
6
6
|
|
7
7
|
@import "../common";
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
@include export("step") {
|
10
|
+
#{$step-class-wrapper} {
|
11
|
+
margin: $margin 0;
|
12
|
+
font-size: $medium-size;
|
12
13
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
14
|
+
ol {
|
15
|
+
@include reset-list;
|
16
|
+
display: inline-block;
|
17
|
+
overflow: hidden;
|
18
|
+
@include clear-fix;
|
19
|
+
}
|
19
20
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
21
|
+
// Use em's to scale against the size defined on .steps
|
22
|
+
#{$step-class} {
|
23
|
+
padding-#{$align-direction}: 3.5em;
|
24
|
+
padding-#{$align-opposite-direction}: 2em;
|
25
|
+
position: relative;
|
26
|
+
display: block;
|
27
|
+
line-height: 3em;
|
28
|
+
height: 3em;
|
27
29
|
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
30
|
+
// Golden ratio? Seems to work for all font sizes in *most* browsers
|
31
|
+
&::after {
|
32
|
+
height: 2.165em;
|
33
|
+
width: 2.165em;
|
34
|
+
top: 0.425em;
|
35
|
+
#{$align-opposite-direction}: -1.1em;
|
36
|
+
position: absolute;
|
37
|
+
z-index: 2;
|
38
|
+
content: "";
|
39
|
+
@if $text-direction == ltr {
|
40
|
+
transform: rotate(315deg);
|
41
|
+
} @else {
|
42
|
+
transform: rotate(135deg);
|
43
|
+
}
|
44
|
+
}
|
38
45
|
}
|
39
|
-
}
|
40
46
|
|
41
|
-
|
42
|
-
|
43
|
-
|
47
|
+
li {
|
48
|
+
@include reset-inline-block;
|
49
|
+
float: $align-direction;
|
44
50
|
|
45
|
-
|
46
|
-
|
47
|
-
|
51
|
+
&:first-child {
|
52
|
+
#{$step-class} {
|
53
|
+
padding-#{$align-direction}: 2em;
|
54
|
+
}
|
48
55
|
}
|
49
|
-
}
|
50
56
|
|
51
|
-
|
52
|
-
|
53
|
-
|
57
|
+
&:last-child {
|
58
|
+
#{$step-class} {
|
59
|
+
&::after { display: none; }
|
60
|
+
}
|
54
61
|
}
|
55
62
|
}
|
56
|
-
}
|
57
63
|
|
58
|
-
|
59
|
-
|
60
|
-
|
64
|
+
@include is-small {
|
65
|
+
font-size: $small-size;
|
66
|
+
}
|
61
67
|
|
62
|
-
|
63
|
-
|
68
|
+
@include is-large {
|
69
|
+
font-size: $large-size;
|
70
|
+
}
|
64
71
|
}
|
65
|
-
}
|
72
|
+
}
|
@@ -6,132 +6,135 @@
|
|
6
6
|
|
7
7
|
@import "../common";
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
9
|
+
@include export("switch") {
|
10
|
+
#{$switch-class} {
|
11
|
+
@include reset-inline-block;
|
12
|
+
font-size: 0;
|
13
|
+
width: 100px;
|
14
|
+
cursor: pointer;
|
15
|
+
|
16
|
+
&.is-disabled {
|
17
|
+
opacity: $disabled-opacity;
|
18
|
+
}
|
18
19
|
|
19
|
-
|
20
|
-
|
20
|
+
input {
|
21
|
+
display: none;
|
21
22
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
23
|
+
&:checked + #{$switch-class-bar} {
|
24
|
+
#{$switch-class-toggle} {
|
25
|
+
left: 50%;
|
26
|
+
}
|
26
27
|
|
27
|
-
|
28
|
-
|
28
|
+
&::before { opacity: 1; }
|
29
|
+
&::after { opacity: 0; }
|
30
|
+
}
|
29
31
|
}
|
30
|
-
}
|
31
32
|
|
32
|
-
|
33
|
-
|
33
|
+
@include is-small() {
|
34
|
+
width: 70px;
|
35
|
+
|
36
|
+
#{$switch-class-bar} {
|
37
|
+
font-size: $small-size;
|
34
38
|
|
35
|
-
|
36
|
-
|
39
|
+
&::before,
|
40
|
+
&::after {
|
41
|
+
padding: $small-padding;
|
42
|
+
}
|
43
|
+
}
|
37
44
|
|
38
|
-
|
39
|
-
&::after {
|
45
|
+
#{$switch-class-toggle} {
|
40
46
|
padding: $small-padding;
|
41
47
|
}
|
42
48
|
}
|
43
49
|
|
44
|
-
|
45
|
-
|
46
|
-
}
|
47
|
-
}
|
50
|
+
@include is-large() {
|
51
|
+
width: 130px;
|
48
52
|
|
49
|
-
|
50
|
-
|
53
|
+
#{$switch-class-bar} {
|
54
|
+
font-size: $large-size;
|
51
55
|
|
52
|
-
|
53
|
-
|
56
|
+
&::before,
|
57
|
+
&::after {
|
58
|
+
padding: $large-padding;
|
59
|
+
}
|
60
|
+
}
|
54
61
|
|
55
|
-
|
56
|
-
&::after {
|
62
|
+
#{$switch-class-toggle} {
|
57
63
|
padding: $large-padding;
|
58
64
|
}
|
59
65
|
}
|
60
|
-
|
61
|
-
#{$switch-class-toggle} {
|
62
|
-
padding: $large-padding;
|
63
|
-
}
|
64
66
|
}
|
65
|
-
}
|
66
|
-
|
67
|
-
#{$switch-class-bar} {
|
68
|
-
display: block;
|
69
|
-
position: relative;
|
70
|
-
font-size: $medium-size;
|
71
|
-
transition: background $switch-transition;
|
72
67
|
|
73
|
-
|
74
|
-
|
75
|
-
position:
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
&::after {
|
90
|
-
right: 0;
|
91
|
-
content: attr(data-switch-off);
|
92
|
-
}
|
68
|
+
#{$switch-class-bar} {
|
69
|
+
display: block;
|
70
|
+
position: relative;
|
71
|
+
font-size: $medium-size;
|
72
|
+
transition: background $switch-transition;
|
73
|
+
text-align: left;
|
74
|
+
|
75
|
+
&::before,
|
76
|
+
&::after {
|
77
|
+
position: absolute;
|
78
|
+
padding: $medium-padding;
|
79
|
+
top: 0;
|
80
|
+
opacity: 1;
|
81
|
+
z-index: 1;
|
82
|
+
transition: opacity $switch-transition;
|
83
|
+
}
|
93
84
|
|
94
|
-
|
85
|
+
&::before {
|
86
|
+
left: 0;
|
87
|
+
opacity: 0;
|
88
|
+
content: attr(data-switch-on);
|
89
|
+
}
|
95
90
|
|
96
|
-
|
97
|
-
|
98
|
-
|
91
|
+
&::after {
|
92
|
+
right: 0;
|
93
|
+
content: attr(data-switch-off);
|
99
94
|
}
|
100
|
-
}
|
101
95
|
|
102
|
-
|
103
|
-
&#{$shape-pill-class} {
|
104
|
-
border-radius: $pill;
|
96
|
+
//----- Effects -----//
|
105
97
|
|
98
|
+
&#{$shape-round-class} {
|
106
99
|
#{$switch-class-toggle} {
|
100
|
+
border-radius: $round - 0.02;
|
101
|
+
}
|
102
|
+
}
|
103
|
+
|
104
|
+
@if index($switch-effects, "pill") {
|
105
|
+
&#{$shape-pill-class} {
|
107
106
|
border-radius: $pill;
|
107
|
+
|
108
|
+
#{$switch-class-toggle} {
|
109
|
+
border-radius: $pill;
|
110
|
+
}
|
108
111
|
}
|
109
112
|
}
|
110
113
|
}
|
111
|
-
}
|
112
114
|
|
113
|
-
#{$switch-class-toggle} {
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
115
|
+
#{$switch-class-toggle} {
|
116
|
+
@include reset-inline-block;
|
117
|
+
padding: $medium-padding;
|
118
|
+
width: 50%;
|
119
|
+
z-index: 2;
|
120
|
+
left: 0;
|
121
|
+
user-select: none;
|
122
|
+
transition: left $switch-transition;
|
121
123
|
|
122
|
-
|
123
|
-
}
|
124
|
+
&::before { content: "\00A0"; } // NBSP
|
125
|
+
}
|
124
126
|
|
125
|
-
//-------------------- Modifiers --------------------//
|
127
|
+
//-------------------- Modifiers --------------------//
|
126
128
|
|
127
|
-
@if index($switch-modifiers, "stacked") {
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
129
|
+
@if index($switch-modifiers, "stacked") {
|
130
|
+
#{$switch-class-modifier-stacked} {
|
131
|
+
#{$switch-class-bar} {
|
132
|
+
&::before,
|
133
|
+
&::after {
|
134
|
+
z-index: 3;
|
135
|
+
opacity: 1 !important;
|
136
|
+
}
|
134
137
|
}
|
135
138
|
}
|
136
139
|
}
|
137
|
-
}
|
140
|
+
}
|
@@ -6,37 +6,37 @@
|
|
6
6
|
|
7
7
|
@import "../common";
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
}
|
9
|
+
@include export("tab") {
|
10
|
+
#{$tab-class} { }
|
12
11
|
|
13
|
-
#{$tab-class-nav} {
|
14
|
-
|
15
|
-
|
12
|
+
#{$tab-class-nav} {
|
13
|
+
display: block;
|
14
|
+
margin-bottom: $margin;
|
16
15
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
16
|
+
ul, ol, li {
|
17
|
+
@include reset-list;
|
18
|
+
display: inline-block;
|
19
|
+
}
|
21
20
|
|
22
|
-
|
23
|
-
}
|
21
|
+
@include clear-fix;
|
22
|
+
}
|
24
23
|
|
25
|
-
// Add display none on sections since visibility property takes up DOM space
|
26
|
-
#{$tab-class-section}.hide {
|
27
|
-
|
28
|
-
}
|
24
|
+
// Add display none on sections since visibility property takes up DOM space
|
25
|
+
#{$tab-class-section}.hide {
|
26
|
+
display: none;
|
27
|
+
}
|
29
28
|
|
30
|
-
//-------------------- Modifiers --------------------//
|
29
|
+
//-------------------- Modifiers --------------------//
|
31
30
|
|
32
|
-
@if index($tab-modifiers, "horizontal") {
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
31
|
+
@if index($tab-modifiers, "horizontal") {
|
32
|
+
#{$tab-class-modifier-horizontal} {
|
33
|
+
#{$tab-class-nav} {
|
34
|
+
ul, ol, li, a, button {
|
35
|
+
display: block;
|
36
|
+
float: none;
|
37
|
+
text-align: $align-direction;
|
38
|
+
}
|
39
39
|
}
|
40
40
|
}
|
41
41
|
}
|
42
|
-
}
|
42
|
+
}
|
@@ -6,108 +6,109 @@
|
|
6
6
|
|
7
7
|
@import "../common";
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
9
|
+
@include export("table") {
|
10
|
+
#{$table-class} {
|
11
|
+
width: 100%;
|
12
|
+
margin-top: $margin;
|
13
|
+
background: $gray-lightest;
|
14
|
+
border-collapse: collapse;
|
15
|
+
|
16
|
+
th, td {
|
17
|
+
padding: $padding;
|
18
|
+
line-height: 110%;
|
19
|
+
vertical-align: top;
|
20
|
+
border: 1px solid $gray-dark;
|
21
|
+
}
|
21
22
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
text-align: left;
|
23
|
+
// Move headings to bottom
|
24
|
+
thead th {
|
25
|
+
vertical-align: bottom;
|
26
26
|
|
27
|
-
|
28
|
-
|
27
|
+
.sorter {
|
28
|
+
margin: -.5rem .25rem;
|
29
|
+
}
|
29
30
|
}
|
30
|
-
}
|
31
31
|
|
32
|
-
|
33
|
-
|
32
|
+
// Allow for multiple tbody's
|
33
|
+
tbody + tbody { border-top-width: 2px; }
|
34
|
+
|
35
|
+
// Row colors
|
36
|
+
thead tr,
|
37
|
+
tfoot tr {
|
38
|
+
background: $gray-dark;
|
34
39
|
|
35
|
-
|
36
|
-
|
37
|
-
tfoot tr {
|
38
|
-
background: $gray-dark;
|
40
|
+
th { border-color: $gray-darkest; }
|
41
|
+
}
|
39
42
|
|
40
|
-
|
43
|
+
// Divider
|
44
|
+
tbody tr#{$table-class-divider} { background: $gray-dark !important; }
|
41
45
|
}
|
42
46
|
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
width: 100%;
|
49
|
-
max-width: 100%;
|
50
|
-
overflow-x: auto;
|
51
|
-
}
|
47
|
+
#{$table-class-responsive} {
|
48
|
+
width: 100%;
|
49
|
+
max-width: 100%;
|
50
|
+
overflow-x: auto;
|
51
|
+
}
|
52
52
|
|
53
|
-
//-------------------- Modifiers --------------------//
|
53
|
+
//-------------------- Modifiers --------------------//
|
54
54
|
|
55
|
-
#{$table-class}.has-hover {
|
56
|
-
|
57
|
-
}
|
55
|
+
#{$table-class}.has-hover {
|
56
|
+
tbody tr:not(#{$table-class-divider}):hover { background: #fff; }
|
57
|
+
}
|
58
58
|
|
59
|
-
#{$table-class}.is-striped tbody tr {
|
60
|
-
|
59
|
+
#{$table-class}.is-striped tbody tr {
|
60
|
+
background: $gray;
|
61
61
|
|
62
|
-
|
63
|
-
}
|
62
|
+
&:nth-child(odd) { background: $gray-lightest; }
|
63
|
+
}
|
64
64
|
|
65
|
-
#{$table-class}.is-sortable {
|
66
|
-
|
67
|
-
|
65
|
+
#{$table-class}.is-sortable {
|
66
|
+
thead th {
|
67
|
+
padding: 0;
|
68
68
|
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
69
|
+
> a,
|
70
|
+
> span {
|
71
|
+
padding: $padding;
|
72
|
+
display: block;
|
73
|
+
}
|
74
74
|
|
75
|
-
|
76
|
-
|
75
|
+
> a {
|
76
|
+
background: $gray-dark;
|
77
77
|
|
78
|
-
|
78
|
+
&:hover { background: $gray-darkest; }
|
79
|
+
}
|
79
80
|
}
|
80
81
|
}
|
81
|
-
}
|
82
82
|
|
83
|
-
//-------------------- Sizes --------------------//
|
83
|
+
//-------------------- Sizes --------------------//
|
84
84
|
|
85
|
-
#{$table-class} {
|
86
|
-
|
87
|
-
|
88
|
-
|
85
|
+
#{$table-class} {
|
86
|
+
@include is-small {
|
87
|
+
thead th,
|
88
|
+
tbody td { padding: $small-padding; }
|
89
89
|
|
90
|
-
|
91
|
-
|
92
|
-
|
90
|
+
&.is-sortable {
|
91
|
+
thead th {
|
92
|
+
padding: 0;
|
93
93
|
|
94
|
-
|
95
|
-
|
94
|
+
> a,
|
95
|
+
> span { padding: $small-padding; }
|
96
|
+
}
|
96
97
|
}
|
97
98
|
}
|
98
|
-
}
|
99
99
|
|
100
|
-
|
101
|
-
|
102
|
-
|
100
|
+
@include is-large {
|
101
|
+
thead th,
|
102
|
+
tbody td { padding: $large-padding; }
|
103
103
|
|
104
|
-
|
105
|
-
|
106
|
-
|
104
|
+
&.is-sortable {
|
105
|
+
thead th {
|
106
|
+
padding: 0;
|
107
107
|
|
108
|
-
|
109
|
-
|
108
|
+
> a,
|
109
|
+
> span { padding: $large-padding; }
|
110
|
+
}
|
110
111
|
}
|
111
112
|
}
|
112
113
|
}
|
113
|
-
}
|
114
|
+
}
|