angular / material

Material design for AngularJS
https://material.angularjs.org/
MIT License
16.55k stars 3.39k forks source link

select: the height of a disabled md-select is 1px less than a not disabled md-select #10718

Open leibale opened 7 years ago

leibale commented 7 years ago

If you find this issue on google and angular material didn't solved it yet, you can temporarily use the css from the codepen (only three lines) for now..

--

Actual Behavior:

CodePen (or steps to reproduce the issue):

AngularJS Versions:

mckenzielong commented 7 years ago

Work around:

 md-select[disabled] .md-select-value {
  bottom: -1px;
} 

margin-bottom is not doing what was expected: https://github.com/angular/material/blob/master/src/components/select/select.scss#L123

leibale commented 7 years ago

@mckenzielong why bottom: -1px is better than padding-bottom: 2px (as i did in the codepen)?

mckenzielong commented 7 years ago

@leibale actually it seems bottom: -2px; padding-bottom:0; gives the best result: https://codepen.io/mckenzielong/pen/VWYMyv

leibale commented 7 years ago

@mckenzielong what is the difference between the solutions (padding-bottom: 2px and bottom: -2px; padding-bottom: 0;)?

mckenzielong commented 7 years ago

Look at the spacing between the red lines and the label text in the pen I posted. padding-bottom: 2px is not aligned. The dotted line for padding-bottom: 2px is also not perfectly aligned.

leibale commented 7 years ago

Oh, you right.. :)

I'm Trying to use box-sizing: border-box; to solve the problem

Splaktar commented 3 years ago

We did a lot of work in 1.2.0 to better synchronize things like this, but it looks like there may still be an issue here.

I've updated the CodePen to 1.2.1.