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,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
  */
@@ -11,52 +11,54 @@
11
11
  width: 100%;
12
12
  height: auto;
13
13
  max-width: 100%;
14
- max-height: auto;
15
14
  }
16
15
 
17
16
  .show-retina,
18
17
  .show-print { display: none !important; }
19
18
 
20
- // Desktop states
21
- @include in-desktop {
22
- .show-tablet,
23
- .show-mobile,
24
- .hide-desktop { display: none !important; }
19
+ // Extra small states
20
+ @include in-xsmall {
21
+ .show-xlarge,
22
+ .show-large,
23
+ .show-medium,
24
+ .show-small,
25
+ .hide-xsmall { display: none !important; }
25
26
  }
26
27
 
27
- // Tablet states
28
- @include in-tablet {
29
- .show-desktop,
30
- .show-mobile,
31
- .hide-tablet { display: none !important; }
28
+ // Small states
29
+ @include in-small {
30
+ .show-xlarge,
31
+ .show-large,
32
+ .show-medium,
33
+ .show-xsmall,
34
+ .hide-small { display: none !important; }
32
35
  }
33
36
 
34
- // Mobile states
35
- @include in-mobile {
36
- .show-desktop,
37
- .show-tablet,
38
- .hide-mobile { display: none !important; }
37
+ // Medium states
38
+ @include in-medium {
39
+ .show-xlarge,
40
+ .show-large,
41
+ .show-small,
42
+ .show-xsmall,
43
+ .hide-medium { display: none !important; }
39
44
  }
40
45
 
41
46
  // Large states
42
47
  @include in-large {
48
+ .show-xlarge,
43
49
  .show-medium,
44
50
  .show-small,
51
+ .show-xsmall,
45
52
  .hide-large { display: none !important; }
46
53
  }
47
54
 
48
- // Medium states
49
- @include in-medium {
50
- .show-large,
51
- .show-small,
52
- .hide-medium { display: none !important; }
53
- }
54
-
55
- // Small states
56
- @include in-small {
55
+ // Extra large states
56
+ @include in-xlarge {
57
57
  .show-large,
58
58
  .show-medium,
59
- .hide-small { display: none !important; }
59
+ .show-small,
60
+ .show-xsmall,
61
+ .hide-xlarge { display: none !important; }
60
62
  }
61
63
 
62
64
  // Orientation states
@@ -73,18 +75,10 @@
73
75
  // Type states
74
76
  @include if-retina {
75
77
  .hide-retina { display: none !important; }
76
- .show-retina { display: block !important; }
77
- table.show-retina { display: table !important; }
78
- tr.show-retina { display: table-row !important; }
79
- td.show-retina,
80
- th.show-retina { display: table-cell !important; }
78
+ @include responsive-display-block(".show-retina");
81
79
  }
82
80
 
83
81
  @media print {
84
82
  .hide-print { display: none !important; }
85
- .show-print { display: block !important; }
86
- table.show-print { display: table !important; }
87
- tr.show-print { display: table-row !important; }
88
- td.show-print,
89
- th.show-print { display: table-cell !important; }
83
+ @include responsive-display-block(".show-print");
90
84
  }
@@ -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}showcase {
9
+ #{$showcase-class} {
10
10
  position: fixed;
11
11
  top: 50%;
12
12
  left: 50%;
@@ -23,21 +23,21 @@
23
23
 
24
24
  &.is-loading,
25
25
  &.is-single {
26
- .#{$vendor-prefix}showcase-prev,
27
- .#{$vendor-prefix}showcase-next,
28
- .#{$vendor-prefix}showcase-tabs {
26
+ #{$showcase-class-prev},
27
+ #{$showcase-class-next},
28
+ #{$showcase-class-tabs} {
29
29
  display: none !important;
30
30
  }
31
31
  }
32
32
 
33
33
  &.is-loading {
34
- .#{$vendor-prefix}showcase-close {
34
+ #{$showcase-class-close} {
35
35
  display: none !important;
36
36
  }
37
37
  }
38
38
  }
39
39
 
40
- .#{$vendor-prefix}showcase-close {
40
+ #{$showcase-class-close} {
41
41
  float: right;
42
42
  line-height: 1rem;
43
43
  background: none;
@@ -46,17 +46,17 @@
46
46
  margin-left: 1rem;
47
47
  }
48
48
 
49
- .#{$vendor-prefix}showcase-caption {
49
+ #{$showcase-class-caption} {
50
50
  opacity: 0;
51
51
  transition: opacity $showcase-transition, visibility $showcase-transition;
52
52
  }
53
53
 
54
- .#{$vendor-prefix}showcase-inner {
54
+ #{$showcase-class-inner} {
55
55
  position: relative;
56
56
  margin-bottom: $padding;
57
57
  }
58
58
 
59
- .#{$vendor-prefix}showcase-items {
59
+ #{$showcase-class-items} {
60
60
  @include reset-list;
61
61
  width: 100px;
62
62
  height: 100px;
@@ -78,30 +78,4 @@
78
78
  display: block;
79
79
  }
80
80
  }
81
- }
82
-
83
- .#{$vendor-prefix}showcase-prev,
84
- .#{$vendor-prefix}showcase-next {
85
- display: block;
86
- position: absolute;
87
- z-index: 5;
88
- top: 50%;
89
- background: none;
90
- padding: 0;
91
- border: 0;
92
- transform: translateY(-50%); // move up 50% of their height
93
-
94
- &:focus { outline: none; }
95
- }
96
-
97
- .#{$vendor-prefix}showcase-prev { left: $padding; }
98
- .#{$vendor-prefix}showcase-next { right: $padding; }
99
-
100
- .#{$vendor-prefix}showcase-tabs {
101
- position: absolute;
102
- top: 0;
103
- left: 0;
104
- width: 100%;
105
- padding: $padding;
106
- text-align: center;
107
81
  }
@@ -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}steps {
9
+ #{$step-class-wrapper} {
10
10
  margin: $margin 0;
11
11
  font-size: $medium-size;
12
12
 
@@ -18,7 +18,7 @@
18
18
  }
19
19
 
20
20
  // Use em's to scale against the size defined on .steps
21
- .#{$vendor-prefix}step {
21
+ #{$step-class} {
22
22
  padding: 0 2em 0 3.5em;
23
23
  position: relative;
24
24
  display: block;
@@ -26,7 +26,7 @@
26
26
  height: 3em;
27
27
 
28
28
  // Golden ratio? Seems to work for all font sizes in *most* browsers
29
- &:after {
29
+ &::after {
30
30
  height: 2.165em;
31
31
  width: 2.165em;
32
32
  top: 0.425em;
@@ -43,14 +43,14 @@
43
43
  float: left;
44
44
 
45
45
  &:first-child {
46
- .#{$vendor-prefix}step {
46
+ #{$step-class} {
47
47
  padding-left: 2em;
48
48
  }
49
49
  }
50
50
 
51
51
  &:last-child {
52
- .#{$vendor-prefix}step {
53
- &:after { display: none; }
52
+ #{$step-class} {
53
+ &::after { display: none; }
54
54
  }
55
55
  }
56
56
  }
@@ -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}switch {
9
+ #{$switch-class} {
10
10
  @include reset-inline-block;
11
11
  font-size: 0;
12
12
  width: 100px;
@@ -16,38 +16,32 @@
16
16
  opacity: $disabled-opacity;
17
17
  }
18
18
 
19
- &.#{$shape-round-class} {
20
- .#{$vendor-prefix}switch-toggle {
21
- border-radius: $round - 0.02;
22
- }
23
- }
24
-
25
19
  input {
26
20
  display: none;
27
21
 
28
- &:checked + .#{$vendor-prefix}switch-bar {
29
- .#{$vendor-prefix}switch-toggle {
22
+ &:checked + #{$switch-class-bar} {
23
+ #{$switch-class-toggle} {
30
24
  left: 50%;
31
25
  }
32
26
 
33
- &:before { opacity: 1; }
34
- &:after { opacity: 0; }
27
+ &::before { opacity: 1; }
28
+ &::after { opacity: 0; }
35
29
  }
36
30
  }
37
31
 
38
32
  @include is-small() {
39
33
  width: 70px;
40
34
 
41
- .#{$vendor-prefix}switch-bar {
35
+ #{$switch-class-bar} {
42
36
  font-size: $small-size;
43
37
 
44
- &:before,
45
- &:after {
38
+ &::before,
39
+ &::after {
46
40
  padding: $small-padding;
47
41
  }
48
42
  }
49
43
 
50
- .#{$vendor-prefix}switch-toggle {
44
+ #{$switch-class-toggle} {
51
45
  padding: $small-padding;
52
46
  }
53
47
  }
@@ -55,29 +49,29 @@
55
49
  @include is-large() {
56
50
  width: 130px;
57
51
 
58
- .#{$vendor-prefix}switch-bar {
52
+ #{$switch-class-bar} {
59
53
  font-size: $large-size;
60
54
 
61
- &:before,
62
- &:after {
55
+ &::before,
56
+ &::after {
63
57
  padding: $large-padding;
64
58
  }
65
59
  }
66
60
 
67
- .#{$vendor-prefix}switch-toggle {
61
+ #{$switch-class-toggle} {
68
62
  padding: $large-padding;
69
63
  }
70
64
  }
71
65
  }
72
66
 
73
- .#{$vendor-prefix}switch-bar {
67
+ #{$switch-class-bar} {
74
68
  display: block;
75
69
  position: relative;
76
70
  font-size: $medium-size;
77
71
  transition: background $switch-transition;
78
72
 
79
- &:before,
80
- &:after {
73
+ &::before,
74
+ &::after {
81
75
  position: absolute;
82
76
  padding: $medium-padding;
83
77
  top: 0;
@@ -86,19 +80,37 @@
86
80
  transition: opacity $switch-transition;
87
81
  }
88
82
 
89
- &:before {
83
+ &::before {
90
84
  left: 0;
91
85
  opacity: 0;
92
86
  content: attr(data-switch-on);
93
87
  }
94
88
 
95
- &:after {
89
+ &::after {
96
90
  right: 0;
97
91
  content: attr(data-switch-off);
98
92
  }
93
+
94
+ //----- Effects -----//
95
+
96
+ &#{$shape-round-class} {
97
+ #{$switch-class-toggle} {
98
+ border-radius: $round - 0.02;
99
+ }
100
+ }
101
+
102
+ @if index($switch-effects, "pill") {
103
+ &#{$shape-pill-class} {
104
+ border-radius: $pill;
105
+
106
+ #{$switch-class-toggle} {
107
+ border-radius: $pill;
108
+ }
109
+ }
110
+ }
99
111
  }
100
112
 
101
- .#{$vendor-prefix}switch-toggle {
113
+ #{$switch-class-toggle} {
102
114
  @include reset-inline-block;
103
115
  padding: $medium-padding;
104
116
  width: 50%;
@@ -107,17 +119,19 @@
107
119
  user-select: none;
108
120
  transition: left $switch-transition;
109
121
 
110
- &:before { content: "\00A0"; } // NBSP
122
+ &::before { content: "\00A0"; } // NBSP
111
123
  }
112
124
 
113
125
  //-------------------- Modifiers --------------------//
114
126
 
115
- .#{$vendor-prefix}switch--stacked {
116
- .#{$vendor-prefix}switch-bar {
117
- &:before,
118
- &:after {
119
- z-index: 3;
120
- opacity: 1 !important;
127
+ @if index($switch-modifiers, "stacked") {
128
+ #{$switch-class-modifier-stacked} {
129
+ #{$switch-class-bar} {
130
+ &::before,
131
+ &::after {
132
+ z-index: 3;
133
+ opacity: 1 !important;
134
+ }
121
135
  }
122
136
  }
123
137
  }
@@ -0,0 +1,42 @@
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
+ #{$tab-class} {
10
+ text-align: left;
11
+ }
12
+
13
+ #{$tab-class-nav} {
14
+ display: block;
15
+ margin-bottom: $margin;
16
+
17
+ ul, ol, li {
18
+ @include reset-list;
19
+ display: inline-block;
20
+ }
21
+
22
+ @include clear-fix;
23
+ }
24
+
25
+ // Add display none on sections since visibility property takes up DOM space
26
+ #{$tab-class-section}.hide {
27
+ display: none;
28
+ }
29
+
30
+ //-------------------- Modifiers --------------------//
31
+
32
+ @if index($tab-modifiers, "horizontal") {
33
+ #{$tab-class-modifier-horizontal} {
34
+ #{$tab-class-nav} {
35
+ ul, ol, li, a, button {
36
+ display: block;
37
+ float: none;
38
+ text-align: left;
39
+ }
40
+ }
41
+ }
42
+ }
@@ -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}table {
9
+ #{$table-class} {
10
10
  width: 100%;
11
11
  margin-top: $margin;
12
12
  background: $gray-lightest;
@@ -41,10 +41,10 @@
41
41
  }
42
42
 
43
43
  // Divider
44
- tbody tr.#{$vendor-prefix}table-divider { background: $gray-dark !important; }
44
+ tbody tr#{$table-class-divider} { background: $gray-dark !important; }
45
45
  }
46
46
 
47
- .#{$vendor-prefix}table-responsive {
47
+ #{$table-class-responsive} {
48
48
  width: 100%;
49
49
  max-width: 100%;
50
50
  overflow-x: auto;
@@ -52,17 +52,17 @@
52
52
 
53
53
  //-------------------- Modifiers --------------------//
54
54
 
55
- .#{$vendor-prefix}table.has-hover {
56
- tbody tr:not(.#{$vendor-prefix}table-divider):hover { background: #fff; }
55
+ #{$table-class}.has-hover {
56
+ tbody tr:not(#{$table-class-divider}):hover { background: #fff; }
57
57
  }
58
58
 
59
- .#{$vendor-prefix}table.is-striped tbody tr {
59
+ #{$table-class}.is-striped tbody tr {
60
60
  background: $gray;
61
61
 
62
62
  &:nth-child(odd) { background: $gray-lightest; }
63
63
  }
64
64
 
65
- .#{$vendor-prefix}table.is-sortable {
65
+ #{$table-class}.is-sortable {
66
66
  thead th {
67
67
  padding: 0;
68
68
 
@@ -82,30 +82,32 @@
82
82
 
83
83
  //-------------------- Sizes --------------------//
84
84
 
85
- .#{$vendor-prefix}table.#{$size-small-class} {
86
- thead th,
87
- tbody td { padding: $small-padding; }
85
+ #{$table-class} {
86
+ @include is-small {
87
+ thead th,
88
+ tbody td { padding: $small-padding; }
88
89
 
89
- &.is-sortable {
90
- thead th {
91
- padding: 0;
90
+ &.is-sortable {
91
+ thead th {
92
+ padding: 0;
92
93
 
93
- > a,
94
- > span { padding: $small-padding; }
94
+ > a,
95
+ > span { padding: $small-padding; }
96
+ }
95
97
  }
96
98
  }
97
- }
98
99
 
99
- .#{$vendor-prefix}table.#{$size-large-class} {
100
- thead th,
101
- tbody td { padding: $large-padding; }
100
+ @include is-large {
101
+ thead th,
102
+ tbody td { padding: $large-padding; }
102
103
 
103
- &.is-sortable {
104
- thead th {
105
- padding: 0;
104
+ &.is-sortable {
105
+ thead th {
106
+ padding: 0;
106
107
 
107
- > a,
108
- > span { padding: $large-padding; }
108
+ > a,
109
+ > span { padding: $large-padding; }
110
+ }
109
111
  }
110
112
  }
111
113
  }
@@ -1,17 +1,21 @@
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}toasts {
9
+ #{$toast-class-wrapper} {
10
10
  position: fixed;
11
- margin: $margin;
11
+ padding: $margin;
12
12
  width: 20%;
13
13
  z-index: $toast-zindex;
14
14
 
15
+ @include if-max(nth($breakpoint-range-small, 1)) {
16
+ width: 100%;
17
+ }
18
+
15
19
  @if index($toast-position, "top-left") {
16
20
  &.top-left {
17
21
  top: 0;
@@ -83,7 +87,7 @@
83
87
  }
84
88
  }
85
89
 
86
- .#{$vendor-prefix}toast {
90
+ #{$toast-class} {
87
91
  margin-top: 1rem;
88
92
  transition: opacity $toast-transition, visibility $toast-transition, transform $toast-transition;
89
93
  opacity: 0;
@@ -95,8 +99,8 @@
95
99
 
96
100
  //-------------------- Animations --------------------//
97
101
 
98
- .#{$vendor-prefix}toast {
99
- @if index($toast-animation, "slide-up") {
102
+ #{$toast-class} {
103
+ @if index($toast-animations, "slide-up") {
100
104
  &.slide-up {
101
105
  transform: translateY(50%);
102
106
 
@@ -104,7 +108,7 @@
104
108
  }
105
109
  }
106
110
 
107
- @if index($toast-animation, "slide-down") {
111
+ @if index($toast-animations, "slide-down") {
108
112
  &.slide-down {
109
113
  transform: translateY(-50%);
110
114
 
@@ -112,7 +116,7 @@
112
116
  }
113
117
  }
114
118
 
115
- @if index($toast-animation, "slide-left") {
119
+ @if index($toast-animations, "slide-left") {
116
120
  &.slide-left {
117
121
  transform: translateX(25%);
118
122
 
@@ -120,7 +124,7 @@
120
124
  }
121
125
  }
122
126
 
123
- @if index($toast-animation, "slide-right") {
127
+ @if index($toast-animations, "slide-right") {
124
128
  &.slide-right {
125
129
  transform: translateX(-25%);
126
130