titon-toolkit 1.0.0.rc.2 → 1.0.0.rc.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. data/readme.md +6 -13
  2. data/roadmap.md +5 -5
  3. data/scss/toolkit/_common.scss +4 -2
  4. data/scss/toolkit/components/accordion.scss +0 -3
  5. data/scss/toolkit/components/breadcrumbs.scss +4 -5
  6. data/scss/toolkit/components/button-group.scss +23 -9
  7. data/scss/toolkit/components/button.scss +4 -5
  8. data/scss/toolkit/components/carousel.scss +7 -21
  9. data/scss/toolkit/components/dropdown.scss +6 -7
  10. data/scss/toolkit/components/flyout.scss +47 -34
  11. data/scss/toolkit/components/grid.scss +7 -7
  12. data/scss/toolkit/components/icon.scss +1 -1
  13. data/scss/toolkit/components/input.scss +1 -6
  14. data/scss/toolkit/components/label.scss +27 -16
  15. data/scss/toolkit/components/modal.scss +7 -12
  16. data/scss/toolkit/components/notice.scss +0 -3
  17. data/scss/toolkit/components/pagination.scss +3 -1
  18. data/scss/toolkit/components/popover.scss +6 -6
  19. data/scss/toolkit/components/progress.scss +17 -3
  20. data/scss/toolkit/components/showcase.scss +1 -22
  21. data/scss/toolkit/components/table.scss +30 -13
  22. data/scss/toolkit/components/tabs.scss +5 -3
  23. data/scss/toolkit/components/tooltip.scss +2 -1
  24. data/scss/toolkit/components/type-ahead.scss +18 -5
  25. data/scss/toolkit/effects/oval.scss +3 -3
  26. data/scss/toolkit/effects/pill.scss +15 -4
  27. data/scss/toolkit/effects/skew.scss +4 -4
  28. data/scss/toolkit/layout/base.scss +16 -1
  29. data/scss/toolkit/layout/code.scss +1 -1
  30. data/scss/toolkit/layout/form.scss +1 -1
  31. data/scss/toolkit/mixins/_grid.scss +26 -19
  32. data/scss/toolkit/mixins/_helper.scss +10 -0
  33. data/scss/toolkit/mixins/_layout.scss +0 -60
  34. data/scss/toolkit/mixins/_responsive.scss +6 -0
  35. data/scss/toolkit/mixins/_state.scss +32 -0
  36. data/scss/toolkit/mixins/_unit.scss +73 -0
  37. data/scss/toolkit/themes/titon.scss +93 -24
  38. data/version.md +1 -1
  39. metadata +23 -15
  40. checksums.yaml +0 -7
  41. data/scss/ie8.scss +0 -184
@@ -14,7 +14,7 @@
14
14
  display: block;
15
15
  margin-bottom: $margin;
16
16
 
17
- ul, li {
17
+ ul, ol, li {
18
18
  @include reset-inline-block;
19
19
  list-style: none;
20
20
  }
@@ -29,9 +29,11 @@
29
29
 
30
30
  //-------------------- Modifiers --------------------//
31
31
 
32
- .tabs.tabs--horizontal {
32
+ .tabs--horizontal {
33
+ @extend .tabs;
34
+
33
35
  .tabs-nav {
34
- ul, li, a, button {
36
+ ul, ol, li, a, button {
35
37
  display: block;
36
38
  float: none;
37
39
  text-align: left;
@@ -10,7 +10,8 @@
10
10
  position: absolute;
11
11
  top: 0;
12
12
  left: 0;
13
- margin: 0;
13
+ border: none;
14
+ margin: $margin;
14
15
  padding: $small-padding;
15
16
  z-index: 500;
16
17
  max-width: 200px;
@@ -14,7 +14,6 @@
14
14
  opacity: 0;
15
15
  visibility: hidden;
16
16
  background: $gray;
17
- border: 1px solid $gray-dark;
18
17
  @include transition(opacity 0.3s);
19
18
 
20
19
  ul {
@@ -22,21 +21,35 @@
22
21
  margin: 0;
23
22
  padding: 0;
24
23
  min-width: 200px;
24
+ }
25
25
 
26
- a,
27
- li.heading {
26
+ li {
27
+ > a {
28
28
  padding: $small-padding;
29
29
  line-height: 100%;
30
30
  display: block;
31
31
  text-decoration: none;
32
32
  }
33
33
 
34
- li.heading {
35
- font-weight: bold;
34
+ > a:hover,
35
+ &.is-active a {
36
+ background: $gray-lightest;
36
37
  }
37
38
  }
38
39
  }
39
40
 
41
+ .type-ahead-heading {
42
+ padding: $small-padding;
43
+ line-height: 100%;
44
+ display: block;
45
+ text-decoration: none;
46
+ background: $gray-dark;
47
+ }
48
+
49
+ .type-ahead-highlight {
50
+ background: #fff;
51
+ }
52
+
40
53
  .type-ahead-desc {
41
54
  display: block;
42
55
  color: $gray-darkest;
@@ -12,16 +12,16 @@
12
12
 
13
13
  //-------------------- Pagination --------------------//
14
14
 
15
- .pagination.pagination--grouped.oval {
15
+ .pagination--grouped.oval {
16
16
  ul {
17
17
  border-radius: #{$oval-x} / #{$oval-y};
18
18
  }
19
19
 
20
- li:first-child .button {
20
+ li:first-child a {
21
21
  border-radius: #{$oval-x} 0 0 #{$oval-x} / #{$oval-y} 0 0 #{$oval-y};
22
22
  }
23
23
 
24
- li:last-child .button {
24
+ li:last-child a {
25
25
  border-radius: 0 #{$oval-x} #{$oval-x} 0 / 0 #{$oval-y} #{$oval-y} 0;
26
26
  }
27
27
  }
@@ -30,7 +30,7 @@
30
30
  }
31
31
  }
32
32
 
33
- .button-group.button-group--vertical.pill {
33
+ .button-group--vertical.pill {
34
34
  border-radius: $pill;
35
35
 
36
36
  > li:first-child .button,
@@ -52,22 +52,33 @@
52
52
 
53
53
  //-------------------- Pagination --------------------//
54
54
 
55
- .pagination.pagination--grouped.pill {
55
+ .pagination--grouped.pill {
56
56
  ul {
57
57
  border-radius: $pill;
58
58
  }
59
59
 
60
- li:first-child .button {
60
+ li:first-child a {
61
61
  border-top-left-radius: $pill;
62
62
  border-bottom-left-radius: $pill;
63
63
  }
64
64
 
65
- li:last-child .button {
65
+ li:last-child a {
66
66
  border-top-right-radius: $pill;
67
67
  border-bottom-right-radius: $pill;
68
68
  }
69
69
  }
70
70
 
71
+ //-------------------- Progress --------------------//
72
+
73
+ .progress.pill {
74
+ border-radius: $pill;
75
+
76
+ .progress-bar {
77
+ border-top-left-radius: $pill;
78
+ border-bottom-left-radius: $pill;
79
+ }
80
+ }
81
+
71
82
  //-------------------- Visual --------------------//
72
83
 
73
84
  .visual-gloss.pill:after {
@@ -33,7 +33,7 @@
33
33
  }
34
34
  }
35
35
 
36
- .button-group.button-group--vertical {
36
+ .button-group--vertical {
37
37
  &.skew {
38
38
  border-top-left-radius: $skew-y 1.5rem;
39
39
  border-bottom-left-radius: $skew-y 1.5rem;
@@ -68,16 +68,16 @@
68
68
 
69
69
  //-------------------- Pagination --------------------//
70
70
 
71
- .pagination.pagination--grouped.skew {
71
+ .pagination--grouped.skew {
72
72
  ul {
73
73
  border-radius: #{$skew-x $skew-x} 0 0 / #{$skew-y $skew-y} 0 0;
74
74
  }
75
75
 
76
- li:first-child .button {
76
+ li:first-child a {
77
77
  border-radius: #{$skew-x} 0 0 0 / #{$skew-y} 0 0 0;
78
78
  }
79
79
 
80
- li:last-child .button {
80
+ li:last-child a {
81
81
  border-radius: 0 #{$skew-x} 0 0 / 0 #{$skew-y} 0 0;
82
82
  }
83
83
  }
@@ -124,8 +124,23 @@
124
124
  background: black(0);
125
125
 
126
126
  &:hover { opacity: 1; border-width: 2px; }
127
- @include active-state { background: #fff; }
127
+ @include is-active { background: #fff; }
128
128
  }
129
129
 
130
130
  &:empty { display: none; }
131
+ }
132
+
133
+ // Sorter
134
+ .sorter {
135
+ @include reset-inline-block;
136
+ max-width: 10px;
137
+ line-height: 5px;
138
+ top: -1px;
139
+ margin: 0 .25rem;
140
+
141
+ .caret-up,
142
+ .caret-down { opacity: .25; }
143
+
144
+ &.desc .caret-up,
145
+ &.asc .caret-down { opacity: 1; }
131
146
  }
@@ -44,7 +44,7 @@ pre {
44
44
  border: none;
45
45
  }
46
46
 
47
- &.code--scrollable {
47
+ &.is-scrollable {
48
48
  max-height: 350px;
49
49
  overflow-y: auto;
50
50
  }
@@ -76,7 +76,7 @@ label,
76
76
  box-shadow: none;
77
77
  }
78
78
 
79
- @include disabled-state {
79
+ @include is-disabled {
80
80
  cursor: not-allowed;
81
81
  color: $gray-darkest;
82
82
  border-color: $gray;
@@ -1,46 +1,53 @@
1
1
 
2
- //$gutter-width: if($grid-gutter, to-percent($grid-gutter), 0);
2
+ @import "layout";
3
3
 
4
- // Calculate a width using a grid cell
5
- @function grid-span($columns, $n) {
4
+ // Calculate the gutter spacing as a percentage.
5
+ // Use the max width of the grid to calculate against.
6
+ @function grid-gutter($width, $gutter) {
7
+ @return if($gutter, ((to-pixel($gutter) / to-pixel($width)) * 100 * 1%), 0%);
8
+ }
9
+
10
+ // Calculate the width of an individual grid column.
11
+ // Take into account max widths and gutters.
12
+ @function grid-span($n, $columns, $width: $grid-width, $gutter: $grid-gutter) {
6
13
  $row-width: 100%;
14
+ $gutter-width: 0%;
7
15
 
8
16
  // If a gutter is set, remove width based on the sum of the gutter columns
9
- /*@if $grid-gutter {
17
+ @if $gutter {
18
+ $gutter-width: grid-gutter($width, $gutter);
10
19
  $row-width: $row-width - ($gutter-width * ($columns - 1));
11
- }*/
20
+ }
12
21
 
13
22
  // The column width should span a division of the total width
14
23
  $span-width: ($row-width / $columns) * $n;
15
24
 
16
25
  // If a gutter is set, increase the column width to fill in the missing gaps
17
- /*@if $grid-gutter and $n > 1 {
26
+ @if $gutter and $n > 1 {
18
27
  $span-width: $span-width + (($n - 1) * $gutter-width);
19
- }*/
28
+ }
20
29
 
21
30
  @return $span-width;
22
31
  }
23
32
 
24
- // Styles for the row containing the columns
25
- @mixin grid-row() {
33
+ // Styles for the grid row containing the columns.
34
+ @mixin grid-row($width: $grid-width) {
26
35
  text-align: left;
27
- width: $grid-width;
28
- max-width: $grid-width;
36
+ width: $width;
37
+ max-width: $width;
29
38
 
30
39
  @include clear-fix;
31
40
  }
32
41
 
33
- // Styles for the column
34
- @mixin grid-column() {
42
+ // Styles for the individual grid column.
43
+ @mixin grid-column($width: $grid-width, $gutter: $grid-gutter) {
35
44
  position: relative;
36
45
  min-height: 1px;
37
46
  float: left;
38
47
 
39
- /*@if $grid-gutter {
40
- margin-right: $gutter-width;
48
+ @if $gutter {
49
+ margin-right: grid-gutter($width, $gutter);
41
50
 
42
- &:last-child {
43
- margin-right: 0;
44
- }
45
- }*/
51
+ &:last-child { margin-right: 0; }
52
+ }
46
53
  }
@@ -0,0 +1,10 @@
1
+
2
+ // Black transparent background
3
+ @function black($opacity){
4
+ @return rgba(0, 0, 0, $opacity);
5
+ }
6
+
7
+ // White transparent background
8
+ @function white($opacity){
9
+ @return rgba(255, 255, 255, $opacity);
10
+ }
@@ -31,8 +31,6 @@
31
31
  }
32
32
  }
33
33
 
34
- //-------------------- Sizes --------------------//
35
-
36
34
  @mixin size-small {
37
35
  font-size: $small-size;
38
36
  padding: $small-padding;
@@ -46,62 +44,4 @@
46
44
  @mixin size-large {
47
45
  font-size: $large-size;
48
46
  padding: $large-padding;
49
- }
50
-
51
- //-------------------- States --------------------//
52
-
53
- // Contains active styles (on self or inherited from parent)
54
- @mixin active-state {
55
- .is-active > &,
56
- .is-active > li > &,
57
- &.is-active,
58
- &.is-active:hover { @content; }
59
- }
60
-
61
- // Contains disabled styles (on self or inherited from parent)
62
- @mixin disabled-state {
63
- .is-disabled > &,
64
- .is-disabled > li > &,
65
- &.is-disabled,
66
- &.is-disabled:hover,
67
- &[disabled],
68
- &[disabled]:hover { @content; }
69
- }
70
-
71
- //-------------------- Helpers --------------------//
72
-
73
- @function black($opacity){
74
- @return rgba(0, 0, 0, $opacity);
75
- }
76
-
77
- @function white($opacity){
78
- @return rgba(255, 255, 255, $opacity);
79
- }
80
-
81
- //-------------------- Conversions --------------------//
82
-
83
- // Remove the unit and return the integer
84
- @function strip-unit($value) {
85
- @return ($value / ($value * 0 + 1));
86
- }
87
-
88
- // Convert a unit value to a percentage while using $base-size as the reference
89
- @function to-percent($from) {
90
- $from-unit: unit($from);
91
- $value: $from;
92
-
93
- @if $from-unit == '%' {
94
- @return $from;
95
-
96
- } @else if $from-unit == 'px' {
97
- // Do nothing
98
-
99
- } @else if $from-unit == 'em' or $from-unit == 'rem' {
100
- $value: (strip-unit($from) * strip-unit($base-size)) * 1px;
101
-
102
- } @else {
103
- @warn 'Unknown conversion unit type.';
104
- }
105
-
106
- @return percentage(($value / $base-size) / 100);
107
47
  }
@@ -1,34 +1,40 @@
1
1
 
2
+ // Media query for minimum resolution
2
3
  @mixin if-min($min) {
3
4
  @media only screen and (min-width: $min) {
4
5
  @content;
5
6
  }
6
7
  }
7
8
 
9
+ // Media query for maximum resolution
8
10
  @mixin if-max($max) {
9
11
  @media only screen and (max-width: $max) {
10
12
  @content;
11
13
  }
12
14
  }
13
15
 
16
+ // Media query for between minimum and maximum resolution
14
17
  @mixin if-min-max($min, $max) {
15
18
  @media only screen and (min-width: $min) and (max-width: $max) {
16
19
  @content;
17
20
  }
18
21
  }
19
22
 
23
+ // Media query for landscape orientation detection
20
24
  @mixin if-landscape {
21
25
  @media only screen and (orientation: landscape) {
22
26
  @content;
23
27
  }
24
28
  }
25
29
 
30
+ // Media query for portrait orientation detection
26
31
  @mixin if-portrait {
27
32
  @media only screen and (orientation: portrait) {
28
33
  @content;
29
34
  }
30
35
  }
31
36
 
37
+ // Media query for retina / HD displays
32
38
  @mixin if-retina {
33
39
  @media
34
40
  only screen and (-webkit-min-device-pixel-ratio: 2),
@@ -0,0 +1,32 @@
1
+
2
+ @mixin is-active {
3
+ .is-active > &,
4
+ .is-active > li > &,
5
+ &.is-active,
6
+ &.is-active:hover { @content; }
7
+ }
8
+
9
+ @mixin is-disabled {
10
+ .is-disabled > &,
11
+ .is-disabled > li > &,
12
+ &.is-disabled,
13
+ &.is-disabled:hover,
14
+ &[disabled],
15
+ &[disabled]:hover { @content; }
16
+ }
17
+
18
+ @mixin is-info {
19
+ &.is-info { @content; }
20
+ }
21
+
22
+ @mixin is-error {
23
+ &.is-error { @content; }
24
+ }
25
+
26
+ @mixin is-warning {
27
+ &.is-warning { @content; }
28
+ }
29
+
30
+ @mixin is-success {
31
+ &.is-success { @content; }
32
+ }