material-sass 4.0.0.alpha6 → 4.0.0.beta

Sign up to get free protection for your applications and to get access to all the features.
Files changed (119) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/README.md +36 -8
  4. data/Rakefile +16 -3
  5. data/app/assets/javascripts/material-sprockets.js +6 -1
  6. data/app/assets/javascripts/material.js +654 -417
  7. data/app/assets/javascripts/material.min.js +1 -0
  8. data/app/assets/javascripts/material/addons/picker.date.js +234 -0
  9. data/app/assets/javascripts/material/addons/picker.js +172 -0
  10. data/app/assets/javascripts/material/addons/textarea-autosize.js +20 -2
  11. data/app/assets/javascripts/material/addons/waves.js +127 -0
  12. data/app/assets/javascripts/material/components/floating-label.js +92 -0
  13. data/app/assets/javascripts/material/components/navdrawer.js +353 -0
  14. data/app/assets/javascripts/material/components/selection-control-focus.js +47 -0
  15. data/app/assets/javascripts/material/components/tab-switch.js +148 -0
  16. data/app/assets/javascripts/material/components/util.js +133 -0
  17. data/app/assets/javascripts/material/initializers/picker.js +171 -0
  18. data/app/assets/javascripts/material/initializers/textarea-autosize.js +10 -0
  19. data/app/assets/javascripts/material/initializers/waves.js +13 -0
  20. data/app/assets/stylesheets/material/_colours.scss +324 -0
  21. data/app/assets/stylesheets/material/_functions.scss +65 -0
  22. data/app/assets/stylesheets/material/_mixins.scss +23 -23
  23. data/app/assets/stylesheets/material/_print.scss +102 -0
  24. data/app/assets/stylesheets/material/_utilities.scss +21 -17
  25. data/app/assets/stylesheets/material/_variables.scss +13 -42
  26. data/app/assets/stylesheets/material/base/_base.scss +420 -5
  27. data/app/assets/stylesheets/material/base/_grid.scss +34 -33
  28. data/app/assets/stylesheets/material/base/_typography.scss +165 -174
  29. data/app/assets/stylesheets/material/bootstrap/_alert.scss +32 -39
  30. data/app/assets/stylesheets/material/bootstrap/_badge.scss +34 -0
  31. data/app/assets/stylesheets/material/bootstrap/_breadcrumb.scss +18 -18
  32. data/app/assets/stylesheets/material/bootstrap/_carousel.scss +127 -142
  33. data/app/assets/stylesheets/material/bootstrap/_close.scss +18 -19
  34. data/app/assets/stylesheets/material/bootstrap/_code.scss +10 -7
  35. data/app/assets/stylesheets/material/bootstrap/_custom-form.scss +50 -56
  36. data/app/assets/stylesheets/material/bootstrap/_form.scss +159 -129
  37. data/app/assets/stylesheets/material/bootstrap/_image.scss +19 -16
  38. data/app/assets/stylesheets/material/bootstrap/_jumbotron.scss +10 -7
  39. data/app/assets/stylesheets/material/bootstrap/_nav.scss +71 -69
  40. data/app/assets/stylesheets/material/bootstrap/_pagination.scss +34 -26
  41. data/app/assets/stylesheets/material/bootstrap/_popover.scss +26 -59
  42. data/app/assets/stylesheets/material/bootstrap/_responsive-embed.scss +4 -4
  43. data/app/assets/stylesheets/material/bootstrap/_transition.scss +10 -8
  44. data/app/assets/stylesheets/material/material.scss +75 -62
  45. data/app/assets/stylesheets/material/material/_button-flat.scss +26 -39
  46. data/app/assets/stylesheets/material/material/_button-float.scss +10 -14
  47. data/app/assets/stylesheets/material/material/_button-group.scss +268 -0
  48. data/app/assets/stylesheets/material/material/_button.scss +133 -189
  49. data/app/assets/stylesheets/material/material/_card.scss +300 -248
  50. data/app/assets/stylesheets/material/material/_chip.scss +65 -64
  51. data/app/assets/stylesheets/material/material/_data-table.scss +135 -45
  52. data/app/assets/stylesheets/material/material/_dialog.scss +141 -110
  53. data/app/assets/stylesheets/material/material/_expansion-panel.scss +86 -119
  54. data/app/assets/stylesheets/material/material/_menu.scss +308 -228
  55. data/app/assets/stylesheets/material/material/_navdrawer.scss +239 -234
  56. data/app/assets/stylesheets/material/material/_picker.scss +157 -155
  57. data/app/assets/stylesheets/material/material/_progress-circular.scss +80 -80
  58. data/app/assets/stylesheets/material/material/_progress.scss +180 -115
  59. data/app/assets/stylesheets/material/material/_selection-control.scss +132 -139
  60. data/app/assets/stylesheets/material/material/_stepper.scss +94 -93
  61. data/app/assets/stylesheets/material/material/_tab.scss +74 -93
  62. data/app/assets/stylesheets/material/material/_text-field-floating-label.scss +29 -20
  63. data/app/assets/stylesheets/material/material/_text-field-input-group.scss +94 -24
  64. data/app/assets/stylesheets/material/material/_text-field-textarea.scss +13 -26
  65. data/app/assets/stylesheets/material/material/_text-field.scss +127 -118
  66. data/app/assets/stylesheets/material/material/_toolbar.scss +308 -313
  67. data/app/assets/stylesheets/material/material/_tooltip.scss +23 -62
  68. data/app/assets/stylesheets/material/mixins/_background-variant.scss +6 -6
  69. data/app/assets/stylesheets/material/mixins/_border-radius.scss +17 -17
  70. data/app/assets/stylesheets/material/mixins/_breakpoint.scss +32 -2
  71. data/app/assets/stylesheets/material/mixins/_clearfix.scss +1 -1
  72. data/app/assets/stylesheets/material/mixins/_form.scss +62 -25
  73. data/app/assets/stylesheets/material/mixins/_grid-framework.scss +8 -16
  74. data/app/assets/stylesheets/material/mixins/_grid.scss +40 -64
  75. data/app/assets/stylesheets/material/mixins/_material-icons.scss +36 -0
  76. data/app/assets/stylesheets/material/mixins/_nav-divider.scss +1 -1
  77. data/app/assets/stylesheets/material/mixins/_reset-text.scss +2 -21
  78. data/app/assets/stylesheets/material/mixins/_screenreader.scss +14 -12
  79. data/app/assets/stylesheets/material/mixins/_text-alignment.scss +23 -0
  80. data/app/assets/stylesheets/material/mixins/_text-emphasis.scss +6 -6
  81. data/app/assets/stylesheets/material/mixins/_transition.scss +42 -10
  82. data/app/assets/stylesheets/material/utilities/_background.scss +18 -18
  83. data/app/assets/stylesheets/material/utilities/_border.scss +88 -41
  84. data/app/assets/stylesheets/material/utilities/_display.scss +63 -30
  85. data/app/assets/stylesheets/material/utilities/_flex.scss +139 -134
  86. data/app/assets/stylesheets/material/utilities/_material-icons.scss +3 -5
  87. data/app/assets/stylesheets/material/utilities/_position.scss +19 -22
  88. data/app/assets/stylesheets/material/utilities/_sizing.scss +11 -12
  89. data/app/assets/stylesheets/material/utilities/_spacing.scss +51 -56
  90. data/app/assets/stylesheets/material/utilities/_text.scss +80 -75
  91. data/app/assets/stylesheets/material/utilities/_visibility.scss +5 -46
  92. data/app/assets/stylesheets/material/utilities/_waves.scss +11 -18
  93. data/app/assets/stylesheets/material/variables/_elevation-shadow.scss +89 -82
  94. data/app/assets/stylesheets/material/variables/_grid.scss +29 -26
  95. data/app/assets/stylesheets/material/variables/_palette.scss +45 -0
  96. data/app/assets/stylesheets/material/variables/_spacer.scss +34 -88
  97. data/app/assets/stylesheets/material/variables/_transition.scss +29 -0
  98. data/app/assets/stylesheets/material/variables/_typography.scss +88 -74
  99. data/app/assets/stylesheets/material/variables/_variable-bootstrap.scss +196 -133
  100. data/app/assets/stylesheets/material/variables/_variable-material.scss +481 -429
  101. data/lib/material-sass/version.rb +1 -1
  102. data/material-sass.gemspec +3 -3
  103. metadata +26 -21
  104. data/app/assets/javascripts/material/addons-materialise/pickadate.js +0 -139
  105. data/app/assets/javascripts/material/addons-materialise/textarea-autosize.js +0 -11
  106. data/app/assets/javascripts/material/addons-materialise/wave.js +0 -15
  107. data/app/assets/javascripts/material/addons/pickadate.js +0 -7
  108. data/app/assets/javascripts/material/addons/wave.js +0 -5
  109. data/app/assets/javascripts/material/src/floating-label.js +0 -91
  110. data/app/assets/javascripts/material/src/navdrawer.js +0 -352
  111. data/app/assets/javascripts/material/src/tab-switch.js +0 -133
  112. data/app/assets/javascripts/material/src/util.js +0 -138
  113. data/app/assets/stylesheets/material/base/_normalize.scss +0 -253
  114. data/app/assets/stylesheets/material/base/_reboot.scss +0 -239
  115. data/app/assets/stylesheets/material/bootstrap/_button-group.scss +0 -134
  116. data/app/assets/stylesheets/material/mixins/_tab-focus.scss +0 -5
  117. data/app/assets/stylesheets/material/mixins/_transform.scss +0 -9
  118. data/app/assets/stylesheets/material/variables/_animation.scss +0 -22
  119. data/app/assets/stylesheets/material/variables/_colour.scss +0 -389
@@ -1,22 +1,26 @@
1
1
  .input-group {
2
+ align-items: center;
2
3
  display: flex;
3
4
  position: relative;
4
5
  width: 100%;
5
6
 
6
7
  .form-control {
7
- align-self: center;
8
8
  flex: 1 1 auto;
9
9
  width: 1%;
10
10
  }
11
11
  }
12
12
 
13
+
14
+
15
+ // Addon and button
16
+
13
17
  .input-group-addon {
14
18
  align-items: center;
15
19
  color: inherit;
16
20
  display: flex;
17
- font-size: ($material-icon-size / $font-size-root * 1rem / $textfield-font-size * $textfield-font-size);
21
+ font-size: $textfield-font-size;
18
22
  justify-content: center;
19
- line-height: 1;
23
+ line-height: $textfield-line-height;
20
24
  min-width: $textfield-height;
21
25
  white-space: nowrap;
22
26
 
@@ -27,6 +31,11 @@
27
31
  }
28
32
 
29
33
  .input-group-btn {
34
+ @include border-radius($btn-border-radius);
35
+
36
+ align-items: center;
37
+ background-color: $btn-group-bg;
38
+ box-shadow: map-get($btn-elevation-shadow, shadow);
30
39
  display: flex;
31
40
  justify-content: center;
32
41
  margin-right: $input-group-addon-margin-x;
@@ -40,39 +49,100 @@
40
49
  margin-right: 0;
41
50
  }
42
51
 
43
- .btn {
52
+ > .btn {
53
+ border-left: $btn-group-inner-spacer-x solid transparent;
54
+ box-shadow: none;
55
+ flex: 0 1 auto;
56
+ margin-left: ($btn-group-inner-spacer-x * -1);
44
57
  min-width: 0;
45
- @include border-radius(0);
58
+
59
+ &:active,
60
+ &.active {
61
+ box-shadow: none;
62
+ }
63
+
64
+ &:disabled,
65
+ &.disabled {
66
+ + .btn:disabled,
67
+ + .btn.disabled {
68
+ border-left-color: $btn-group-divider-bg;
69
+ }
70
+ }
46
71
 
47
72
  &:first-child {
48
- @include border-left-radius($border-radius);
73
+ border-left-width: 0;
74
+ margin-left: 0;
49
75
  }
50
76
 
51
- &:last-child {
52
- @include border-right-radius($border-radius);
77
+ &.active {
78
+ + .btn.active {
79
+ border-left-color: $btn-group-divider-bg;
80
+ }
53
81
  }
54
82
  }
55
- }
56
83
 
57
- // size
58
- .input-group-addon {
59
- &.form-control-lg,
60
- .input-group-lg > & {
61
- font-size: ($material-icon-size / $font-size-root * 1rem / $textfield-font-size * $textfield-font-size-lg);
62
- min-width: $textfield-height-lg;
63
- }
84
+ // Colour
85
+ @each $color, $values in $theme-colors {
86
+ > .btn-#{$color} {
87
+ &:disabled,
88
+ &.disabled {
89
+ @include color-yiq(map-get(theme-color($color), lighter));
64
90
 
65
- &.form-control-sm,
66
- .input-group-sm > & {
67
- font-size: ($material-icon-size / $font-size-root * 1rem / $textfield-font-size * $textfield-font-size-sm);
68
- min-width: $textfield-height-sm;
91
+ background-color: map-get(theme-color($color), lighter);
92
+ }
69
93
  }
70
94
  }
71
95
 
72
- .input-group-lg > .form-control {
73
- @extend .form-control-lg;
96
+ > .btn:first-child:not(:last-child):not(.dropdown-toggle) {
97
+ @include border-right-radius(0);
98
+ }
99
+
100
+ > .btn:last-child:not(:first-child),
101
+ > .dropdown-toggle:not(:first-child) {
102
+ @include border-left-radius(0);
103
+ }
104
+
105
+ > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {
106
+ border-radius: 0;
107
+ }
108
+
109
+ > .dropdown-toggle:not(:last-child):not(:nth-last-child(2)) {
110
+ @include border-right-radius(0);
111
+ }
112
+ }
113
+
114
+
115
+
116
+ // Size
117
+
118
+ .input-group-lg {
119
+ > .form-control {
120
+ @extend %form-control-lg;
121
+ }
122
+
123
+ > .input-group-addon {
124
+ font-size: $textfield-font-size-lg;
125
+ line-height: $textfield-line-height-lg;
126
+ min-width: $textfield-height-lg;
74
127
  }
75
128
 
76
- .input-group-sm > .form-control {
77
- @extend .form-control-sm;
129
+ > .input-group-btn > .btn {
130
+ @extend %btn-lg;
78
131
  }
132
+ }
133
+
134
+ .input-group-sm {
135
+ > .form-control {
136
+ @extend %form-control-sm;
137
+ }
138
+
139
+ > .input-group-addon {
140
+ font-size: $textfield-font-size-sm;
141
+ line-height: $textfield-line-height-sm;
142
+ min-width: $textfield-height-sm;
143
+ }
144
+
145
+ > .input-group-btn > .btn {
146
+ @extend %btn-sm;
147
+ }
148
+ }
@@ -1,31 +1,18 @@
1
- .textarea-autosize {
2
- height: $textfield-height;
3
- min-height: $textfield-height;
4
- resize: none;
1
+ textarea {
2
+ &.textarea-autosize {
3
+ height: $textfield-height;
4
+ min-height: $textfield-height;
5
+ resize: none;
5
6
 
6
- .floating-label > & {
7
- height: ($floating-label-height - $floating-label-padding-top);
8
- min-height: ($floating-label-height - $floating-label-padding-top);
9
- }
10
- }
11
-
12
- // size
13
- .form-control-lg.textarea-autosize {
14
- height: $textfield-height-lg;
15
- min-height: $textfield-height-lg;
16
-
17
- .floating-label > & {
18
- height: ($floating-label-height-lg - $floating-label-padding-top-lg);
19
- min-height: ($floating-label-height-lg - $floating-label-padding-top-lg);
7
+ // Size
8
+ &.form-control-lg {
9
+ height: $textfield-height-lg;
10
+ min-height: $textfield-height-lg;
20
11
  }
21
- }
22
-
23
- .form-control-sm.textarea-autosize {
24
- height: $textfield-height-sm;
25
- min-height: $textfield-height-sm;
26
12
 
27
- .floating-label > & {
28
- height: ($floating-label-height-sm - $floating-label-padding-top-sm);
29
- min-height: ($floating-label-height-sm - $floating-label-padding-top-sm);
13
+ &.form-control-sm {
14
+ height: $textfield-height-sm;
15
+ min-height: $textfield-height-sm;
30
16
  }
31
17
  }
18
+ }
@@ -1,16 +1,24 @@
1
- .form-control {
1
+ .form-control,
2
+ %form-control {
3
+ @include form-control-size($textfield-font-size, $textfield-height, $textfield-line-height, $textfield-padding-x, $textfield-padding-y);
4
+ @include transition-standard(border-color, box-shadow);
5
+
2
6
  background-clip: padding-box;
3
7
  background-color: transparent;
4
8
  background-image: none;
5
- border: 0;
6
- border-bottom: $textfield-border-width solid $textfield-border-color;
9
+ border-color: $textfield-border-color;
7
10
  border-radius: 0;
11
+ border-style: solid;
12
+ border-width: 0 0 $textfield-border-width;
8
13
  box-shadow: none;
9
- color: inherit;
14
+ color: $textfield-color;
10
15
  display: block;
11
16
  width: 100%;
12
- @include form-control-size($textfield-border-width, $textfield-font-size, $textfield-height, $textfield-padding-top, $textfield-padding-bottom);
13
- @include transition-standard(border-bottom-color);
17
+
18
+ @include hover {
19
+ border-color: $textfield-border-color-hover;
20
+ box-shadow: inset 0 ($textfield-border-width-hover * -1) 0 ($textfield-border-width * -1) $textfield-border-color-hover;
21
+ }
14
22
 
15
23
  &::-ms-expand {
16
24
  background-color: transparent;
@@ -22,76 +30,74 @@
22
30
  opacity: 1;
23
31
  }
24
32
 
25
- // active, focus, hover
26
- &:focus {
27
- border-bottom-color: $textfield-border-color-focus;
28
- border-bottom-width: ($textfield-border-width + 1);
29
- outline: 0;
30
- }
33
+ &:disabled,
34
+ &[readonly] {
35
+ border-style: dotted;
36
+ color: $textfield-color-disabled;
37
+ opacity: 1;
31
38
 
32
- // disbaled
33
- &:disabled,
34
- &[readonly] {
35
- border-bottom-style: dotted;
36
- color: $textfield-color-disabled;
37
- opacity: 1;
39
+ @include hover {
40
+ border-color: $textfield-border-color;
41
+ box-shadow: none;
38
42
  }
39
43
 
40
- &:disabled {
41
- cursor: $cursor-disabled;
44
+ &:focus {
45
+ border-color: $textfield-border-color;
46
+ box-shadow: none;
42
47
  }
43
- }
48
+ }
44
49
 
45
- select.form-control {
46
- -webkit-appearance: none;
47
- -moz-appearance: none;
50
+ &:focus {
51
+ border-color: $textfield-border-color-focus;
52
+ box-shadow: inset 0 ($textfield-border-width-focus * -1) 0 ($textfield-border-width * -1) $textfield-border-color-focus;
53
+ outline: 0;
54
+ }
48
55
 
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);
56
+ &:invalid:required {
57
+ outline: 0;
58
+ }
59
+ }
51
60
 
52
- background-image: url($caret-bg);
53
- background-position: 100% ($textfield-height / 2 - $select-bg-size / 2);
54
- background-repeat: no-repeat;
55
- background-size: $select-bg-size $select-bg-size;
56
- padding-right: $select-bg-size;
61
+ // Colour
62
+ @each $color, $values in $theme-colors {
63
+ .form-control-#{$color} {
64
+ border-color: map-get(theme-color($color), color);
57
65
 
58
- &[multiple],
59
- &[size] {
60
- background-image: none;
61
- height: auto;
62
- padding-right: 0;
66
+ @include focus-hover {
67
+ border-color: map-get(theme-color($color), color);
68
+ box-shadow: inset 0 ($textfield-border-width-focus * -1) 0 ($textfield-border-width * -1) map-get(theme-color($color), color);
63
69
  }
64
70
  }
65
71
  }
66
72
 
67
- textarea.form-control {
68
- height: auto;
73
+ // Size
74
+ .form-control-lg,
75
+ %form-control-lg {
76
+ @include form-control-size($textfield-font-size-lg, $textfield-height-lg, $textfield-line-height-lg, $textfield-padding-x-lg, $textfield-padding-y-lg);
69
77
  }
70
78
 
71
- // colour
72
- @each $color in $palettes {
73
- $i: index($palettes, $color);
79
+ .form-control-sm,
80
+ %form-control-sm {
81
+ @include form-control-size($textfield-font-size-sm, $textfield-height-sm, $textfield-line-height-sm, $textfield-padding-x-sm, $textfield-padding-y-sm);
82
+ }
74
83
 
75
- .form-control-#{$color} {
76
- &,
77
- &:focus {
78
- border-bottom-color: nth($palettes-color, $i);
79
- }
84
+ // Special treatment for select and textarea
85
+ %form-control-select {
86
+ appearance: none;
80
87
 
81
- &::placeholder {
82
- color: nth($palettes-color-light, $i);
83
- }
84
- }
85
- }
88
+ @include media-moz-webkit {
89
+ $select-bg-size: (($material-icon-size / $textfield-font-size) * $textfield-font-size);
86
90
 
87
- // size
88
- .form-control-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
+ background-image: $caret-bg;
92
+ background-position: 100% ($textfield-height / 2 - $select-bg-size / 2);
93
+ background-repeat: no-repeat;
94
+ background-size: $select-bg-size $select-bg-size;
95
+ padding-right: $select-bg-size;
90
96
  }
91
97
 
92
- select.form-control-lg {
93
- @media screen and (-webkit-min-device-pixel-ratio: 0), (min--moz-device-pixel-ratio: 0) {
94
- $select-bg-size-lg: (($material-icon-size / $font-size-root * 1rem / $textfield-font-size) * $textfield-font-size-lg);
98
+ &.form-control-lg {
99
+ @include media-moz-webkit {
100
+ $select-bg-size-lg: (($material-icon-size / $textfield-font-size) * $textfield-font-size-lg);
95
101
 
96
102
  background-position: 100% ($textfield-height-lg / 2 - $select-bg-size-lg / 2);
97
103
  background-size: $select-bg-size-lg $select-bg-size-lg;
@@ -99,90 +105,93 @@ textarea.form-control {
99
105
  }
100
106
  }
101
107
 
102
- .form-control-sm {
103
- @include form-control-size($textfield-border-width, $textfield-font-size-sm, $textfield-height-sm, $textfield-padding-top-sm, $textfield-padding-bottom-sm);
104
- }
105
-
106
- select.form-control-sm {
107
- @media screen and (-webkit-min-device-pixel-ratio: 0), (min--moz-device-pixel-ratio: 0) {
108
- $select-bg-size-sm: (($material-icon-size / $font-size-root * 1rem / $textfield-font-size) * $textfield-font-size-sm);
108
+ &.form-control-sm {
109
+ @include media-moz-webkit {
110
+ $select-bg-size-sm: (($material-icon-size / $textfield-font-size) * $textfield-font-size-sm);
109
111
 
110
112
  background-position: 100% ($textfield-height-sm / 2 - $select-bg-size-sm / 2);
111
113
  background-size: $select-bg-size-sm $select-bg-size-sm;
112
114
  padding-right: $select-bg-size-sm;
113
115
  }
114
116
  }
117
+ }
115
118
 
116
- input[type="color"],
117
- input[type="date"],
118
- input[type="datetime-local"],
119
- input[type="month"],
120
- input[type="time"],
121
- input[type="week"] {
122
- &.form-control {
123
- height: $textfield-height;
124
- }
119
+ %textfield-box {
120
+ border-radius: $textfield-box-border-radius;
121
+ border-width: $textfield-border-width;
122
+ height: auto;
123
+ padding: $textfield-box-padding-y $textfield-box-padding-x;
125
124
 
126
- &.form-control-lg {
127
- height: $textfield-height-lg;
128
- }
125
+ @include hover {
126
+ box-shadow: inset $textfield-border-width-hover $textfield-border-width-hover 0 ($textfield-border-width * -1) $textfield-border-color-hover, inset ($textfield-border-width-hover * -1) ($textfield-border-width-hover * -1) 0 ($textfield-border-width * -1) $textfield-border-color-hover;
127
+ }
129
128
 
130
- &.form-control-sm {
131
- height: $textfield-height-sm;
132
- }
129
+ &:focus {
130
+ box-shadow: inset $textfield-border-width-focus $textfield-border-width-focus 0 ($textfield-border-width * -1) $textfield-border-color-focus, inset ($textfield-border-width-focus * -1) ($textfield-border-width-focus * -1) 0 ($textfield-border-width * -1) $textfield-border-color-focus;
133
131
  }
134
132
 
135
- input[type="color"] {
136
- &.form-control {
137
- min-width: $textfield-font-size;
138
- }
133
+ &.form-control-lg {
134
+ padding: $textfield-box-padding-y-lg $textfield-box-padding-x-lg;
135
+ }
139
136
 
140
- &.form-control-lg {
141
- min-width: $textfield-font-size-lg;
137
+ &.form-control-sm {
138
+ padding: $textfield-box-padding-y-sm $textfield-box-padding-x-sm;
139
+ }
140
+ }
141
+
142
+ select {
143
+ &.form-control {
144
+ &:not([multiple]):not([size]) {
145
+ @extend %form-control-select;
142
146
  }
143
147
 
144
- &.form-control-sm {
145
- min-width: $textfield-font-size-sm;
148
+ &[multiple],
149
+ &[size] {
150
+ @extend %textfield-box;
146
151
  }
147
152
  }
153
+ }
148
154
 
149
- //
150
- // form control state
151
- //
152
- .has-danger {
153
- @include form-control-validation($palette-red-500);
155
+ textarea {
156
+ &.form-control:not(.textarea-autosize) {
157
+ @extend %textfield-box;
154
158
  }
159
+ }
155
160
 
156
- .has-success {
157
- @include form-control-validation($palette-green-500);
158
- }
159
161
 
160
- .has-warning {
161
- @include form-control-validation($palette-orange-500);
162
- }
163
162
 
164
- //
165
- // form control static
166
- //
167
- .form-control-static {
168
- margin-bottom: 0;
169
- @include form-control-size(0px, $textfield-font-size, $textfield-height, $textfield-padding-top, $textfield-padding-bottom);
163
+ // Form control static
170
164
 
171
- &.form-control-lg {
172
- @include form-control-size(0px, $textfield-font-size-lg, $textfield-height-lg, $textfield-padding-top-lg, $textfield-padding-bottom-lg);
173
- }
165
+ .form-control-plaintext {
166
+ @include form-control-size($textfield-font-size, $textfield-height, $textfield-line-height, $textfield-padding-x, $textfield-padding-y);
174
167
 
175
- &.form-control-sm {
176
- @include form-control-size(0px, $textfield-font-size-sm, $textfield-height-sm, $textfield-padding-top-sm, $textfield-padding-bottom-sm);
177
- }
168
+ border-color: transparent;
169
+
170
+ &.form-control-lg {
171
+ @include form-control-size($textfield-font-size-lg, $textfield-height-lg, $textfield-line-height-lg, $textfield-padding-x-lg, $textfield-padding-y-lg);
178
172
  }
179
173
 
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;
174
+ &.form-control-sm {
175
+ @include form-control-size($textfield-font-size-sm, $textfield-height-sm, $textfield-line-height-sm, $textfield-padding-x-sm, $textfield-padding-y-sm);
188
176
  }
177
+ }
178
+
179
+
180
+
181
+ // Form validation
182
+
183
+ @include form-control-validation($form-feedback-invalid-color, 'invalid');
184
+ @include form-control-validation($form-feedback-valid-color, 'valid');
185
+
186
+
187
+
188
+ // Style of Material design `select` should also be applied to `.custom-select`
189
+
190
+ .custom-select {
191
+ @extend %form-control;
192
+ @extend %form-control-select;
193
+
194
+ display: inline-block;
195
+ vertical-align: middle;
196
+ width: auto;
197
+ }