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,42 +6,44 @@
|
|
6
6
|
|
7
7
|
@import "../common";
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
@include export("divider") {
|
10
|
+
#{$divider-class} {
|
11
|
+
text-align: center;
|
12
|
+
overflow: hidden;
|
12
13
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
&::before {
|
25
|
-
margin-left: -100%;
|
26
|
-
left: -$margin;
|
27
|
-
}
|
14
|
+
&::after,
|
15
|
+
&::before {
|
16
|
+
content: "";
|
17
|
+
display: inline-block;
|
18
|
+
vertical-align: middle;
|
19
|
+
position: relative;
|
20
|
+
width: 100%;
|
21
|
+
border-top: 1px solid black(.1);
|
22
|
+
border-bottom: 1px solid white(.75);
|
23
|
+
}
|
28
24
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
25
|
+
&::before {
|
26
|
+
margin-#{$align-direction}: -100%;
|
27
|
+
#{$align-direction}: -$margin;
|
28
|
+
}
|
33
29
|
|
34
|
-
// Collapse the middle when there is no content
|
35
|
-
&:empty {
|
36
|
-
&::before,
|
37
30
|
&::after {
|
38
|
-
|
39
|
-
|
31
|
+
margin-#{$align-opposite-direction}: -100%;
|
32
|
+
#{$align-opposite-direction}: -$margin;
|
40
33
|
}
|
41
|
-
}
|
42
34
|
|
43
|
-
|
44
|
-
|
45
|
-
|
35
|
+
// Collapse the middle when there is no content
|
36
|
+
&:empty {
|
37
|
+
&::before,
|
38
|
+
&::after {
|
39
|
+
right: 0;
|
40
|
+
left: 0;
|
41
|
+
}
|
42
|
+
}
|
43
|
+
|
44
|
+
> span {
|
45
|
+
display: inline-block;
|
46
|
+
vertical-align: middle;
|
47
|
+
}
|
46
48
|
}
|
47
|
-
}
|
49
|
+
}
|
@@ -6,108 +6,111 @@
|
|
6
6
|
|
7
7
|
@import "../common";
|
8
8
|
|
9
|
-
|
10
|
-
@include reset-list;
|
11
|
-
text-align: left;
|
12
|
-
position: absolute;
|
13
|
-
top: 100%;
|
14
|
-
left: 0;
|
15
|
-
width: 200px;
|
16
|
-
line-height: 100%;
|
17
|
-
z-index: $drop-zindex;
|
18
|
-
opacity: 0;
|
19
|
-
visibility: hidden;
|
20
|
-
transition: left $drop-transition, opacity $drop-transition, visibility $drop-transition;
|
21
|
-
|
22
|
-
// Nested
|
9
|
+
@include export("drop") {
|
23
10
|
#{$drop-class} {
|
24
|
-
display: block;
|
25
|
-
top: 0;
|
26
|
-
left: 90%;
|
27
|
-
z-index: $drop-zindex + 1;
|
28
|
-
}
|
29
|
-
|
30
|
-
ul,
|
31
|
-
ol {
|
32
11
|
@include reset-list;
|
33
|
-
|
12
|
+
position: absolute;
|
13
|
+
top: 100%;
|
14
|
+
left: 0;
|
15
|
+
width: 200px;
|
16
|
+
line-height: 100%;
|
17
|
+
z-index: $drop-zindex;
|
18
|
+
opacity: 0;
|
19
|
+
visibility: hidden;
|
20
|
+
transition: left $drop-transition, right $drop-transition, opacity $drop-transition, visibility $drop-transition;
|
21
|
+
|
22
|
+
// Nested
|
23
|
+
#{$drop-class} {
|
24
|
+
display: block;
|
25
|
+
top: 0;
|
26
|
+
#{$align-direction}: 90%;
|
27
|
+
z-index: $drop-zindex + 1;
|
28
|
+
}
|
34
29
|
|
35
|
-
|
36
|
-
|
30
|
+
ul,
|
31
|
+
ol {
|
32
|
+
@include reset-list;
|
33
|
+
}
|
37
34
|
|
38
|
-
|
39
|
-
|
40
|
-
display: block;
|
35
|
+
li {
|
36
|
+
position: relative;
|
41
37
|
|
42
|
-
|
43
|
-
|
44
|
-
display:
|
38
|
+
> a {
|
39
|
+
padding: $small-padding;
|
40
|
+
display: block;
|
41
|
+
|
42
|
+
.caret-right,
|
43
|
+
.caret-left {
|
44
|
+
float: $align-opposite-direction;
|
45
|
+
display: none;
|
46
|
+
}
|
45
47
|
}
|
46
|
-
}
|
47
48
|
|
48
|
-
|
49
|
-
|
50
|
-
|
49
|
+
&.has-children {
|
50
|
+
> a .caret-right,
|
51
|
+
> a .caret-left { display: inline-block; }
|
52
|
+
}
|
51
53
|
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
54
|
+
// Show nested dropdown
|
55
|
+
&:hover {
|
56
|
+
#{$drop-class} {
|
57
|
+
visibility: visible;
|
58
|
+
opacity: 1;
|
59
|
+
#{$align-direction}: 100%;
|
60
|
+
}
|
58
61
|
}
|
59
62
|
}
|
60
63
|
}
|
61
|
-
}
|
62
64
|
|
63
|
-
#{$drop-class-divider} {
|
64
|
-
|
65
|
-
|
66
|
-
}
|
65
|
+
#{$drop-class-divider} {
|
66
|
+
margin: ($margin / 2) 0;
|
67
|
+
border-top: 1px solid $gray-dark;
|
68
|
+
}
|
67
69
|
|
68
|
-
#{$drop-class-heading} {
|
69
|
-
|
70
|
-
}
|
70
|
+
#{$drop-class-heading} {
|
71
|
+
padding: $small-padding;
|
72
|
+
}
|
71
73
|
|
72
|
-
//-------------------- Modifiers --------------------//
|
74
|
+
//-------------------- Modifiers --------------------//
|
73
75
|
|
74
|
-
@if index($drop-modifiers, "up") {
|
75
|
-
|
76
|
-
|
77
|
-
|
76
|
+
@if index($drop-modifiers, "up") {
|
77
|
+
#{$drop-class-modifier-up} {
|
78
|
+
top: auto;
|
79
|
+
bottom: 100%;
|
80
|
+
}
|
78
81
|
}
|
79
|
-
}
|
80
82
|
|
81
|
-
@if index($drop-modifiers, "right") {
|
82
|
-
|
83
|
-
|
84
|
-
|
83
|
+
@if index($drop-modifiers, "right") {
|
84
|
+
#{$drop-class-modifier-right} {
|
85
|
+
top: auto;
|
86
|
+
left: 100%;
|
87
|
+
}
|
85
88
|
}
|
86
|
-
}
|
87
89
|
|
88
|
-
@if index($drop-modifiers, "left") {
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
90
|
+
@if index($drop-modifiers, "left") {
|
91
|
+
#{$drop-class-modifier-left} {
|
92
|
+
top: auto;
|
93
|
+
left: auto;
|
94
|
+
right: 100%;
|
95
|
+
}
|
93
96
|
}
|
94
|
-
}
|
95
97
|
|
96
|
-
@if index($drop-modifiers, "right") or index($drop-modifiers, "left") {
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
98
|
+
@if index($drop-modifiers, "right") or index($drop-modifiers, "left") {
|
99
|
+
#{$drop-class-modifier-right},
|
100
|
+
#{$drop-class-modifier-left} {
|
101
|
+
&.reverse-align {
|
102
|
+
bottom: 0;
|
103
|
+
}
|
101
104
|
}
|
102
105
|
}
|
103
|
-
}
|
104
106
|
|
105
|
-
@if index($drop-modifiers, "down") or index($drop-modifiers, "up") {
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
107
|
+
@if index($drop-modifiers, "down") or index($drop-modifiers, "up") {
|
108
|
+
#{$drop-class-modifier-down},
|
109
|
+
#{$drop-class-modifier-up} {
|
110
|
+
&.reverse-align {
|
111
|
+
left: auto;
|
112
|
+
right: 0;
|
113
|
+
}
|
111
114
|
}
|
112
115
|
}
|
113
|
-
}
|
116
|
+
}
|
@@ -0,0 +1,110 @@
|
|
1
|
+
/**
|
2
|
+
* @copyright 2010-2015, The Titon Project
|
3
|
+
* @license http://opensource.org/licenses/BSD-3-Clause
|
4
|
+
* @link http://titon.io
|
5
|
+
*/
|
6
|
+
|
7
|
+
@import "../common";
|
8
|
+
|
9
|
+
@include export("flex") {
|
10
|
+
#{$flex-class-region} {
|
11
|
+
@include flex-region();
|
12
|
+
|
13
|
+
// Alignment
|
14
|
+
&.flow-top,
|
15
|
+
&.flow-left { @include flex-region-align(left); }
|
16
|
+
&.flow-bottom,
|
17
|
+
&.flow-right { @include flex-region-align(right); }
|
18
|
+
&.flow-center { @include flex-region-align(center); }
|
19
|
+
&.flow-between { @include flex-region-align(between); }
|
20
|
+
&.flow-around { @include flex-region-align(around); }
|
21
|
+
|
22
|
+
// Support RTL
|
23
|
+
@if $text-direction == rtl {
|
24
|
+
writing-mode: vertical-rl;
|
25
|
+
}
|
26
|
+
}
|
27
|
+
|
28
|
+
#{$flex-class-block} {
|
29
|
+
@include flex-block();
|
30
|
+
@include flex-block-order();
|
31
|
+
|
32
|
+
// Override parent alignment
|
33
|
+
&.self-top,
|
34
|
+
&.self-left { @include flex-block-align(top); }
|
35
|
+
&.self-bottom,
|
36
|
+
&.self-right { @include flex-block-align(bottom); }
|
37
|
+
&.self-center { @include flex-block-align(center); }
|
38
|
+
&.self-baseline { @include flex-block-align(baseline); }
|
39
|
+
&.self-stretch { @include flex-block-align(stretch); }
|
40
|
+
|
41
|
+
// Resizing
|
42
|
+
&.grow { flex-grow: 1; }
|
43
|
+
&.no-grow { flex-grow: 0; }
|
44
|
+
&.shrink { flex-shrink: 1; }
|
45
|
+
&.no-shrink { flex-shrink: 0; }
|
46
|
+
}
|
47
|
+
|
48
|
+
// Global ordering
|
49
|
+
@for $i from 1 through $flex-order-count {
|
50
|
+
.order-#{$i} { @include flex-block-order($i); }
|
51
|
+
}
|
52
|
+
|
53
|
+
// Responsive sizes
|
54
|
+
@each $size, $options in $flex-sizes {
|
55
|
+
$size-columns: nth($options, 1);
|
56
|
+
|
57
|
+
@include in-range(nth($options, 2)) {
|
58
|
+
@for $i from 1 through $size-columns {
|
59
|
+
#{$flex-class-block}.#{$size}-#{$i} { flex-basis: flex-span($i, $size-columns); }
|
60
|
+
}
|
61
|
+
|
62
|
+
// Responsive ordering
|
63
|
+
@for $i from 1 through $flex-order-count {
|
64
|
+
.#{$size}-order-#{$i} { @include flex-block-order($i); }
|
65
|
+
}
|
66
|
+
}
|
67
|
+
}
|
68
|
+
|
69
|
+
//-------------------- Modifiers --------------------//
|
70
|
+
|
71
|
+
// Generate a grid of blocks with equal spacing between
|
72
|
+
@if index($flex-modifiers, "grid") {
|
73
|
+
#{$flex-class-modifier-grid} {
|
74
|
+
flex-flow: row wrap;
|
75
|
+
justify-content: flex-start;
|
76
|
+
align-content: flex-start;
|
77
|
+
max-width: none;
|
78
|
+
|
79
|
+
@if $flex-grid-gutter {
|
80
|
+
margin-top: -$flex-grid-gutter;
|
81
|
+
margin-left: -$flex-grid-gutter;
|
82
|
+
}
|
83
|
+
|
84
|
+
> #{$flex-class-block} {
|
85
|
+
margin-top: $flex-grid-gutter;
|
86
|
+
margin-left: $flex-grid-gutter;
|
87
|
+
}
|
88
|
+
}
|
89
|
+
}
|
90
|
+
|
91
|
+
// Display blocks vertically or horizontally regardless of orientation
|
92
|
+
@if index($flex-modifiers, "horizontal") {
|
93
|
+
#{$flex-class-modifier-horizontal} {
|
94
|
+
@include flex-region-orientation(horizontal);
|
95
|
+
}
|
96
|
+
}
|
97
|
+
|
98
|
+
@if index($flex-modifiers, "vertical") {
|
99
|
+
#{$flex-class-modifier-vertical} {
|
100
|
+
@include flex-region-orientation(vertical);
|
101
|
+
}
|
102
|
+
}
|
103
|
+
|
104
|
+
// Wrap blocks onto the next line instead of trying to squish into 1 line
|
105
|
+
@if index($flex-modifiers, "wrap") {
|
106
|
+
#{$flex-class-modifier-wrap} {
|
107
|
+
@include flex-region-wrap();
|
108
|
+
}
|
109
|
+
}
|
110
|
+
}
|
@@ -6,71 +6,77 @@
|
|
6
6
|
|
7
7
|
@import "../common";
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
9
|
+
@include export("flyout") {
|
10
|
+
#{$flyout-class} {
|
11
|
+
position: absolute;
|
12
|
+
top: 0;
|
13
|
+
#{$align-direction}: 0;
|
14
|
+
z-index: $flyout-zindex;
|
15
|
+
opacity: 0;
|
16
|
+
visibility: hidden;
|
17
|
+
transition: opacity $flyout-transition, visibility $flyout-transition;
|
17
18
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
19
|
+
ul {
|
20
|
+
@include reset-list;
|
21
|
+
float: $align-direction;
|
22
|
+
width: 200px;
|
23
|
+
}
|
23
24
|
|
24
|
-
|
25
|
-
|
25
|
+
li {
|
26
|
+
position: relative;
|
26
27
|
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
28
|
+
> a {
|
29
|
+
padding: $small-padding;
|
30
|
+
line-height: 100%;
|
31
|
+
display: block;
|
32
|
+
text-decoration: none;
|
32
33
|
|
33
|
-
|
34
|
-
|
34
|
+
.caret-right,
|
35
|
+
.caret-left { display: none; }
|
36
|
+
}
|
35
37
|
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
38
|
+
// Display caret arrow
|
39
|
+
&.has-children > a {
|
40
|
+
.caret-right,
|
41
|
+
.caret-left {
|
42
|
+
float: $align-opposite-direction;
|
43
|
+
display: inline-block; // reveal
|
44
|
+
margin-top: 3px;
|
45
|
+
}
|
46
|
+
}
|
42
47
|
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
48
|
+
// Nested flyouts
|
49
|
+
> #{$flyout-class} {
|
50
|
+
#{$align-direction}: 90%;
|
51
|
+
transition: left $flyout-transition, right $flyout-transition, opacity $flyout-transition, visibility $flyout-transition;
|
47
52
|
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
+
// Reverse menu to left side in case it goes outside the viewport
|
54
|
+
// Will be set automatically from the Javascript layer
|
55
|
+
&.push-opposite {
|
56
|
+
#{$align-direction}: auto;
|
57
|
+
#{$align-opposite-direction}: 90%;
|
58
|
+
}
|
53
59
|
}
|
54
|
-
}
|
55
60
|
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
61
|
+
&.is-open > #{$flyout-class} {
|
62
|
+
opacity: 1;
|
63
|
+
visibility: visible;
|
64
|
+
#{$align-direction}: 100%;
|
60
65
|
|
61
|
-
|
62
|
-
|
63
|
-
|
66
|
+
&.push-opposite {
|
67
|
+
#{$align-direction}: auto;
|
68
|
+
#{$align-opposite-direction}: 100%;
|
69
|
+
}
|
64
70
|
}
|
65
71
|
}
|
72
|
+
|
73
|
+
@include clear-fix;
|
66
74
|
}
|
67
75
|
|
68
|
-
|
76
|
+
#{$flyout-class-heading} {
|
77
|
+
padding: $small-padding;
|
78
|
+
line-height: 100%;
|
79
|
+
display: block;
|
80
|
+
text-decoration: none;
|
81
|
+
}
|
69
82
|
}
|
70
|
-
|
71
|
-
#{$flyout-class-heading} {
|
72
|
-
padding: $small-padding;
|
73
|
-
line-height: 100%;
|
74
|
-
display: block;
|
75
|
-
text-decoration: none;
|
76
|
-
}
|