material-sass 4.0.0.alpha5 → 4.0.0.alpha6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/material/addons-materialise/textarea-autosize.js +7 -5
  3. data/app/assets/javascripts/material/addons-materialise/wave.js +11 -8
  4. data/app/assets/javascripts/material/src/floating-label.js +5 -5
  5. data/app/assets/javascripts/material/src/navdrawer.js +7 -7
  6. data/app/assets/javascripts/material/src/tab-switch.js +15 -18
  7. data/app/assets/javascripts/material/src/util.js +1 -1
  8. data/app/assets/javascripts/material.js +24 -27
  9. data/app/assets/stylesheets/material/_mixins.scss +2 -0
  10. data/app/assets/stylesheets/material/_utilities.scss +3 -0
  11. data/app/assets/stylesheets/material/_variables.scss +24 -2
  12. data/app/assets/stylesheets/material/base/_base.scss +5 -482
  13. data/app/assets/stylesheets/material/base/_grid.scss +11 -0
  14. data/app/assets/stylesheets/material/base/_normalize.scss +253 -0
  15. data/app/assets/stylesheets/material/base/_reboot.scss +239 -0
  16. data/app/assets/stylesheets/material/base/_typography.scss +0 -10
  17. data/app/assets/stylesheets/material/bootstrap/_alert.scss +0 -1
  18. data/app/assets/stylesheets/material/bootstrap/_breadcrumb.scss +15 -10
  19. data/app/assets/stylesheets/material/bootstrap/_button-group.scss +21 -42
  20. data/app/assets/stylesheets/material/bootstrap/_carousel.scss +81 -126
  21. data/app/assets/stylesheets/material/bootstrap/_close.scss +1 -4
  22. data/app/assets/stylesheets/material/bootstrap/_custom-form.scss +14 -16
  23. data/app/assets/stylesheets/material/bootstrap/_form.scss +95 -52
  24. data/app/assets/stylesheets/material/bootstrap/_media.scss +6 -67
  25. data/app/assets/stylesheets/material/bootstrap/_nav.scss +23 -45
  26. data/app/assets/stylesheets/material/bootstrap/_pagination.scss +4 -14
  27. data/app/assets/stylesheets/material/bootstrap/_popover.scss +7 -5
  28. data/app/assets/stylesheets/material/bootstrap/_responsive-embed.scss +18 -5
  29. data/app/assets/stylesheets/material/bootstrap/{_animation.scss → _transition.scss} +11 -2
  30. data/app/assets/stylesheets/material/material/_card.scss +185 -123
  31. data/app/assets/stylesheets/material/material/_chip.scss +12 -12
  32. data/app/assets/stylesheets/material/material/_data-table.scss +0 -2
  33. data/app/assets/stylesheets/material/material/_dialog.scss +23 -17
  34. data/app/assets/stylesheets/material/material/_expansion-panel.scss +42 -183
  35. data/app/assets/stylesheets/material/material/_menu.scss +19 -4
  36. data/app/assets/stylesheets/material/material/_navdrawer.scss +16 -12
  37. data/app/assets/stylesheets/material/material/_progress-circular.scss +2 -2
  38. data/app/assets/stylesheets/material/material/_progress.scss +68 -92
  39. data/app/assets/stylesheets/material/material/_selection-control.scss +11 -28
  40. data/app/assets/stylesheets/material/material/_tab.scss +52 -117
  41. data/app/assets/stylesheets/material/material/_text-field-floating-label.scss +9 -4
  42. data/app/assets/stylesheets/material/material/_text-field-input-group.scss +37 -35
  43. data/app/assets/stylesheets/material/material/_text-field.scss +41 -32
  44. data/app/assets/stylesheets/material/material/_toolbar.scss +192 -306
  45. data/app/assets/stylesheets/material/material/_tooltip.scss +19 -20
  46. data/app/assets/stylesheets/material/material.scss +2 -2
  47. data/app/assets/stylesheets/material/mixins/_border-radius.scss +9 -19
  48. data/app/assets/stylesheets/material/mixins/_breakpoint.scss +11 -3
  49. data/app/assets/stylesheets/material/mixins/_form.scss +15 -30
  50. data/app/assets/stylesheets/material/mixins/_grid-framework.scss +58 -0
  51. data/app/assets/stylesheets/material/mixins/_grid.scss +6 -78
  52. data/app/assets/stylesheets/material/mixins/_transform.scss +9 -0
  53. data/app/assets/stylesheets/material/utilities/_border.scss +31 -5
  54. data/app/assets/stylesheets/material/utilities/_display.scss +37 -8
  55. data/app/assets/stylesheets/material/utilities/_flex.scss +140 -0
  56. data/app/assets/stylesheets/material/utilities/_float.scss +5 -3
  57. data/app/assets/stylesheets/material/utilities/_position.scss +24 -0
  58. data/app/assets/stylesheets/material/utilities/_sizing.scss +16 -0
  59. data/app/assets/stylesheets/material/utilities/_spacing.scss +56 -46
  60. data/app/assets/stylesheets/material/utilities/_text.scss +5 -3
  61. data/app/assets/stylesheets/material/variables/_grid.scss +16 -10
  62. data/app/assets/stylesheets/material/variables/_spacer.scss +22 -3
  63. data/app/assets/stylesheets/material/variables/_typography.scss +2 -0
  64. data/app/assets/stylesheets/material/variables/_variable-bootstrap.scss +24 -17
  65. data/app/assets/stylesheets/material/variables/_variable-material.scss +47 -52
  66. data/lib/material-sass/version.rb +1 -1
  67. metadata +9 -2
@@ -1,4 +1,3 @@
1
- .custom-select,
2
1
  .form-control {
3
2
  background-clip: padding-box;
4
3
  background-color: transparent;
@@ -9,9 +8,8 @@
9
8
  box-shadow: none;
10
9
  color: inherit;
11
10
  display: block;
12
- font-weight: $font-weight-regular;
13
11
  width: 100%;
14
- @include form-control-size($textfield-border-width, $textfield-font-size, $textfield-height, $textfield-line-height, $textfield-margin-bottom, $textfield-padding-top);
12
+ @include form-control-size($textfield-border-width, $textfield-font-size, $textfield-height, $textfield-padding-top, $textfield-padding-bottom);
15
13
  @include transition-standard(border-bottom-color);
16
14
 
17
15
  &::-ms-expand {
@@ -42,36 +40,34 @@
42
40
  &:disabled {
43
41
  cursor: $cursor-disabled;
44
42
  }
45
-
46
- @include media-breakpoint-up(sm) {
47
- .form-inline & {
48
- display: inline-block;
49
- vertical-align: middle;
50
- width: auto;
51
- }
52
- }
53
43
  }
54
44
 
55
- .custom-select,
56
45
  select.form-control {
57
46
  -webkit-appearance: none;
58
47
  -moz-appearance: none;
59
48
 
60
49
  @media screen and (-webkit-min-device-pixel-ratio: 0), (min--moz-device-pixel-ratio: 0) {
50
+ $select-bg-size: (($material-icon-size / $font-size-root * 1rem / $textfield-font-size) * $textfield-font-size);
51
+
61
52
  background-image: url($caret-bg);
62
- background-position: 100% ($textfield-padding-top + ($textfield-line-height - $material-icon-size / $font-size-root) / 2);
53
+ background-position: 100% ($textfield-height / 2 - $select-bg-size / 2);
63
54
  background-repeat: no-repeat;
64
- background-size: $material-icon-size;
65
- padding-right: ($spacer-xs-x + $material-icon-size / $font-size-root);
55
+ background-size: $select-bg-size $select-bg-size;
56
+ padding-right: $select-bg-size;
66
57
 
67
58
  &[multiple],
68
59
  &[size] {
69
60
  background-image: none;
61
+ height: auto;
70
62
  padding-right: 0;
71
63
  }
72
64
  }
73
65
  }
74
66
 
67
+ textarea.form-control {
68
+ height: auto;
69
+ }
70
+
75
71
  // colour
76
72
  @each $color in $palettes {
77
73
  $i: index($palettes, $color);
@@ -81,31 +77,39 @@ select.form-control {
81
77
  &:focus {
82
78
  border-bottom-color: nth($palettes-color, $i);
83
79
  }
80
+
81
+ &::placeholder {
82
+ color: nth($palettes-color-light, $i);
83
+ }
84
84
  }
85
85
  }
86
86
 
87
87
  // size
88
- .custom-select-lg,
89
88
  .form-control-lg {
90
- @include form-control-size($textfield-border-width, $textfield-font-size-lg, $textfield-height-lg, $textfield-line-height-lg, $textfield-margin-bottom-lg, $textfield-padding-top-lg);
89
+ @include form-control-size($textfield-border-width, $textfield-font-size-lg, $textfield-height-lg, $textfield-padding-top-lg, $textfield-padding-bottom-lg);
91
90
  }
92
91
 
93
- .custom-select-lg,
94
92
  select.form-control-lg {
95
93
  @media screen and (-webkit-min-device-pixel-ratio: 0), (min--moz-device-pixel-ratio: 0) {
96
- background-position: 100% ($textfield-padding-top-lg + ($textfield-line-height-lg - $material-icon-size / $font-size-root) / 2);
94
+ $select-bg-size-lg: (($material-icon-size / $font-size-root * 1rem / $textfield-font-size) * $textfield-font-size-lg);
95
+
96
+ background-position: 100% ($textfield-height-lg / 2 - $select-bg-size-lg / 2);
97
+ background-size: $select-bg-size-lg $select-bg-size-lg;
98
+ padding-right: $select-bg-size-lg;
97
99
  }
98
100
  }
99
101
 
100
- .custom-select-sm,
101
102
  .form-control-sm {
102
- @include form-control-size($textfield-border-width, $textfield-font-size-sm, $textfield-height-sm, $textfield-line-height-sm, $textfield-margin-bottom-sm, $textfield-padding-top-sm);
103
+ @include form-control-size($textfield-border-width, $textfield-font-size-sm, $textfield-height-sm, $textfield-padding-top-sm, $textfield-padding-bottom-sm);
103
104
  }
104
105
 
105
- .custom-select-sm,
106
106
  select.form-control-sm {
107
107
  @media screen and (-webkit-min-device-pixel-ratio: 0), (min--moz-device-pixel-ratio: 0) {
108
- background-position: 100% ($textfield-padding-top-sm + ($textfield-line-height-sm - $material-icon-size / $font-size-root) / 2);
108
+ $select-bg-size-sm: (($material-icon-size / $font-size-root * 1rem / $textfield-font-size) * $textfield-font-size-sm);
109
+
110
+ background-position: 100% ($textfield-height-sm / 2 - $select-bg-size-sm / 2);
111
+ background-size: $select-bg-size-sm $select-bg-size-sm;
112
+ padding-right: $select-bg-size-sm;
109
113
  }
110
114
  }
111
115
 
@@ -161,19 +165,24 @@ select.form-control {
161
165
  // form control static
162
166
  //
163
167
  .form-control-static {
164
- @include form-control-size(0px, $textfield-font-size, $textfield-height, $textfield-line-height, $textfield-margin-bottom, $textfield-padding-top);
165
-
166
- @include media-breakpoint-up(sm) {
167
- .form-inline & {
168
- display: inline-block;
169
- }
170
- }
168
+ margin-bottom: 0;
169
+ @include form-control-size(0px, $textfield-font-size, $textfield-height, $textfield-padding-top, $textfield-padding-bottom);
171
170
 
172
171
  &.form-control-lg {
173
- @include form-control-size(0px, $textfield-font-size-lg, $textfield-height-lg, $textfield-line-height-lg, $textfield-margin-bottom-lg, $textfield-padding-top-lg);
172
+ @include form-control-size(0px, $textfield-font-size-lg, $textfield-height-lg, $textfield-padding-top-lg, $textfield-padding-bottom-lg);
174
173
  }
175
174
 
176
175
  &.form-control-sm {
177
- @include form-control-size(0px, $textfield-font-size-sm, $textfield-height-sm, $textfield-line-height-sm, $textfield-margin-bottom-sm, $textfield-padding-top-sm);
176
+ @include form-control-size(0px, $textfield-font-size-sm, $textfield-height-sm, $textfield-padding-top-sm, $textfield-padding-bottom-sm);
178
177
  }
179
178
  }
179
+
180
+ //
181
+ // style of material `select` should also be applied to `.custom-select`
182
+ //
183
+ .custom-select {
184
+ @extend .form-control;
185
+ display: inline-block;
186
+ vertical-align: middle;
187
+ width: auto;
188
+ }