1
1
$select-checkbox-border-radius : 2px !default ;
2
2
$select-checkbox-border-width : 2px !default ;
3
+ $select-border-width-default : 1px !default ;
3
4
$select-checkbox-width : rem (1.4 ) !default ;
4
5
$select-option-height : 48px !default ;
5
6
$select-option-padding : 16px !default ;
@@ -115,12 +116,14 @@ md-select {
115
116
}
116
117
117
118
& [disabled ] .md-select-value {
118
- background-position : 0 bottom ;
119
+ // This background-position was taken from the styling of disabled md-inputs.
120
+ // The negative border width offsets the dotted "border" so it's placed in the same place as the
121
+ // solid one before it.
122
+ background-position : bottom $select-border-width-default * -1 left 0 ;
119
123
// This background-size is coordinated with a linear-gradient set in select-theme.scss
120
124
// to create a dotted line under the input.
121
125
background-size : 4px 1px ;
122
126
background-repeat : repeat-x ;
123
- margin-bottom : -1px ; // Shift downward so dotted line is positioned the same as other bottom borders
124
127
}
125
128
126
129
& :focus {
@@ -141,7 +144,7 @@ md-select {
141
144
}
142
145
& :focus {
143
146
.md-select-value {
144
- border-bottom-width : 2 px ;
147
+ border-bottom-width : $select-border-width-default + 1 px ;
145
148
border-bottom-style : solid ;
146
149
padding-bottom : 0 ;
147
150
}
@@ -154,18 +157,34 @@ md-select {
154
157
}
155
158
}
156
159
157
- // Fix value by 1px to align with standard text inputs (and spec)
158
- md-input-container .md-input-has-value .md-select-value {
159
- > span :not (.md-select-icon ) {
160
- transform : translate3d (0 , 1px , 0 );
160
+ md-input-container md-select {
161
+ & :not ([disabled ]) {
162
+ & :focus {
163
+ .md-select-value {
164
+ border-bottom-width : $input-border-width-focused ;
165
+ }
166
+ }
167
+ }
168
+ & [disabled ] {
169
+ .md-select-value {
170
+ // This background-position was taken from and matches the styling of disabled md-inputs.
171
+ // The negative border width offsets the dotted "border" so it's placed in the same place as
172
+ // the solid one before it.
173
+ background-position : bottom $input-border-width-default * -1 left 0 ;
174
+ }
175
+ }
176
+ .md-select-value {
177
+ min-height : ($input-line-height + $input-padding-top * 2 ) - $input-border-width-focused - $input-border-width-default * 2 ;
178
+ padding-bottom : $input-border-width-focused - $input-border-width-default ;
179
+ border-bottom-width : $input-border-width-default ;
161
180
}
162
181
}
163
182
164
183
.md-select-value {
165
184
display : flex ;
166
185
align-items : center ;
167
186
padding : 2px 2px 1px ;
168
- border-bottom-width : 1 px ;
187
+ border-bottom-width : $select-border-width-default ;
169
188
border-bottom-style : solid ;
170
189
background-color : rgba (0 ,0 ,0 ,0 );
171
190
position : relative ;
@@ -174,7 +193,6 @@ md-input-container.md-input-has-value .md-select-value {
174
193
min-height : 26px ;
175
194
flex-grow : 1 ;
176
195
177
-
178
196
> span :not (.md-select-icon ) {
179
197
max-width : 100% ;
180
198
flex : 1 1 auto ;
0 commit comments