titon-toolkit 1.5.3 → 2.0.0.pre.rc.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. checksums.yaml +4 -4
  2. data/changelog.md +180 -61
  3. data/license.md +1 -1
  4. data/readme.md +7 -7
  5. data/roadmap.md +4 -20
  6. data/scss/toolkit/_common.scss +426 -73
  7. data/scss/toolkit/{layout/base.scss → base.scss} +13 -25
  8. data/scss/toolkit/components/accordion.scss +6 -6
  9. data/scss/toolkit/components/blackout.scss +13 -11
  10. data/scss/toolkit/components/breadcrumb.scss +2 -2
  11. data/scss/toolkit/components/button-group.scss +130 -51
  12. data/scss/toolkit/components/button.scss +110 -9
  13. data/scss/toolkit/components/carousel.scss +20 -46
  14. data/scss/toolkit/{layout → components}/code.scss +1 -1
  15. data/scss/toolkit/components/divider.scss +24 -23
  16. data/scss/toolkit/components/drop.scss +35 -26
  17. data/scss/toolkit/components/flyout.scss +5 -10
  18. data/scss/toolkit/{layout → components}/form.scss +72 -65
  19. data/scss/toolkit/components/grid.scss +21 -116
  20. data/scss/toolkit/components/icon.scss +27 -13
  21. data/scss/toolkit/components/input-group.scss +4 -6
  22. data/scss/toolkit/components/input.scss +21 -21
  23. data/scss/toolkit/components/label.scss +76 -66
  24. data/scss/toolkit/components/lazy-load.scss +2 -2
  25. data/scss/toolkit/components/loader.scss +8 -8
  26. data/scss/toolkit/components/mask.scss +5 -9
  27. data/scss/toolkit/components/matrix.scss +4 -4
  28. data/scss/toolkit/components/modal.scss +33 -40
  29. data/scss/toolkit/components/notice.scss +5 -9
  30. data/scss/toolkit/components/off-canvas.scss +80 -60
  31. data/scss/toolkit/components/pagination.scss +75 -34
  32. data/scss/toolkit/components/pin.scss +7 -3
  33. data/scss/toolkit/components/popover.scss +14 -14
  34. data/scss/toolkit/components/progress.scss +25 -14
  35. data/scss/toolkit/{layout → components}/responsive.scss +31 -37
  36. data/scss/toolkit/components/showcase.scss +10 -36
  37. data/scss/toolkit/components/step.scss +7 -7
  38. data/scss/toolkit/components/switch.scss +47 -33
  39. data/scss/toolkit/components/tab.scss +42 -0
  40. data/scss/toolkit/components/table.scss +27 -25
  41. data/scss/toolkit/components/toast.scss +13 -9
  42. data/scss/toolkit/components/tooltip.scss +15 -16
  43. data/scss/toolkit/components/type-ahead.scss +6 -6
  44. data/scss/toolkit/{layout → components}/typography.scss +2 -2
  45. data/scss/toolkit/mixins/_components.scss +12 -6
  46. data/scss/toolkit/mixins/_grid.scss +5 -1
  47. data/scss/toolkit/mixins/_helper.scss +42 -3
  48. data/scss/toolkit/mixins/_layout.scss +22 -13
  49. data/scss/toolkit/mixins/_responsive.scss +39 -39
  50. data/scss/toolkit.scss +12 -18
  51. data/version.md +1 -1
  52. metadata +16 -22
  53. data/scss/toolkit/components/tabs.scss +0 -43
  54. data/scss/toolkit/effects/oval.scss +0 -37
  55. data/scss/toolkit/effects/pill.scss +0 -94
  56. data/scss/toolkit/effects/skew.scss +0 -85
  57. data/scss/toolkit/effects/visual.scss +0 -64
  58. data/scss/toolkit/mixins/_state.scss +0 -36
  59. data/scss/toolkit/themes/demo.scss +0 -569
@@ -1,23 +1,19 @@
1
1
  /**
2
- * @copyright 2010-2014, The Titon Project
2
+ * @copyright 2010-2015, The Titon Project
3
3
  * @license http://opensource.org/licenses/BSD-3-Clause
4
4
  * @link http://titon.io
5
5
  */
6
6
 
7
7
  @import "../common";
8
8
 
9
- .#{$vendor-prefix}notice {
9
+ #{$notice-class} {
10
10
  margin: $margin 0;
11
11
  padding: $padding;
12
12
  text-align: left;
13
13
 
14
14
  hr {
15
15
  border: 0;
16
- border-top: 1px solid transparent;
17
- }
18
-
19
- a {
20
- font-weight: bold;
16
+ border-top: 1px solid white(.15);
21
17
  }
22
18
 
23
19
  p:first-child {
@@ -25,7 +21,7 @@
25
21
  }
26
22
  }
27
23
 
28
- .#{$vendor-prefix}notice-close {
24
+ #{$notice-class-close} {
29
25
  float: right;
30
26
  margin-left: $margin;
31
27
  line-height: 1rem;
@@ -36,6 +32,6 @@
36
32
  & ~ p { margin: 0; }
37
33
  }
38
34
 
39
- .#{$vendor-prefix}notice-title {
35
+ #{$notice-class-title} {
40
36
  margin: 0 0 ($margin / 2) 0;
41
37
  }
@@ -1,12 +1,12 @@
1
1
  /**
2
- * @copyright 2010-2014, The Titon Project
2
+ * @copyright 2010-2015, The Titon Project
3
3
  * @license http://opensource.org/licenses/BSD-3-Clause
4
4
  * @link http://titon.io
5
5
  */
6
6
 
7
7
  @import "../common";
8
8
 
9
- .#{$vendor-prefix}off-canvas {
9
+ #{$offCanvas-class} {
10
10
  position: fixed;
11
11
  overflow: auto;
12
12
  top: 0;
@@ -18,7 +18,7 @@
18
18
  -webkit-overflow-scrolling: touch;
19
19
  }
20
20
 
21
- .#{$vendor-prefix}on-canvas {
21
+ #{$offCanvas-class-content} {
22
22
  position: relative;
23
23
  width: 100%;
24
24
  max-width: 100%;
@@ -26,16 +26,14 @@
26
26
  transition: transform $offCanvas-transition, padding $offCanvas-transition;
27
27
  }
28
28
 
29
- .#{$vendor-prefix}canvas {
29
+ #{$offCanvas-class-wrapper} {
30
30
  position: relative;
31
31
  overflow-x: hidden;
32
32
  }
33
33
 
34
34
  //-------------------- Modifiers --------------------//
35
35
 
36
- .#{$vendor-prefix}off-canvas--left {
37
- @extend .#{$vendor-prefix}off-canvas;
38
-
36
+ #{$offCanvas-class-modifier-left} {
39
37
  left: 0;
40
38
  width: $offCanvas-left-width;
41
39
  transform: translate3d(-100%, 0, 0);
@@ -43,9 +41,7 @@
43
41
  &.show { transform: translate3d(0, 0, 0) !important; }
44
42
  }
45
43
 
46
- .#{$vendor-prefix}off-canvas--right {
47
- @extend .#{$vendor-prefix}off-canvas;
48
-
44
+ #{$offCanvas-class-modifier-right} {
49
45
  right: 0;
50
46
  width: $offCanvas-right-width;
51
47
  transform: translate3d(100%, 0, 0);
@@ -55,59 +51,77 @@
55
51
 
56
52
  //-------------------- Animations --------------------//
57
53
 
58
- .#{$vendor-prefix}canvas {
59
- &.on-top,
60
- &.squish {
61
- .#{$vendor-prefix}off-canvas { z-index: 3; }
54
+ #{$offCanvas-class-wrapper} {
55
+ @if index($offCanvas-animations, "on-top") or index($offCanvas-animations, "squish") {
56
+ &.on-top,
57
+ &.squish {
58
+ #{$offCanvas-class} { z-index: 3; }
59
+ }
62
60
  }
63
61
 
64
- &.push-reveal {
65
- .#{$vendor-prefix}off-canvas--left { transform: translate3d(-50%, 0, 0); }
66
- .#{$vendor-prefix}off-canvas--right { transform: translate3d(50%, 0, 0); }
62
+ @if index($offCanvas-animations, "push-reveal") {
63
+ &.push-reveal {
64
+ #{$offCanvas-class-modifier-left} { transform: translate3d(-50%, 0, 0); }
65
+ #{$offCanvas-class-modifier-right} { transform: translate3d(50%, 0, 0); }
66
+ }
67
67
  }
68
68
 
69
- &.reverse-push {
70
- .#{$vendor-prefix}off-canvas--left { transform: translate3d(100%, 0, 0); }
71
- .#{$vendor-prefix}off-canvas--right { transform: translate3d(-100%, 0, 0); }
69
+ @if index($offCanvas-animations, "reverse-push") {
70
+ &.reverse-push {
71
+ #{$offCanvas-class-modifier-left} { transform: translate3d(50%, 0, 0); }
72
+ #{$offCanvas-class-modifier-right} { transform: translate3d(-50%, 0, 0); }
73
+ }
72
74
  }
73
75
 
74
- &.reveal {
75
- .#{$vendor-prefix}off-canvas { transform: translate3d(0, 0, 0); }
76
+ @if index($offCanvas-animations, "reveal") {
77
+ &.reveal {
78
+ #{$offCanvas-class} { transform: translate3d(0, 0, 0); }
79
+ }
76
80
  }
77
81
 
78
- &.push-down {
79
- .#{$vendor-prefix}off-canvas--left,
80
- .#{$vendor-prefix}off-canvas--right { transform: translate3d(0, -100%, 0); }
82
+ @if index($offCanvas-animations, "push-down") {
83
+ &.push-down {
84
+ #{$offCanvas-class-modifier-left},
85
+ #{$offCanvas-class-modifier-right} { transform: translate3d(0, -100%, 0); }
86
+ }
81
87
  }
82
88
 
83
- &.push,
84
- &.push-reveal,
85
- &.push-down,
86
- &.reverse-push,
87
- &.reveal {
88
- &.move-left {
89
- .#{$vendor-prefix}on-canvas {
90
- transform: translate3d(-$offCanvas-right-width, 0, 0);
89
+ @if index($offCanvas-animations, "push") or
90
+ index($offCanvas-animations, "push-reveal") or
91
+ index($offCanvas-animations, "push-down") or
92
+ index($offCanvas-animations, "reverse-push") or
93
+ index($offCanvas-animations, "reveal") {
94
+ &.push,
95
+ &.push-reveal,
96
+ &.push-down,
97
+ &.reverse-push,
98
+ &.reveal {
99
+ &.move-left {
100
+ #{$offCanvas-class-content} {
101
+ transform: translate3d(-$offCanvas-right-width, 0, 0);
102
+ }
91
103
  }
92
- }
93
104
 
94
- &.move-right {
95
- .#{$vendor-prefix}on-canvas {
96
- transform: translate3d($offCanvas-left-width, 0, 0);
105
+ &.move-right {
106
+ #{$offCanvas-class-content} {
107
+ transform: translate3d($offCanvas-left-width, 0, 0);
108
+ }
97
109
  }
98
110
  }
99
111
  }
100
112
 
101
- &.squish {
102
- &.move-left {
103
- .#{$vendor-prefix}on-canvas {
104
- padding-right: $offCanvas-right-width;
113
+ @if index($offCanvas-animations, "squish") {
114
+ &.squish {
115
+ &.move-left {
116
+ #{$offCanvas-class-content} {
117
+ padding-right: $offCanvas-right-width;
118
+ }
105
119
  }
106
- }
107
120
 
108
- &.move-right {
109
- .#{$vendor-prefix}on-canvas {
110
- padding-left: $offCanvas-left-width;
121
+ &.move-right {
122
+ #{$offCanvas-class-content} {
123
+ padding-left: $offCanvas-left-width;
124
+ }
111
125
  }
112
126
  }
113
127
  }
@@ -116,29 +130,35 @@
116
130
  //-------------------- Responsive --------------------//
117
131
 
118
132
  @include if-max($offCanvas-mobile-breakpoint) {
119
- .#{$vendor-prefix}off-canvas--left {
133
+ #{$offCanvas-class-modifier-left} {
120
134
  width: $offCanvas-left-width-mobile;
121
135
  }
122
136
 
123
- .#{$vendor-prefix}off-canvas--right {
137
+ #{$offCanvas-class-modifier-right} {
124
138
  width: $offCanvas-right-width-mobile;
125
139
  }
126
140
 
127
- .#{$vendor-prefix}canvas {
128
- &.push,
129
- &.push-reveal,
130
- &.push-down,
131
- &.reverse-push,
132
- &.reveal {
133
- &.move-left {
134
- .#{$vendor-prefix}on-canvas {
135
- transform: translate3d(-$offCanvas-right-width-mobile, 0, 0);
141
+ @if index($offCanvas-animations, "push") or
142
+ index($offCanvas-animations, "push-reveal") or
143
+ index($offCanvas-animations, "push-down") or
144
+ index($offCanvas-animations, "reverse-push") or
145
+ index($offCanvas-animations, "reveal") {
146
+ #{$offCanvas-class-wrapper} {
147
+ &.push,
148
+ &.push-reveal,
149
+ &.push-down,
150
+ &.reverse-push,
151
+ &.reveal {
152
+ &.move-left {
153
+ #{$offCanvas-class-content} {
154
+ transform: translate3d(-$offCanvas-right-width-mobile, 0, 0);
155
+ }
136
156
  }
137
- }
138
157
 
139
- &.move-right {
140
- .#{$vendor-prefix}on-canvas {
141
- transform: translate3d($offCanvas-left-width-mobile, 0, 0);
158
+ &.move-right {
159
+ #{$offCanvas-class-content} {
160
+ transform: translate3d($offCanvas-left-width-mobile, 0, 0);
161
+ }
142
162
  }
143
163
  }
144
164
  }
@@ -1,67 +1,108 @@
1
1
  /**
2
- * @copyright 2010-2014, The Titon Project
2
+ * @copyright 2010-2015, The Titon Project
3
3
  * @license http://opensource.org/licenses/BSD-3-Clause
4
4
  * @link http://titon.io
5
5
  */
6
6
 
7
7
  @import "../common";
8
8
 
9
- .#{$vendor-prefix}pagination {
9
+ #{$pagination-class} {
10
10
  margin: $margin 0;
11
11
 
12
- ul, ol {
12
+ ol {
13
13
  @include reset-list;
14
14
  @include clear-fix;
15
- }
16
15
 
17
- li {
18
- position: relative;
19
- float: left;
20
- margin-right: $padding / 2;
16
+ > li {
17
+ position: relative;
18
+ float: left;
19
+ margin-right: $padding / 2;
21
20
 
22
- > a {
23
- display: block;
24
- }
21
+ > a {
22
+ display: block;
23
+ }
25
24
 
26
- &.is-active {
27
- z-index: 1;
25
+ &.is-active {
26
+ z-index: 1;
27
+ }
28
28
  }
29
29
  }
30
30
  }
31
31
 
32
32
  //-------------------- Modifiers --------------------//
33
33
 
34
- .#{$vendor-prefix}pagination--grouped {
35
- @extend .#{$vendor-prefix}pagination;
34
+ @if index($pagination-modifiers, "grouped") {
35
+ #{$pagination-class-modifier-grouped} {
36
+ ol > li {
37
+ margin: 0;
38
+
39
+ &:hover,
40
+ > a:hover { z-index: 1; }
36
41
 
37
- li {
38
- margin-left: -1px;
39
- margin-right: 0;
42
+ > a {
43
+ margin: 0;
44
+ border-radius: 0;
45
+ }
46
+ }
47
+
48
+ //----- Effects -----//
40
49
 
41
- &:first-child { margin-left: 0; }
50
+ &#{$shape-round-class} ol {
51
+ border-radius: $round;
42
52
 
43
- &:hover,
44
- > a:hover { z-index: 1; }
53
+ > li:first-child > a {
54
+ border-top-left-radius: $round;
55
+ border-bottom-left-radius: $round;
56
+ }
45
57
 
46
- > a {
47
- margin: 0;
48
- border-radius: 0;
58
+ > li:last-child > a {
59
+ border-top-right-radius: $round;
60
+ border-bottom-right-radius: $round;
61
+ }
49
62
  }
50
- }
51
63
 
52
- &.#{$shape-round-class} {
53
- ul, ol {
54
- border-radius: $round;
64
+ @if index($pagination-effects, "oval") {
65
+ &#{$shape-oval-class} ol {
66
+ border-radius: #{$oval-x} / #{$oval-y};
67
+
68
+ > li:first-child a {
69
+ border-radius: #{$oval-x} 0 0 #{$oval-x} / #{$oval-y} 0 0 #{$oval-y};
70
+ }
71
+
72
+ > li:last-child a {
73
+ border-radius: 0 #{$oval-x} #{$oval-x} 0 / 0 #{$oval-y} #{$oval-y} 0;
74
+ }
75
+ }
55
76
  }
56
77
 
57
- li:first-child > a {
58
- border-top-left-radius: $round;
59
- border-bottom-left-radius: $round;
78
+ @if index($pagination-effects, "pill") {
79
+ &#{$shape-pill-class} ol {
80
+ border-radius: $pill;
81
+
82
+ > li:first-child a {
83
+ border-top-left-radius: $pill;
84
+ border-bottom-left-radius: $pill;
85
+ }
86
+
87
+ > li:last-child a {
88
+ border-top-right-radius: $pill;
89
+ border-bottom-right-radius: $pill;
90
+ }
91
+ }
60
92
  }
61
93
 
62
- li:last-child > a {
63
- border-top-right-radius: $round;
64
- border-bottom-right-radius: $round;
94
+ @if index($pagination-effects, "skew") {
95
+ &#{$shape-skew-class} ol {
96
+ border-radius: #{$skew-x $skew-x} 0 0 / #{$skew-y $skew-y} 0 0;
97
+
98
+ > li:first-child a {
99
+ border-radius: #{$skew-x} 0 0 0 / #{$skew-y} 0 0 0;
100
+ }
101
+
102
+ > li:last-child a {
103
+ border-radius: 0 #{$skew-x} 0 0 / 0 #{$skew-y} 0 0;
104
+ }
105
+ }
65
106
  }
66
107
  }
67
108
  }
@@ -1,15 +1,19 @@
1
1
  /**
2
- * @copyright 2010-2014, The Titon Project
2
+ * @copyright 2010-2015, The Titon Project
3
3
  * @license http://opensource.org/licenses/BSD-3-Clause
4
4
  * @link http://titon.io
5
5
  */
6
6
 
7
7
  @import "../common";
8
8
 
9
- .#{$vendor-prefix}pin.sticky {
9
+ #{$pin-class} {
10
+ position: absolute;
11
+ }
12
+
13
+ #{$pin-class}.sticky {
10
14
  transition: top .6s ease-in-out, right $pin-transition ease-in-out, left $pin-transition ease-in-out;
11
15
  }
12
16
 
13
- .#{$vendor-prefix}pin.slide {
17
+ #{$pin-class}.slide {
14
18
  transition: top $pin-transition linear, right $pin-transition linear, left $pin-transition linear;
15
19
  }
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @copyright 2010-2014, The Titon Project
2
+ * @copyright 2010-2015, The Titon Project
3
3
  * @license http://opensource.org/licenses/BSD-3-Clause
4
4
  * @link http://titon.io
5
5
  */
@@ -9,7 +9,7 @@
9
9
  $popover-arrow-width-double: ($popover-arrow-width * 2);
10
10
  $popover-arrow-width-shadow: ($popover-arrow-width - 2);
11
11
 
12
- .#{$vendor-prefix}popover {
12
+ #{$popover-class} {
13
13
  position: absolute;
14
14
  top: 0;
15
15
  left: 0;
@@ -20,48 +20,48 @@ $popover-arrow-width-shadow: ($popover-arrow-width - 2);
20
20
  max-width: 300px;
21
21
  visibility: hidden;
22
22
 
23
- &.center-left .#{$vendor-prefix}popover-arrow,
24
- &.center-right .#{$vendor-prefix}popover-arrow {
23
+ &.center-left #{$popover-class-arrow},
24
+ &.center-right #{$popover-class-arrow} {
25
25
  top: 50%;
26
26
  margin-top: -#{$popover-arrow-width}px;
27
27
  }
28
28
 
29
- &.center-left .#{$vendor-prefix}popover-arrow {
29
+ &.center-left #{$popover-class-arrow} {
30
30
  border-left-color: $gray;
31
31
  right: -#{$popover-arrow-width-double}px;
32
32
  }
33
33
 
34
- &.center-right .#{$vendor-prefix}popover-arrow {
34
+ &.center-right #{$popover-class-arrow} {
35
35
  border-right-color: $gray;
36
36
  left: -#{$popover-arrow-width-double}px;
37
37
  }
38
38
 
39
- &.top-center .#{$vendor-prefix}popover-arrow,
40
- &.bottom-center .#{$vendor-prefix}popover-arrow {
39
+ &.top-center #{$popover-class-arrow},
40
+ &.bottom-center #{$popover-class-arrow} {
41
41
  left: 50%;
42
42
  margin-left: -#{$popover-arrow-width}px;
43
43
  }
44
44
 
45
- &.top-center .#{$vendor-prefix}popover-arrow {
45
+ &.top-center #{$popover-class-arrow} {
46
46
  border-top-color: $gray;
47
47
  bottom: -#{$popover-arrow-width-double}px;
48
48
  }
49
49
 
50
- &.bottom-center .#{$vendor-prefix}popover-arrow {
50
+ &.bottom-center #{$popover-class-arrow} {
51
51
  border-bottom-color: $gray;
52
52
  top: -#{$popover-arrow-width-double}px;
53
53
  }
54
54
  }
55
55
 
56
- .#{$vendor-prefix}popover-head,
57
- .#{$vendor-prefix}popover-body {
56
+ #{$popover-class-head},
57
+ #{$popover-class-body} {
58
58
  padding: $small-padding;
59
59
  }
60
60
 
61
- .#{$vendor-prefix}popover-arrow {
61
+ #{$popover-class-arrow} {
62
62
  border: #{$popover-arrow-width}px solid transparent;
63
63
 
64
- &:after {
64
+ &::after {
65
65
  border: #{$popover-arrow-width-shadow}px solid transparent;
66
66
  top: -#{$popover-arrow-width-shadow}px;
67
67
  left: -#{$popover-arrow-width-shadow}px;
@@ -1,17 +1,17 @@
1
1
  /**
2
- * @copyright 2010-2014, The Titon Project
2
+ * @copyright 2010-2015, The Titon Project
3
3
  * @license http://opensource.org/licenses/BSD-3-Clause
4
4
  * @link http://titon.io
5
5
  */
6
6
 
7
7
  @import "../common";
8
8
 
9
- .#{$vendor-prefix}progress {
9
+ #{$progress-class} {
10
10
  overflow: hidden;
11
11
  position: relative;
12
12
 
13
13
  @include is-small {
14
- .#{$vendor-prefix}progress-bar {
14
+ #{$progress-class-bar} {
15
15
  height: 1rem;
16
16
  line-height: 1rem;
17
17
  font-size: $small-size;
@@ -19,7 +19,7 @@
19
19
  }
20
20
 
21
21
  @include is-large {
22
- .#{$vendor-prefix}progress-bar {
22
+ #{$progress-class-bar} {
23
23
  height: 2rem;
24
24
  line-height: 2rem;
25
25
  font-size: $large-size;
@@ -27,9 +27,29 @@
27
27
  }
28
28
 
29
29
  @include clear-fix;
30
+
31
+ //----- Effects ------//
32
+
33
+ &#{$shape-round-class} {
34
+ #{$progress-class-bar}:first-child {
35
+ border-top-left-radius: $round;
36
+ border-bottom-left-radius: $round;
37
+ }
38
+ }
39
+
40
+ @if index($progress-effects, "pill") {
41
+ &#{$shape-pill-class} {
42
+ border-radius: $pill;
43
+
44
+ #{$progress-class-bar}:first-child {
45
+ border-top-left-radius: $pill;
46
+ border-bottom-left-radius: $pill;
47
+ }
48
+ }
49
+ }
30
50
  }
31
51
 
32
- .#{$vendor-prefix}progress-bar {
52
+ #{$progress-class-bar} {
33
53
  height: 1.5rem;
34
54
  line-height: 1.5rem;
35
55
  overflow: hidden;
@@ -38,13 +58,4 @@
38
58
  font-size: $medium-size;
39
59
  float: left;
40
60
  transition: width $progress-transition, background $progress-transition;
41
- }
42
-
43
- .#{$vendor-prefix}progress.#{$shape-round-class} {
44
- border-radius: $round;
45
-
46
- .#{$vendor-prefix}progress-bar:first-child {
47
- border-top-left-radius: $round;
48
- border-bottom-left-radius: $round;
49
- }
50
61
  }