material-sass 4.0.0.beta3 → 4.0.0

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/Rakefile +11 -10
  3. data/assets/javascripts/material-sprockets.js +1 -5
  4. data/assets/javascripts/material.js +155 -109
  5. data/assets/javascripts/material.min.js +4 -5
  6. data/assets/javascripts/material/addons/pickadate.js +0 -1
  7. data/assets/javascripts/material/components/expansion-panel.js +4 -5
  8. data/assets/javascripts/material/components/floating-label.js +10 -10
  9. data/assets/javascripts/material/components/nav-drawer.js +94 -68
  10. data/assets/javascripts/material/components/selection-control-focus.js +4 -5
  11. data/assets/javascripts/material/components/tab-switch.js +22 -11
  12. data/assets/javascripts/material/components/util.js +4 -14
  13. data/assets/stylesheets/material/{_colours.scss → _colors.scss} +414 -6
  14. data/assets/stylesheets/material/_functions.scss +17 -5
  15. data/assets/stylesheets/material/base/_base.scss +24 -0
  16. data/assets/stylesheets/material/bootstrap/_alert.scss +2 -2
  17. data/assets/stylesheets/material/bootstrap/_badge.scss +4 -4
  18. data/assets/stylesheets/material/bootstrap/_carousel.scss +36 -0
  19. data/assets/stylesheets/material/bootstrap/_close.scss +1 -1
  20. data/assets/stylesheets/material/bootstrap/_form.scss +26 -25
  21. data/assets/stylesheets/material/bootstrap/_pagination.scss +1 -1
  22. data/assets/stylesheets/material/material.scss +1 -1
  23. data/assets/stylesheets/material/material/_button-flat.scss +1 -1
  24. data/assets/stylesheets/material/material/_button-float.scss +22 -0
  25. data/assets/stylesheets/material/material/_button-group.scss +2 -2
  26. data/assets/stylesheets/material/material/_button.scss +6 -6
  27. data/assets/stylesheets/material/material/_card.scss +4 -4
  28. data/assets/stylesheets/material/material/_chip.scss +2 -2
  29. data/assets/stylesheets/material/material/_data-table.scss +62 -35
  30. data/assets/stylesheets/material/material/_dialog.scss +1 -1
  31. data/assets/stylesheets/material/material/_expansion-panel.scss +6 -6
  32. data/assets/stylesheets/material/material/_menu.scss +14 -0
  33. data/assets/stylesheets/material/material/_navdrawer.scss +99 -90
  34. data/assets/stylesheets/material/material/_picker.scss +69 -10
  35. data/assets/stylesheets/material/material/_progress-circular.scss +3 -3
  36. data/assets/stylesheets/material/material/_progress.scss +7 -7
  37. data/assets/stylesheets/material/material/_tab.scss +4 -0
  38. data/assets/stylesheets/material/material/_text-field-box.scss +19 -19
  39. data/assets/stylesheets/material/material/_text-field-floating-label.scss +8 -8
  40. data/assets/stylesheets/material/material/_text-field-input-group.scss +3 -3
  41. data/assets/stylesheets/material/material/_text-field.scss +3 -3
  42. data/assets/stylesheets/material/material/_toolbar.scss +48 -65
  43. data/assets/stylesheets/material/mixins/_breakpoint.scss +40 -22
  44. data/assets/stylesheets/material/mixins/_grid-framework.scss +6 -2
  45. data/assets/stylesheets/material/mixins/_grid.scss +10 -19
  46. data/assets/stylesheets/material/utilities/_background.scss +1 -1
  47. data/assets/stylesheets/material/utilities/_border.scss +1 -2
  48. data/assets/stylesheets/material/utilities/_display.scss +24 -16
  49. data/assets/stylesheets/material/utilities/_flex.scss +4 -0
  50. data/assets/stylesheets/material/utilities/_text.scss +1 -1
  51. data/assets/stylesheets/material/variables/_elevation-shadow.scss +0 -6
  52. data/assets/stylesheets/material/variables/_grid.scss +10 -19
  53. data/assets/stylesheets/material/variables/_palette.scss +26 -25
  54. data/assets/stylesheets/material/variables/_spacer.scss +24 -21
  55. data/assets/stylesheets/material/variables/_typography.scss +0 -1
  56. data/assets/stylesheets/material/variables/_variable-bootstrap.scss +7 -9
  57. data/assets/stylesheets/material/variables/_variable-material.scss +34 -29
  58. data/lib/material-sass/version.rb +1 -1
  59. metadata +5 -5
@@ -134,7 +134,7 @@
134
134
  @each $color, $values in $theme-colors {
135
135
  &-#{$color} {
136
136
  @include plain-active-focus-hover {
137
- color: map-get(theme-color($color), color);
137
+ color: theme-color($color);
138
138
  }
139
139
 
140
140
  &.disabled,
@@ -75,18 +75,18 @@
75
75
 
76
76
  @each $color, $values in $theme-colors {
77
77
  .list-group-item-#{$color} {
78
- background-color: map-get(theme-color($color), lighter);
79
- color: color-yiq(map-get(theme-color($color), lighter));
78
+ background-color: theme-color-light($color);
79
+ color: color-yiq(theme-color-light($color));
80
80
 
81
81
  &.active {
82
- background-color: map-get(theme-color($color), color);
83
- color: color-yiq(map-get(theme-color($color), color));
82
+ background-color: theme-color($color);
83
+ color: color-yiq(theme-color($color));
84
84
  }
85
85
 
86
86
  &.list-group-item-action {
87
87
  @include active-focus-hover {
88
- background-color: map-get(theme-color($color), color);
89
- color: color-yiq(map-get(theme-color($color), color));
88
+ background-color: theme-color($color);
89
+ color: color-yiq(theme-color($color));
90
90
  }
91
91
  }
92
92
  }
@@ -338,6 +338,19 @@
338
338
  }
339
339
  }
340
340
 
341
+ .dropdown-item-text {
342
+ color: $menu-link-color;
343
+ display: block;
344
+ font-weight: inherit;
345
+ padding: $menu-link-padding-y $menu-link-padding-x;
346
+ transform-origin: 0 0;
347
+
348
+ .dropdown-menu-sm &,
349
+ .menu-cascading & {
350
+ padding: $menu-link-padding-y-cascading $menu-link-padding-x-cascading;
351
+ }
352
+ }
353
+
341
354
  // Toggle
342
355
 
343
356
  .dropdown-toggle {
@@ -348,6 +361,7 @@
348
361
  display: inline-block;
349
362
  margin-right: ($caret-spacer-x * -1);
350
363
  margin-left: $caret-spacer-x;
364
+ vertical-align: top;
351
365
 
352
366
  .dropright & {
353
367
  content: $caret-icon-right;
@@ -32,10 +32,9 @@
32
32
  // Content
33
33
 
34
34
  .navdrawer-content {
35
- @include transition-sharp(transform);
35
+ @include transition-sharp(box-shadow, transform);
36
36
 
37
37
  background-color: $navdrawer-content-bg;
38
- box-shadow: map-get($navdrawer-elevation-shadow, shadow);
39
38
  max-width: calc(100% - #{$navdrawer-gutter-width});
40
39
  overflow-x: hidden;
41
40
  overflow-y: auto;
@@ -53,8 +52,9 @@
53
52
  }
54
53
 
55
54
  .navdrawer.show & {
56
- @include transition-deceleration(transform);
55
+ @include transition-deceleration(box-shadow, transform);
57
56
 
57
+ box-shadow: map-get($navdrawer-elevation-shadow, shadow);
58
58
  transform: translate3d(0, 0, 0);
59
59
  }
60
60
  }
@@ -102,9 +102,15 @@
102
102
  display: flex;
103
103
  flex-direction: column;
104
104
  list-style: none;
105
+ margin-top: $navdrawer-inner-spacer-y;
105
106
  margin-bottom: $navdrawer-inner-spacer-y;
106
107
  padding-left: 0;
107
108
 
109
+ .navdrawer-header + &,
110
+ .navdrawer-subheader + & {
111
+ margin-top: 0;
112
+ }
113
+
108
114
  .nav-link {
109
115
  @include text-truncate;
110
116
  @include transition-standard(background-color, color);
@@ -153,118 +159,121 @@
153
159
  color: $navdrawer-nav-link-color-active;
154
160
  }
155
161
 
156
- // Permanent
162
+ // Permanent, persistent and temporary variations
157
163
 
158
- @include media-breakpoint-up(lg) {
159
- .navdrawer-permanent {
160
- border-right: $navdrawer-border-width solid $navdrawer-border-color;
161
- display: block !important; // stylelint-disable-line declaration-no-important
162
- right: auto;
163
- width: $navdrawer-width;
164
+ @each $breakpoint in map-keys($grid-breakpoints) {
165
+ $next: breakpoint-next($breakpoint);
166
+ $infix: breakpoint-infix($next);
164
167
 
165
- &.navdrawer-right {
166
- border-right: 0;
167
- border-left: $navdrawer-border-width solid $navdrawer-border-color;
168
- right: 0;
169
- left: auto;
168
+ @include media-breakpoint-up($next) {
169
+ .navdrawer-backdrop-permanent#{$infix} {
170
+ display: none;
170
171
  }
171
172
 
172
- .navdrawer-content {
173
- box-shadow: none;
174
- max-width: none;
175
- position: absolute;
176
- transform: translate3d(0, 0, 0);
177
- width: 100%;
173
+ .navdrawer-backdrop-persistent#{$infix} {
174
+ display: none;
178
175
  }
179
- }
180
176
 
181
- .navdrawer-backdrop-permanent {
182
- display: none;
183
- }
184
-
185
- .navdrawer-permanent-clipped,
186
- .navdrawer-permanent-float {
187
- top: $toolbar-height;
188
- z-index: (map-get($toolbar-elevation-shadow, elevation) - 1);
189
- }
177
+ .navdrawer-backdrop-temporary#{$infix} {
178
+ display: none;
179
+ }
190
180
 
191
- .navdrawer-permanent-clipped {
192
- border-top: $navdrawer-border-width solid $navdrawer-border-color;
193
- margin-top: ($navdrawer-border-width * -1);
194
- }
181
+ .navdrawer-permanent#{$infix} {
182
+ border-right: $navdrawer-border-width solid $navdrawer-border-color;
183
+ display: block !important; // stylelint-disable-line declaration-no-important
184
+ right: auto;
185
+ width: $navdrawer-width;
186
+
187
+ &.navdrawer-permanent-clipped,
188
+ &.navdrawer-permanent-float {
189
+ top: $toolbar-height;
190
+ z-index: (map-get($toolbar-elevation-shadow, elevation) - 1);
191
+ }
195
192
 
196
- .navdrawer-permanent-float {
197
- border-right: 0;
193
+ &.navdrawer-permanent-clipped {
194
+ border-top: $navdrawer-border-width solid $navdrawer-border-color;
195
+ margin-top: ($navdrawer-border-width * -1);
196
+ }
198
197
 
199
- &.navdrawer-right {
200
- border-left: 0;
201
- }
198
+ &.navdrawer-permanent-float {
199
+ border-right: 0;
202
200
 
203
- .navdrawer-content {
204
- background-color: transparent;
205
- }
206
- }
207
- }
201
+ &.navdrawer-right {
202
+ border-left: 0;
203
+ }
208
204
 
209
- // Persistent
205
+ .navdrawer-content {
206
+ background-color: transparent;
207
+ }
208
+ }
210
209
 
211
- @include media-breakpoint-up(lg) {
212
- .navdrawer-persistent {
213
- right: auto;
214
- width: $navdrawer-width;
210
+ &.navdrawer-right {
211
+ border-right: 0;
212
+ border-left: $navdrawer-border-width solid $navdrawer-border-color;
213
+ right: 0;
214
+ left: auto;
215
+ }
215
216
 
216
- &.navdrawer-right {
217
- right: 0;
218
- left: auto;
217
+ &.show .navdrawer-content {
218
+ box-shadow: none;
219
+ }
219
220
 
220
221
  .navdrawer-content {
221
- border-right: 0;
222
- border-left: $navdrawer-border-width solid $navdrawer-border-color;
222
+ max-width: none;
223
+ position: absolute;
224
+ transform: translate3d(0, 0, 0);
225
+ width: 100%;
223
226
  }
224
227
  }
225
228
 
226
- .navdrawer-content {
227
- border-right: $navdrawer-border-width solid $navdrawer-border-color;
228
- box-shadow: none;
229
- max-width: none;
230
- position: absolute;
231
- width: 100%;
232
- }
233
- }
229
+ .navdrawer-persistent#{$infix} {
230
+ right: auto;
231
+ width: $navdrawer-width;
234
232
 
235
- .navdrawer-backdrop-persistent {
236
- display: none;
237
- }
233
+ &.navdrawer-persistent-clipped {
234
+ border-top: $navdrawer-border-width solid $navdrawer-border-color;
235
+ margin-top: ($navdrawer-border-width * -1);
236
+ top: $toolbar-height;
237
+ z-index: (map-get($toolbar-elevation-shadow, elevation) - 1);
238
+ }
238
239
 
239
- .navdrawer-persistent-clipped {
240
- border-top: $navdrawer-border-width solid $navdrawer-border-color;
241
- margin-top: ($navdrawer-border-width * -1);
242
- top: $toolbar-height;
243
- z-index: (map-get($toolbar-elevation-shadow, elevation) - 1);
244
- }
245
- }
240
+ &.navdrawer-right {
241
+ right: 0;
242
+ left: auto;
246
243
 
247
- // Temporary
244
+ .navdrawer-content {
245
+ border-right: 0;
246
+ border-left: $navdrawer-border-width solid $navdrawer-border-color;
247
+ }
248
+ }
248
249
 
249
- @include media-breakpoint-up(lg) {
250
- .navdrawer-temporary {
251
- overflow: visible;
252
- right: auto;
253
- width: $navdrawer-width;
250
+ &.show .navdrawer-content {
251
+ box-shadow: none;
252
+ }
254
253
 
255
- &.navdrawer-right {
256
- right: 0;
257
- left: auto;
254
+ .navdrawer-content {
255
+ border-right: $navdrawer-border-width solid $navdrawer-border-color;
256
+ max-width: none;
257
+ position: absolute;
258
+ width: 100%;
259
+ }
258
260
  }
259
261
 
260
- .navdrawer-content {
261
- max-width: none;
262
- position: absolute;
263
- width: 100%;
264
- }
265
- }
262
+ .navdrawer-temporary#{$infix} {
263
+ overflow: visible;
264
+ right: auto;
265
+ width: $navdrawer-width;
266
266
 
267
- .navdrawer-backdrop-temporary {
268
- display: none;
267
+ &.navdrawer-right {
268
+ right: 0;
269
+ left: auto;
270
+ }
271
+
272
+ .navdrawer-content {
273
+ max-width: none;
274
+ position: absolute;
275
+ width: 100%;
276
+ }
277
+ }
269
278
  }
270
279
  }
@@ -1,5 +1,3 @@
1
- // Todo: landscape picker
2
-
3
1
  .picker {
4
2
  position: absolute;
5
3
  user-select: none;
@@ -101,6 +99,11 @@
101
99
  transform: scale(0.87);
102
100
  vertical-align: middle;
103
101
 
102
+ @media (orientation: landscape) {
103
+ display: inline-flex;
104
+ max-width: none;
105
+ }
106
+
104
107
  .picker-opened & {
105
108
  transform: scale(1);
106
109
  }
@@ -113,6 +116,11 @@
113
116
  justify-content: flex-end;
114
117
  padding: $picker-inner-spacer-y $picker-inner-spacer-x;
115
118
 
119
+ @media (orientation: landscape) {
120
+ padding-right: ($picker-inner-spacer-x * 1.5);
121
+ padding-left: ($picker-inner-spacer-x * 1.5);
122
+ }
123
+
116
124
  button {
117
125
  flex: 0 1 auto;
118
126
  margin-left: $picker-inner-spacer-x;
@@ -133,6 +141,12 @@
133
141
  margin-left: $picker-inner-spacer-x;
134
142
  position: relative;
135
143
  vertical-align: middle;
144
+
145
+ @media (orientation: landscape) {
146
+ margin-top: $picker-inner-spacer-y;
147
+ margin-right: ($picker-inner-spacer-x * 1.5);
148
+ margin-left: ($picker-inner-spacer-x * 1.5);
149
+ }
136
150
  }
137
151
 
138
152
  .picker-month,
@@ -184,6 +198,11 @@
184
198
  background-color: $picker-header-bg;
185
199
  color: color-yiq($picker-header-bg);
186
200
  padding: $picker-header-padding-y $picker-header-padding-x;
201
+
202
+ @media (orientation: landscape) {
203
+ min-width: ($picker-cell-size * 3.5 + $picker-inner-spacer-x * 2);
204
+ white-space: nowrap;
205
+ }
187
206
  }
188
207
 
189
208
  .picker-date-display-bottom {
@@ -198,6 +217,11 @@
198
217
  .picker-weekday-display {
199
218
  margin-right: $picker-inner-spacer-x;
200
219
 
220
+ @media (orientation: landscape) {
221
+ display: block;
222
+ margin-right: 0;
223
+ }
224
+
201
225
  &::after {
202
226
  content: ',';
203
227
  }
@@ -214,6 +238,11 @@
214
238
  vertical-align: middle;
215
239
  width: $picker-cell-size;
216
240
 
241
+ @media (orientation: landscape) {
242
+ margin-right: ($picker-inner-spacer-x / 2);
243
+ margin-left: ($picker-inner-spacer-x / 2);
244
+ }
245
+
217
246
  &.picker-day-selected {
218
247
  background-color: $picker-day-bg-selected;
219
248
  color: color-yiq($picker-day-bg-selected);
@@ -259,11 +288,41 @@
259
288
  width: $picker-cell-size;
260
289
  }
261
290
 
262
- // .picker-select-month,
263
- // .picker-select-year {
264
- // // @extend .form-control;
265
- // // @extend .form-control-sm;
266
- // display: inline-block !important;
267
- // margin: 0 $spacer-sm !important;
268
- // width: auto !important;
269
- // }
291
+ .picker-select-month,
292
+ .picker-select-year {
293
+ @include border-radius($picker-select-border-radius);
294
+ @include transition-standard(opacity);
295
+
296
+ appearance: none;
297
+ background-clip: padding-box;
298
+ background-color: $picker-select-bg;
299
+ background-image: none;
300
+ background-position: 100% 50%;
301
+ background-size: auto 100%;
302
+ border: 0;
303
+ box-shadow: none;
304
+ color: $textfield-color;
305
+ display: inline-block;
306
+ font-size: inherit;
307
+ height: ($picker-cell-size / 2);
308
+ line-height: ($picker-cell-size / 2);
309
+ opacity: $picker-select-opacity;
310
+ padding: 0 ($picker-cell-size / 2) 0 $picker-inner-spacer-x;
311
+
312
+ @include focus-hover {
313
+ opacity: 1;
314
+ }
315
+
316
+ @include media-moz-webkit {
317
+ background-image: $caret-bg;
318
+ background-repeat: no-repeat;
319
+ }
320
+
321
+ &:focus {
322
+ outline: 0;
323
+ }
324
+ }
325
+
326
+ .picker-select-month {
327
+ margin-left: $picker-inner-spacer-x;
328
+ }
@@ -129,15 +129,15 @@
129
129
  .progress-circular-#{$color} {
130
130
  .progress-circular-gap,
131
131
  .progress-circular-spinner {
132
- border-top-color: map-get(theme-color($color), color);
132
+ border-top-color: theme-color($color);
133
133
  }
134
134
 
135
135
  .progress-circular-left .progress-circular-spinner {
136
- border-left-color: map-get(theme-color($color), color);
136
+ border-left-color: theme-color($color);
137
137
  }
138
138
 
139
139
  .progress-circular-right .progress-circular-spinner {
140
- border-right-color: map-get(theme-color($color), color);
140
+ border-right-color: theme-color($color);
141
141
  }
142
142
  }
143
143
  }