material-sass 1.1.0 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/fonts/MaterialIcons-Regular.eot +0 -0
  3. data/app/assets/fonts/MaterialIcons-Regular.ijmap +1 -1
  4. data/app/assets/fonts/MaterialIcons-Regular.svg +2373 -0
  5. data/app/assets/fonts/MaterialIcons-Regular.ttf +0 -0
  6. data/app/assets/fonts/MaterialIcons-Regular.woff +0 -0
  7. data/app/assets/fonts/MaterialIcons-Regular.woff2 +0 -0
  8. data/app/assets/fonts/README.md +9 -0
  9. data/app/assets/fonts/codepoints +932 -0
  10. data/app/assets/javascripts/material-sprockets.js +1 -2
  11. data/app/assets/javascripts/material.min.js +2 -2
  12. data/app/assets/javascripts/material/{form-adv-label.js → form-floating-label.js} +0 -0
  13. data/app/assets/javascripts/material/{form-adv-textarea.js → form-textarea.js} +0 -0
  14. data/app/assets/javascripts/material/{datepicker.js → picker.js} +68 -29
  15. data/app/assets/stylesheets/material.min.css +5 -5
  16. data/app/assets/stylesheets/material/addons/_material-icons.scss +1 -1
  17. data/app/assets/stylesheets/material/addons/material-icons/_variables.scss +1 -1
  18. data/app/assets/stylesheets/material/base.scss +5 -7
  19. data/app/assets/stylesheets/material/base/_grid.scss +0 -39
  20. data/app/assets/stylesheets/material/components/_avatar.scss +0 -35
  21. data/app/assets/stylesheets/material/components/_button-flat.scss +2 -15
  22. data/app/assets/stylesheets/material/components/_button-float.scss +42 -46
  23. data/app/assets/stylesheets/material/components/_button.scss +4 -9
  24. data/app/assets/stylesheets/material/components/_card.scss +35 -35
  25. data/app/assets/stylesheets/material/components/_dropdown.scss +2 -10
  26. data/app/assets/stylesheets/material/components/{_form-adv-checkbox.scss → _form-checkbox.scss} +0 -0
  27. data/app/assets/stylesheets/material/components/{_form-adv-label.scss → _form-floating-label.scss} +3 -1
  28. data/app/assets/stylesheets/material/components/{_form-adv-switch.scss → _form-switch.scss} +0 -0
  29. data/app/assets/stylesheets/material/components/{_form-adv-textarea.scss → _form-textarea.scss} +0 -0
  30. data/app/assets/stylesheets/material/components/_form.scss +3 -1
  31. data/app/assets/stylesheets/material/components/_nav.scss +5 -2
  32. data/app/assets/stylesheets/material/components/{_form-adv-datepicker.scss → _picker.scss} +24 -19
  33. data/app/assets/stylesheets/material/components/_snackbar.scss +2 -3
  34. data/app/assets/stylesheets/material/components/_tab.scss +20 -21
  35. data/app/assets/stylesheets/material/components/_tile.scss +45 -44
  36. data/app/assets/stylesheets/material/elements/_content.scss +7 -7
  37. data/app/assets/stylesheets/material/elements/_header.scss +18 -22
  38. data/app/assets/stylesheets/material/elements/_menu.scss +40 -83
  39. data/app/assets/stylesheets/material/mixin/_utilities.scss +33 -0
  40. data/app/assets/stylesheets/material/utilities/_print.scss +12 -36
  41. data/app/assets/stylesheets/material/utilities/_utilities.scss +3 -19
  42. data/lib/material-sass/version.rb +1 -1
  43. metadata +13 -13
  44. data/app/assets/javascripts/init.js +0 -9
  45. data/app/assets/stylesheets/material/elements/_footer.scss +0 -10
  46. data/app/assets/stylesheets/material/mixin/_css3.scss +0 -12
@@ -46,15 +46,15 @@
46
46
  &:focus:after {
47
47
  opacity: 1;
48
48
  }
49
- &.waves-attach:after {
49
+ &.waves-attach:active:after {
50
50
  background-color: transparent;
51
51
  }
52
52
  &.disabled,
53
53
  &[disabled],
54
54
  fieldset[disabled] & {
55
- box-shadow: none !important;
55
+ box-shadow: none;
56
56
  cursor: not-allowed;
57
- opacity: 0.78;
57
+ opacity: 0.54;
58
58
  &:after {
59
59
  display: none;
60
60
  }
@@ -70,12 +70,7 @@
70
70
 
71
71
  .btn-#{$color} {
72
72
  background-color: nth($palette-list-color, $i);
73
- color: nth($palette-list-text, $i);
74
- &:active,
75
- &:focus,
76
- &:hover {
77
- color: nth($palette-list-text, $i);
78
- }
73
+ color: nth($palette-list-text, $i) !important;
79
74
  }
80
75
  }
81
76
 
@@ -1,19 +1,15 @@
1
1
  .card {
2
2
  background-color: $white;
3
3
  border-radius: 2px;
4
- box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.06), 0 0 3px rgba(0, 0, 0, 0.18), 0 1px 3px rgba(0, 0, 0, 0.18);
5
- display: block;
4
+ box-shadow: 0 -1px 0 #e5e5e5, 0 0 2px rgba(0, 0, 0, 0.12), 0 2px 4px rgba(0, 0, 0, 0.24);
6
5
  display: flex;
7
6
  margin-top: $margin-md;
8
7
  margin-bottom: $margin-md;
9
- position: relative;
10
8
  &[href]:focus,
11
9
  &[href]:hover {
10
+ outline: 0;
12
11
  text-decoration: none;
13
12
  }
14
- .card-wrap & {
15
- margin-top: 0;
16
- }
17
13
  }
18
14
 
19
15
  // colour
@@ -34,10 +30,11 @@
34
30
  .card-action {
35
31
  border-top: 1px solid $black-divider;
36
32
  min-height: $nav-height;
37
- position: relative;
38
33
  @include clearfix();
39
- &:first-child {
40
- border-top: 0;
34
+ .card-main > & {
35
+ &:first-child {
36
+ border-top: 0;
37
+ }
41
38
  }
42
39
  }
43
40
 
@@ -50,19 +47,20 @@
50
47
  }
51
48
 
52
49
  .card-header {
50
+ align-items: center;
53
51
  border-bottom: 1px solid $black-divider;
54
52
  display: flex;
55
53
  min-height: $header-height;
56
- position: relative;
57
- &:last-child {
58
- border-bottom: 0;
54
+ .card-main > & {
55
+ &:last-child {
56
+ border-bottom: 0;
57
+ }
59
58
  }
60
59
  }
61
60
 
62
61
  .card-header-side {
63
- min-width: 0;
64
- padding-top: (($header-height - $line-height) / 2);
65
- padding-bottom: (($header-height - $line-height) / 2);
62
+ margin-top: $margin-sm;
63
+ margin-bottom: $margin-sm;
66
64
  &.pull-left {
67
65
  order: -1;
68
66
  padding-left: $grid-gutter;
@@ -89,11 +87,13 @@
89
87
  display: block;
90
88
  overflow: hidden;
91
89
  position: relative;
92
- &:first-child {
93
- border-radius: 2px 2px 0 0;
94
- }
95
- &:last-child {
96
- border-radius: 0 0 2px 2px;
90
+ .card-main > & {
91
+ &:first-child {
92
+ border-radius: 2px 2px 0 0;
93
+ }
94
+ &:last-child {
95
+ border-radius: 0 0 2px 2px;
96
+ }
97
97
  }
98
98
  img {
99
99
  display: block;
@@ -104,28 +104,33 @@
104
104
  }
105
105
 
106
106
  .card-img-heading {
107
- background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.5));
108
107
  color: $white-text-solid;
109
- font-size: $font-size-h4;
110
- line-height: $line-height-h4;
111
108
  margin: 0;
112
109
  padding: $margin-sm $grid-gutter;
113
110
  position: absolute;
114
111
  bottom: 0;
115
112
  left: 0;
116
113
  width: 100%;
114
+ z-index: 1;
115
+ &:before {
116
+ background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.1) 70%, rgba(0, 0, 0, 0.2));
117
+ content: "";
118
+ display: block;
119
+ height: 300%;
120
+ position: absolute;
121
+ bottom: 0;
122
+ left: 0;
123
+ width: 100%;
124
+ z-index: -1;
125
+ }
117
126
  }
118
127
 
119
128
  .card-inner {
120
129
  margin: $margin-md $grid-gutter;
121
- min-width: 0;
122
- position: relative;
123
130
  .card-header & {
124
131
  flex: 1;
125
- font-size: $font-size-h5;
126
- line-height: $line-height-h5;
127
- margin-top: (($header-height - $line-height-h5) / 2);
128
- margin-bottom: (($header-height - $line-height-h5) / 2);
132
+ margin-top: $margin-sm;
133
+ margin-bottom: $margin-sm;
129
134
  }
130
135
  }
131
136
 
@@ -144,6 +149,7 @@
144
149
  color: inherit;
145
150
  &:focus,
146
151
  &:hover {
152
+ outline: 0;
147
153
  text-decoration: none;
148
154
  }
149
155
  }
@@ -167,9 +173,3 @@
167
173
  color: nth($palette-list-text-dark, $i);
168
174
  }
169
175
  }
170
-
171
- .card-wrap {
172
- margin-top: $margin-md;
173
- margin-bottom: ($margin-md * -1);
174
- @include clearfix();
175
- }
@@ -36,8 +36,7 @@
36
36
  transform: scale(1, 1);
37
37
  }
38
38
  &.dropdown-menu-right,
39
- .dropdown.pull-right &,
40
- .nav.pull-right & {
39
+ .dropdown.pull-right & {
41
40
  border-radius: 2px 0 2px 2px;
42
41
  // position
43
42
  right: 0;
@@ -87,17 +86,10 @@
87
86
  left: 0;
88
87
  transform: scale(1, 0);
89
88
  &.dropdown-menu-right,
90
- .dropdown.pull-right &,
91
- .nav.pull-right & {
89
+ .dropdown.pull-right & {
92
90
  // position
93
91
  right: 0;
94
92
  left: auto;
95
93
  }
96
94
  }
97
95
  }
98
-
99
- .dropdown-wrap {
100
- margin-top: $line-height;
101
- margin-bottom: $line-height;
102
- @include clearfix();
103
- }
@@ -32,7 +32,9 @@
32
32
  .form-control {
33
33
  position: relative;
34
34
  z-index: 1;
35
- @include placeholder(transparent);
35
+ &::placeholder {
36
+ color: transparent;
37
+ }
36
38
  }
37
39
  legend + & {
38
40
  margin-top: ($margin-md / 2);
@@ -51,13 +51,15 @@
51
51
  line-height: $line-height;
52
52
  padding: (($input-height - $line-height) / 2) 0 (($input-height - $line-height) / 2 - 1);
53
53
  width: 100%;
54
- @include placeholder($black-hint);
55
54
  &:focus {
56
55
  border-color: $link-color;
57
56
  border-bottom-width: 2px;
58
57
  outline: 0;
59
58
  padding-bottom: (($input-height - $line-height) / 2 - 2);
60
59
  }
60
+ &::placeholder {
61
+ color: $black-hint;
62
+ }
61
63
  &[disabled],
62
64
  &[readonly],
63
65
  fieldset[disabled] & {
@@ -6,8 +6,10 @@
6
6
  @include clearfix();
7
7
  a,
8
8
  .a {
9
- display: block;
10
- padding: (($nav-height - $line-height) / 2) $grid-gutter;
9
+ align-items: center;
10
+ display: flex;
11
+ min-height: $nav-height;
12
+ padding: 0 $grid-gutter;
11
13
  position: relative;
12
14
  &:focus,
13
15
  &:hover {
@@ -37,6 +39,7 @@
37
39
  flex-grow: 1;
38
40
  > a,
39
41
  > .a {
42
+ justify-content: center;
40
43
  text-align: center;
41
44
  }
42
45
  }
@@ -5,17 +5,12 @@
5
5
  }
6
6
 
7
7
  .picker__box {
8
- border-radius: 4px;
9
- box-shadow: 0 1px 30px rgba(0, 0, 0, 0.5);
10
- display: flex;
11
- flex-direction: column;
12
- outline: 0;
13
- position: relative;
14
- vertical-align: middle;
15
- z-index: 1;
8
+ background-color: $white;
9
+ border-radius: 0 0 4px 4px;
10
+ flex: 1;
16
11
  // 992
17
12
  @include responsive(md) {
18
- flex-direction: row;
13
+ border-radius: 0 4px 4px 0;
19
14
  }
20
15
  }
21
16
 
@@ -35,6 +30,9 @@
35
30
  .picker__date-display-bottom {
36
31
  font-size: $font-size-h2;
37
32
  line-height: $line-height-h2;
33
+ overflow: hidden;
34
+ text-overflow: ellipsis;
35
+ white-space: nowrap;
38
36
  }
39
37
 
40
38
  .picker__date-display-top {
@@ -42,16 +40,6 @@
42
40
  margin-bottom: $margin-base;
43
41
  }
44
42
 
45
- .picker__date-inner {
46
- background-color: $white;
47
- border-radius: 0 0 4px 4px;
48
- flex: 1;
49
- // 992
50
- @include responsive(md) {
51
- border-radius: 0 4px 4px 0;
52
- }
53
- }
54
-
55
43
  .picker__day {
56
44
  border-radius: 50%;
57
45
  display: inline-block;
@@ -289,5 +277,22 @@
289
277
  // 992
290
278
  @include responsive(md) {
291
279
  display: block;
280
+ overflow: hidden;
281
+ text-overflow: ellipsis;
282
+ }
283
+ }
284
+
285
+ .picker__wrap {
286
+ border-radius: 4px;
287
+ box-shadow: 0 1px 30px rgba(0, 0, 0, 0.5);
288
+ display: flex;
289
+ flex-direction: column;
290
+ outline: 0;
291
+ position: relative;
292
+ vertical-align: middle;
293
+ z-index: 1;
294
+ // 992
295
+ @include responsive(md) {
296
+ flex-direction: row;
292
297
  }
293
298
  }
@@ -3,7 +3,7 @@
3
3
  right: 0;
4
4
  bottom: 0;
5
5
  left: 0;
6
- z-index: ($content-base + 1);
6
+ z-index: ($top-base + 1);
7
7
  a {
8
8
  cursor: pointer;
9
9
  &:focus,
@@ -46,12 +46,11 @@
46
46
  }
47
47
 
48
48
  .snackbar-text {
49
- overflow: hidden;
49
+ min-width: 0;
50
50
  }
51
51
 
52
52
  [data-dismiss="snackbar"] {
53
53
  cursor: pointer;
54
- float: right;
55
54
  font-weight: $font-weight-medium;
56
55
  margin-left: $grid-gutter;
57
56
  order: 1;
@@ -7,25 +7,30 @@
7
7
  margin-top: 0 !important;
8
8
  margin-bottom: 0 !important;
9
9
  > li {
10
- vertical-align: bottom;
11
10
  > a,
12
11
  > .a {
13
- border-bottom: 2px solid transparent;
14
12
  color: inherit;
15
- padding-bottom: (($nav-height - $line-height) / 2 - 2);
16
13
  text-transform: uppercase;
17
- transition: border-bottom-color 0s;
18
- &:focus,
19
- &:hover {
20
- border-bottom-color: lighten($link-color, 30%);
21
- transition: border-bottom-color 0.3s $timing;
14
+ &:after {
15
+ border-bottom: 2px solid $brand-color-accent;
16
+ content: "";
17
+ display: block;
18
+ opacity: 0;
19
+ position: absolute;
20
+ bottom: 0;
21
+ left: 0;
22
+ transition: opacity 0.3s $timing;
23
+ width: 100%;
24
+ }
25
+ &:focus:after,
26
+ &:hover:after {
27
+ opacity: 0.3;
22
28
  }
23
29
  }
24
- &.active > a,
25
- &.active > .a {
26
- border-bottom-color: $brand-color-accent;
27
- color: $brand-color-accent;
28
- transition: border-bottom-color 0s 0.45s;
30
+ &.active > a:after,
31
+ &.active > .a:after {
32
+ opacity: 1;
33
+ transition: opacity 0s 0.45s;
29
34
  }
30
35
  }
31
36
  }
@@ -56,16 +61,10 @@
56
61
  > li {
57
62
  > a,
58
63
  > .a {
59
- &:focus,
60
- &:hover {
61
- border-bottom-color: nth($palette-list-light, $i);
64
+ &:after {
65
+ border-bottom-color: nth($palette-list-color, $i);
62
66
  }
63
67
  }
64
- &.active > a,
65
- &.active > .a {
66
- border-bottom-color: nth($palette-list-color, $i);
67
- color: nth($palette-list-color, $i);
68
- }
69
68
  }
70
69
  }
71
70
  .tab-nav-indicator.animate {
@@ -1,17 +1,16 @@
1
1
  .tile {
2
2
  background-color: $white;
3
- box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.06), 0 0 3px rgba(0, 0, 0, 0.18), 0 1px 3px rgba(0, 0, 0, 0.18);
4
- display: block;
3
+ box-shadow: 0 -1px 0 #e5e5e5, 0 0 2px rgba(0, 0, 0, 0.12), 0 2px 4px rgba(0, 0, 0, 0.24);
5
4
  display: flex;
6
5
  min-height: $tile-height;
7
- position: relative;
8
6
  &[href]:focus,
9
7
  &[href]:hover {
8
+ outline: 0;
10
9
  text-decoration: none;
11
10
  }
12
11
  &.active {
13
- margin-top: $margin-md !important;
14
- margin-bottom: $margin-md !important;
12
+ margin-top: $margin-md;
13
+ margin-bottom: $margin-md;
15
14
  }
16
15
  }
17
16
 
@@ -31,10 +30,7 @@
31
30
  }
32
31
 
33
32
  .tile-action {
34
- @extend .card-action;
35
- border-top: 0;
36
- float: right;
37
- min-width: 0;
33
+ min-height: $tile-height;
38
34
  order: 1;
39
35
  user-select: none;
40
36
  html.no-touchevents & {
@@ -46,11 +42,12 @@
46
42
  }
47
43
 
48
44
  .tile-action-show {
49
- display: block !important;
45
+ html.no-touchevents & {
46
+ display: block;
47
+ }
50
48
  }
51
49
 
52
50
  .tile-active-show {
53
- min-height: 0;
54
51
  &.collapsing {
55
52
  transition: height 0.15s linear;
56
53
  }
@@ -63,21 +60,27 @@
63
60
  margin-right: ($grid-gutter / -2);
64
61
  margin-left: ($grid-gutter / -2);
65
62
  }
63
+ > [data-toggle="tile"] {
64
+ cursor: pointer;
65
+ display: flex;
66
+ flex: 1;
67
+ [data-ignore="tile"] {
68
+ cursor: default;
69
+ cursor: initial;
70
+ }
71
+ }
66
72
  }
67
73
 
68
74
  .tile-collapse-full {
69
- // 1056 - 1439
70
- @media only screen and (min-width: ($grid-gutter * 4 + $screen-md)) and (max-width: ($screen-lg - 1)) {
71
- &.active {
72
- margin-right: ($grid-gutter * -4 + 1);
73
- margin-left: ($grid-gutter * -4 + 1);
74
- }
75
- }
76
- // 1504
77
- @media only screen and (min-width: ($grid-gutter * 4 + $screen-lg)) {
75
+ &.active {
76
+ margin-right: calc(-50vw + 50% + 2px);
77
+ margin-left: calc(-50vw + 50% + 2px);
78
+ }
79
+ // 992
80
+ @include responsive(md) {
78
81
  &.active {
79
- margin-right: ($grid-gutter * -4 + 1);
80
- margin-left: ($grid-gutter * -4 + 1);
82
+ margin-right: calc(-50vw + 50% + #{$grid-gutter});
83
+ margin-left: calc(-50vw + 50% + #{$grid-gutter});
81
84
  }
82
85
  }
83
86
  }
@@ -85,10 +88,13 @@
85
88
  .tile-footer {
86
89
  background-color: $offwhite-solid;
87
90
  border-top: 1px solid $black-divider;
88
- position: relative;
91
+ min-height: $nav-height;
89
92
  @include clearfix();
90
- &:first-child {
91
- border-top: 0;
93
+ .tile > &,
94
+ .tile-active-show > & {
95
+ &:first-child {
96
+ border-top: 0;
97
+ }
92
98
  }
93
99
  }
94
100
 
@@ -103,27 +109,35 @@
103
109
  }
104
110
 
105
111
  .tile-footer-btn {
106
- @extend .card-action-btn;
112
+ margin: (($nav-height - $btn-height) / 2) ($grid-gutter / 2);
113
+ white-space: nowrap;
114
+ .btn + .btn {
115
+ margin-left: ($grid-gutter / 2);
116
+ }
107
117
  }
108
118
 
109
119
  .tile-inner {
110
120
  flex: 1;
111
121
  margin: (($tile-height - $line-height) / 2) $grid-gutter;
112
122
  min-width: 0;
113
- position: relative;
114
123
  }
115
124
 
116
125
  .tile-side {
117
- @extend .card-header-side;
118
- padding-top: (($tile-height - $line-height) / 2);
119
- padding-bottom: (($tile-height - $line-height) / 2);
126
+ align-self: center;
127
+ &.pull-left {
128
+ order: -1;
129
+ margin-left: $grid-gutter;
130
+ }
131
+ &.pull-right {
132
+ order: 1;
133
+ margin-right: $grid-gutter;
134
+ }
120
135
  }
121
136
 
122
137
  .tile-sub {
123
138
  border-top: 1px solid $black-divider;
124
139
  padding-right: $grid-gutter;
125
140
  padding-left: $grid-gutter;
126
- position: relative;
127
141
  @include clearfix();
128
142
  }
129
143
 
@@ -139,17 +153,4 @@
139
153
  .tile-wrap {
140
154
  margin-top: $margin-md;
141
155
  margin-bottom: $margin-md;
142
- position: relative;
143
- }
144
-
145
- div[data-toggle="tile"] {
146
- cursor: pointer;
147
- display: block;
148
- display: flex;
149
- flex: 1;
150
- min-height: 0;
151
- [data-ignore="tile"] {
152
- cursor: default;
153
- cursor: initial;
154
- }
155
156
  }