titon-toolkit 1.1.0 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/changelog.md +105 -67
  3. data/license.md +1 -1
  4. data/readme.md +5 -8
  5. data/roadmap.md +13 -11
  6. data/scss/toolkit/_common.scss +19 -10
  7. data/scss/toolkit/components/accordion.scss +0 -7
  8. data/scss/toolkit/components/breadcrumb.scss +0 -2
  9. data/scss/toolkit/components/button-group.scss +3 -19
  10. data/scss/toolkit/components/button.scss +2 -2
  11. data/scss/toolkit/components/drop.scss +5 -8
  12. data/scss/toolkit/components/flyout.scss +1 -5
  13. data/scss/toolkit/components/grid.scss +35 -17
  14. data/scss/toolkit/components/icon.scss +1 -14
  15. data/scss/toolkit/components/input-group.scss +7 -16
  16. data/scss/toolkit/components/input.scss +1 -7
  17. data/scss/toolkit/components/label.scss +0 -5
  18. data/scss/toolkit/components/lazy-load.scss +1 -1
  19. data/scss/toolkit/components/loader.scss +1 -1
  20. data/scss/toolkit/components/matrix.scss +7 -13
  21. data/scss/toolkit/components/modal.scss +123 -131
  22. data/scss/toolkit/components/notice.scss +5 -2
  23. data/scss/toolkit/components/pagination.scss +0 -1
  24. data/scss/toolkit/components/popover.scss +13 -16
  25. data/scss/toolkit/components/progress.scss +2 -17
  26. data/scss/toolkit/components/showcase.scss +5 -2
  27. data/scss/toolkit/components/table.scss +10 -8
  28. data/scss/toolkit/components/tabs.scss +1 -0
  29. data/scss/toolkit/components/tooltip.scss +38 -42
  30. data/scss/toolkit/components/type-ahead.scss +2 -6
  31. data/scss/toolkit/effects/oval.scss +3 -1
  32. data/scss/toolkit/effects/pill.scss +8 -12
  33. data/scss/toolkit/effects/skew.scss +9 -15
  34. data/scss/toolkit/layout/base.scss +4 -18
  35. data/scss/toolkit/layout/code.scss +1 -1
  36. data/scss/toolkit/layout/form.scss +11 -10
  37. data/scss/toolkit/layout/responsive.scss +4 -2
  38. data/scss/toolkit/layout/typography.scss +9 -3
  39. data/scss/toolkit/mixins/_components.scss +16 -0
  40. data/scss/toolkit/mixins/_helper.scss +15 -0
  41. data/scss/toolkit/mixins/_layout.scss +0 -9
  42. data/scss/toolkit/themes/{titon.scss → demo.scss} +39 -15
  43. data/version.md +1 -1
  44. metadata +6 -5
@@ -9,7 +9,6 @@
9
9
  .#{$vendor-prefix}notice {
10
10
  margin: $margin 0;
11
11
  padding: $padding;
12
- background: $gray-light;
13
12
  text-align: left;
14
13
 
15
14
  hr {
@@ -21,7 +20,9 @@
21
20
  font-weight: bold;
22
21
  }
23
22
 
24
- @include content-spacing;
23
+ p:first-child {
24
+ margin-top: 0;
25
+ }
25
26
  }
26
27
 
27
28
  .#{$vendor-prefix}notice-close {
@@ -29,6 +30,8 @@
29
30
  margin-left: $margin;
30
31
  line-height: 1rem;
31
32
  padding: 5px;
33
+ background: none;
34
+ border: 0;
32
35
 
33
36
  & ~ p { margin: 0; }
34
37
  }
@@ -7,7 +7,6 @@
7
7
  @import "../common";
8
8
 
9
9
  .#{$vendor-prefix}pagination {
10
- display: block;
11
10
  margin: $margin 0;
12
11
 
13
12
  ul, ol {
@@ -6,6 +6,9 @@
6
6
 
7
7
  @import "../common";
8
8
 
9
+ $popover-arrow-width-double: ($popover-arrow-width * 2);
10
+ $popover-arrow-width-shadow: ($popover-arrow-width - 2);
11
+
9
12
  .#{$vendor-prefix}popover {
10
13
  position: absolute;
11
14
  top: 0;
@@ -16,38 +19,37 @@
16
19
  z-index: 500;
17
20
  max-width: 300px;
18
21
  visibility: hidden;
19
- background: $gray;
20
22
 
21
23
  &.center-left .#{$vendor-prefix}popover-arrow,
22
24
  &.center-right .#{$vendor-prefix}popover-arrow {
23
25
  top: 50%;
24
- margin-top: -8px;
26
+ margin-top: -#{$popover-arrow-width}px;
25
27
  }
26
28
 
27
29
  &.center-left .#{$vendor-prefix}popover-arrow {
28
30
  border-left-color: $gray;
29
- right: -16px;
31
+ right: -#{$popover-arrow-width-double}px;
30
32
  }
31
33
 
32
34
  &.center-right .#{$vendor-prefix}popover-arrow {
33
35
  border-right-color: $gray;
34
- left: -16px;
36
+ left: -#{$popover-arrow-width-double}px;
35
37
  }
36
38
 
37
39
  &.top-center .#{$vendor-prefix}popover-arrow,
38
40
  &.bottom-center .#{$vendor-prefix}popover-arrow {
39
41
  left: 50%;
40
- margin-left: -8px;
42
+ margin-left: -#{$popover-arrow-width}px;
41
43
  }
42
44
 
43
45
  &.top-center .#{$vendor-prefix}popover-arrow {
44
46
  border-top-color: $gray;
45
- bottom: -16px;
47
+ bottom: -#{$popover-arrow-width-double}px;
46
48
  }
47
49
 
48
50
  &.bottom-center .#{$vendor-prefix}popover-arrow {
49
51
  border-bottom-color: $gray;
50
- top: -16px;
52
+ top: -#{$popover-arrow-width-double}px;
51
53
  }
52
54
  }
53
55
 
@@ -57,16 +59,11 @@
57
59
  }
58
60
 
59
61
  .#{$vendor-prefix}popover-arrow {
60
- width: 0;
61
- height: 0;
62
- border: 8px solid transparent;
63
- position: absolute;
62
+ border: #{$popover-arrow-width}px solid transparent;
64
63
 
65
64
  &:after {
66
- content: "";
67
- border: 6px solid transparent;
68
- position: absolute;
69
- top: -6px;
70
- left: -6px;
65
+ border: #{$popover-arrow-width-shadow}px solid transparent;
66
+ top: -#{$popover-arrow-width-shadow}px;
67
+ left: -#{$popover-arrow-width-shadow}px;
71
68
  }
72
69
  }
@@ -9,7 +9,6 @@
9
9
  .#{$vendor-prefix}progress {
10
10
  overflow: hidden;
11
11
  position: relative;
12
- background: $gray;
13
12
 
14
13
  @include is-small {
15
14
  .#{$vendor-prefix}progress-bar {
@@ -19,14 +18,6 @@
19
18
  }
20
19
  }
21
20
 
22
- @include is-medium {
23
- .#{$vendor-prefix}progress-bar {
24
- height: 1.5rem;
25
- line-height: 1.5rem;
26
- font-size: $medium-size;
27
- }
28
- }
29
-
30
21
  @include is-large {
31
22
  .#{$vendor-prefix}progress-bar {
32
23
  height: 2rem;
@@ -35,11 +26,6 @@
35
26
  }
36
27
  }
37
28
 
38
- .#{$vendor-prefix}progress-bar + .#{$vendor-prefix}progress-bar {
39
- border-top-left-radius: 0;
40
- border-bottom-left-radius: 0;
41
- }
42
-
43
29
  @include clear-fix;
44
30
  }
45
31
 
@@ -50,15 +36,14 @@
50
36
  position: relative;
51
37
  text-align: center;
52
38
  font-size: $medium-size;
53
- background: $gray-darkest;
54
39
  float: left;
55
- @include transition(width .6s, background $progress-transition);
40
+ @include transition(width $progress-transition, background $progress-transition);
56
41
  }
57
42
 
58
43
  .#{$vendor-prefix}progress.#{$shape-round-class} {
59
44
  border-radius: $round;
60
45
 
61
- .#{$vendor-prefix}progress-bar {
46
+ .#{$vendor-prefix}progress-bar:first-child {
62
47
  border-top-left-radius: $round;
63
48
  border-bottom-left-radius: $round;
64
49
  }
@@ -17,6 +17,7 @@
17
17
  z-index: 610; // higher than blackout
18
18
  opacity: 0;
19
19
  visibility: hidden;
20
+ -webkit-backface-visibility: hidden;
20
21
  backface-visibility: hidden;
21
22
  @include transform(translateX(-50%) translateY(-50%));
22
23
  @include transition(opacity $showcase-transition, visibility $showcase-transition);
@@ -43,13 +44,13 @@
43
44
  right: $padding;
44
45
  line-height: 1rem;
45
46
  padding: $padding;
47
+ background: none;
48
+ border: 0;
46
49
  }
47
50
 
48
51
  .#{$vendor-prefix}showcase-inner {
49
52
  position: relative;
50
53
  padding: $padding;
51
- background: $gray;
52
- border: 1px solid $gray-dark;
53
54
  }
54
55
 
55
56
  .#{$vendor-prefix}showcase-items {
@@ -107,6 +108,8 @@
107
108
  height: auto;
108
109
  z-index: 5;
109
110
  top: 50%;
111
+ background: none;
112
+ border: 0;
110
113
  @include transform(translateY(-50%)); // move up 50% of their height
111
114
 
112
115
  &:focus { outline: none; }
@@ -8,7 +8,8 @@
8
8
 
9
9
  .#{$vendor-prefix}table {
10
10
  width: 100%;
11
- background: $gray;
11
+ margin-top: $margin;
12
+ background: $gray-lightest;
12
13
  border-collapse: collapse;
13
14
 
14
15
  th, td {
@@ -39,13 +40,8 @@
39
40
  th { border-color: $gray-darkest; }
40
41
  }
41
42
 
42
- // Zebra striping
43
- tbody tr {
44
- background: $gray;
45
-
46
- &:nth-child(odd) { background: $gray-lightest; }
47
- &.#{$vendor-prefix}table-divider { background: $gray-dark; }
48
- }
43
+ // Divider
44
+ tbody tr.#{$vendor-prefix}table-divider { background: $gray-dark !important; }
49
45
  }
50
46
 
51
47
  .#{$vendor-prefix}table-responsive {
@@ -60,6 +56,12 @@
60
56
  tbody tr:not(.#{$vendor-prefix}table-divider):hover { background: #fff; }
61
57
  }
62
58
 
59
+ .#{$vendor-prefix}table.#{$state-is-prefix}striped tbody tr {
60
+ background: $gray;
61
+
62
+ &:nth-child(odd) { background: $gray-lightest; }
63
+ }
64
+
63
65
  .#{$vendor-prefix}table.#{$state-is-prefix}sortable {
64
66
  thead th {
65
67
  padding: 0;
@@ -6,6 +6,7 @@
6
6
 
7
7
  @import "../common";
8
8
 
9
+ // Need a property for @extend to work
9
10
  .#{$vendor-prefix}tabs {
10
11
  text-align: left;
11
12
  }
@@ -6,6 +6,8 @@
6
6
 
7
7
  @import "../common";
8
8
 
9
+ $tooltip-arrow-width-double: ($tooltip-arrow-width * 2);
10
+
9
11
  .#{$vendor-prefix}tooltip {
10
12
  position: absolute;
11
13
  top: 0;
@@ -23,45 +25,46 @@
23
25
  &.center-left .#{$vendor-prefix}tooltip-arrow,
24
26
  &.center-right .#{$vendor-prefix}tooltip-arrow {
25
27
  top: 50%;
26
- margin-top: -6px;
28
+ margin-top: -#{$tooltip-arrow-width}px;
27
29
  }
28
30
 
29
31
  &.center-left .#{$vendor-prefix}tooltip-arrow {
30
32
  border-left-color: #000;
31
- right: -12px;
33
+ right: -#{$tooltip-arrow-width-double}px;
32
34
  }
33
35
 
34
36
  &.center-right .#{$vendor-prefix}tooltip-arrow {
35
37
  border-right-color: #000;
36
- left: -12px;
38
+ left: -#{$tooltip-arrow-width-double}px;
37
39
  }
38
40
 
39
41
  &.top-center .#{$vendor-prefix}tooltip-arrow,
40
42
  &.bottom-center .#{$vendor-prefix}tooltip-arrow {
41
43
  left: 50%;
42
- margin-left: -6px;
44
+ margin-left: -#{$tooltip-arrow-width}px;
43
45
  }
44
46
 
45
47
  &.top-center .#{$vendor-prefix}tooltip-arrow {
46
48
  border-top-color: #000;
47
- bottom: -12px;
49
+ bottom: -#{$tooltip-arrow-width-double}px;
48
50
  }
49
51
 
50
52
  &.bottom-center .#{$vendor-prefix}tooltip-arrow {
51
53
  border-bottom-color: #000;
52
- top: -12px;
54
+ top: -#{$tooltip-arrow-width-double}px;
53
55
  }
54
56
  }
55
57
 
56
- .#{$vendor-prefix}tooltip-arrow {
58
+ .#{$vendor-prefix}tooltip-arrow,
59
+ .#{$vendor-prefix}popover-arrow {
57
60
  width: 0;
58
61
  height: 0;
59
- border: 6px solid transparent;
62
+ border: #{$tooltip-arrow-width}px solid transparent;
60
63
  position: absolute;
61
64
 
62
65
  &:after {
63
66
  content: "";
64
- border: 4px solid transparent;
67
+ border: #{($tooltip-arrow-width - 2)}px solid transparent;
65
68
  position: absolute;
66
69
  }
67
70
  }
@@ -70,50 +73,43 @@
70
73
 
71
74
  .#{$vendor-prefix}tooltip,
72
75
  .#{$vendor-prefix}popover {
73
- &.fade {
74
- opacity: 0;
75
- @include transition(opacity 0.5s);
76
- }
77
-
78
- &.from-above {
79
- @include transition(transform $tooltip-transition);
80
- @include transform(scale(1.2));
81
-
82
- &.show {
83
- @include transform(scale(1));
76
+ @if index($popover-tooltip-animation, "fade") {
77
+ &.fade {
78
+ opacity: 0;
79
+ @include transition(opacity 0.5s);
84
80
  }
85
81
  }
86
82
 
87
- &.from-below {
88
- @include transition(transform $tooltip-transition);
89
- @include transform(scale(0.8));
83
+ @if index($popover-tooltip-animation, "from-above") {
84
+ &.from-above {
85
+ @include transition(transform $tooltip-transition);
86
+ @include transform(scale(1.2));
90
87
 
91
- &.show {
92
- @include transform(scale(1));
88
+ &.show {
89
+ @include transform(scale(1));
90
+ }
93
91
  }
94
92
  }
95
93
 
96
- &.flip-rotate {
97
- @include transition(transform $tooltip-transition);
98
- @include transform(rotate(-15deg));
94
+ @if index($popover-tooltip-animation, "from-below") {
95
+ &.from-below {
96
+ @include transition(transform $tooltip-transition);
97
+ @include transform(scale(0.8));
99
98
 
100
- &.show {
101
- @include transform(rotate(0deg));
99
+ &.show {
100
+ @include transform(scale(1));
101
+ }
102
102
  }
103
103
  }
104
104
 
105
- &.slide-in {
106
- @include transition(transform $tooltip-transition);
107
-
108
- &.top-left { @include transform(translate(-25%, -25%)); }
109
- &.top-center { @include transform(translateY(-50%)); }
110
- &.top-right { @include transform(translate(25%, -25%)); }
111
- &.center-left { @include transform(translateX(-25%)); }
112
- &.center-right { @include transform(translateX(25%)); }
113
- &.bottom-left { @include transform(translate(-25%, 25%)); }
114
- &.bottom-center { @include transform(translateY(50%)); }
115
- &.bottom-right { @include transform(translate(25%, 25%)); }
105
+ @if index($popover-tooltip-animation, "flip-rotate") {
106
+ &.flip-rotate {
107
+ @include transition(transform $tooltip-transition);
108
+ @include transform(rotate(-15deg));
116
109
 
117
- &.show { @include transform(translate(0)); }
110
+ &.show {
111
+ @include transform(rotate(0deg));
112
+ }
113
+ }
118
114
  }
119
115
  }
@@ -13,7 +13,6 @@
13
13
  z-index: 500;
14
14
  opacity: 0;
15
15
  visibility: hidden;
16
- background: $gray;
17
16
  @include transition(opacity 0.3s);
18
17
 
19
18
  ul {
@@ -30,9 +29,7 @@
30
29
  }
31
30
 
32
31
  > a:hover,
33
- &.#{$state-is-prefix}active a {
34
- background: $gray-lightest;
35
- }
32
+ &.#{$state-is-prefix}active a {}
36
33
  }
37
34
  }
38
35
 
@@ -41,16 +38,15 @@
41
38
  line-height: 100%;
42
39
  display: block;
43
40
  text-decoration: none;
44
- background: $gray-dark;
45
41
  }
46
42
 
47
43
  .#{$vendor-prefix}type-ahead-highlight {
48
44
  background: #fff;
45
+ padding: 0;
49
46
  }
50
47
 
51
48
  .#{$vendor-prefix}type-ahead-desc {
52
49
  display: block;
53
- color: $gray-darkest;
54
50
  font-size: .7rem;
55
51
  }
56
52
 
@@ -8,7 +8,9 @@
8
8
 
9
9
  //-------------------- Button --------------------//
10
10
 
11
- .#{$vendor-prefix}button.#{$shape-oval-class} { border-radius: #{$oval-x} / #{$oval-y}; }
11
+ .#{$vendor-prefix}button.#{$shape-oval-class} {
12
+ border-radius: #{$oval-x} / #{$oval-y};
13
+ }
12
14
 
13
15
  //-------------------- Pagination --------------------//
14
16
 
@@ -8,23 +8,21 @@
8
8
 
9
9
  //-------------------- Button --------------------//
10
10
 
11
- .#{$vendor-prefix}button.#{$shape-pill-class} { border-radius: $pill; }
11
+ .#{$vendor-prefix}button.#{$shape-pill-class} {
12
+ border-radius: $pill;
13
+ }
12
14
 
13
15
  //-------------------- ButtonGroup --------------------//
14
16
 
15
17
  .#{$vendor-prefix}button-group.#{$shape-pill-class} {
16
18
  border-radius: $pill;
17
19
 
18
- > li:first-child .#{$vendor-prefix}button,
19
- > .#{$vendor-prefix}button:first-child,
20
- > .#{$vendor-prefix}button.first {
20
+ @include button-group-first-child {
21
21
  border-top-left-radius: $pill;
22
22
  border-bottom-left-radius: $pill;
23
23
  }
24
24
 
25
- > li:last-child .#{$vendor-prefix}button,
26
- > .#{$vendor-prefix}button:last-child,
27
- > .#{$vendor-prefix}button.last {
25
+ @include button-group-last-child {
28
26
  border-top-right-radius: $pill;
29
27
  border-bottom-right-radius: $pill;
30
28
  }
@@ -33,16 +31,14 @@
33
31
  .#{$vendor-prefix}button-group--vertical.#{$shape-pill-class} {
34
32
  border-radius: $pill;
35
33
 
36
- > li:first-child .#{$vendor-prefix}button,
37
- > .#{$vendor-prefix}button:first-child {
34
+ @include button-group-first-child {
38
35
  border-top-left-radius: $pill;
39
36
  border-top-right-radius: $pill;
40
37
  border-bottom-left-radius: 0;
41
38
  border-bottom-right-radius: 0;
42
39
  }
43
40
 
44
- > li:last-child .#{$vendor-prefix}button,
45
- > .#{$vendor-prefix}button:last-child {
41
+ @include button-group-last-child {
46
42
  border-top-left-radius: 0;
47
43
  border-top-right-radius: 0;
48
44
  border-bottom-left-radius: $pill;
@@ -73,7 +69,7 @@
73
69
  .#{$vendor-prefix}progress.#{$shape-pill-class} {
74
70
  border-radius: $pill;
75
71
 
76
- .#{$vendor-prefix}progress-bar {
72
+ .#{$vendor-prefix}progress-bar:first-child {
77
73
  border-top-left-radius: $pill;
78
74
  border-bottom-left-radius: $pill;
79
75
  }