Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

Conversation

@Splaktar
Copy link
Contributor

PR Checklist

Please check that your PR fulfills the following requirements:

  • The commit message follows our guidelines
  • Tests for the changes have been added or this is not a bug fix / enhancement
  • Docs have been added, updated, or were not required

PR Type

What kind of change does this PR introduce?

[x] Bugfix
[ ] Enhancement
[ ] Documentation content changes
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Infrastructure changes
[ ] Other... Please describe:

What is the current behavior?

  • md-select's height changes when disabled

Issue Number:
Fixes #11812

What is the new behavior?

  • md-select's height no longer changes when disabled
  • use the same approach for md-select's disabled border background-position as md-input
  • md-select inside of an md-input-container uses more md-input SCSS variables
    • this allows it to better match the layout and dimensions of other md-input-container elements
  • add new $select-border-width-default SCSS variable

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

This change should not break any apps, but it may allow them to remove some CSS hacks to fix the previous issue with the selects loosing 1px of height when disabled. If there are screenshot tests involved, they may fail for disabled inputs due to the 1px change in position, but this new position should be the correct position and matches the non-disabled position.

We'll try this out in an RC and determine if this will be problematic for production apps or not. If it turns out to be, we'll revert this and push it to 1.2.0.

- use the same approach for `md-select`'s disabled border background-position as `md-input`
- `md-select` inside of an `md-input-container` uses more `md-input` SCSS variables
  - this allows it to better match the layout and dimensions of other `md-input-container` elements
- add new `$select-border-width-default` SCSS variable

Fixes #11812
@googlebot googlebot added the cla: yes PR author has signed Google's CLA: https://opensource.google.com/docs/cla/ label Apr 11, 2020
@Splaktar Splaktar self-assigned this Apr 11, 2020
@Splaktar Splaktar added this to the 1.1.23 milestone Apr 11, 2020
@Splaktar Splaktar added P2: required Issues that must be fixed. type: bug labels Apr 11, 2020
@Splaktar Splaktar requested a review from mmalerba April 11, 2020 06:26
@Splaktar Splaktar added the pr: merge ready This PR is ready for a caretaker to review label Apr 11, 2020
Copy link
Contributor

@mmalerba mmalerba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Splaktar Splaktar added the pr: lgtm This PR has been approved by the reviewer label Apr 30, 2020
@Splaktar Splaktar merged commit e2af2a3 into master Apr 30, 2020
@Splaktar Splaktar deleted the select-height-change-on-disable branch April 30, 2020 21:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla: yes PR author has signed Google's CLA: https://opensource.google.com/docs/cla/ P2: required Issues that must be fixed. pr: lgtm This PR has been approved by the reviewer pr: merge ready This PR is ready for a caretaker to review type: bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

select: disabling fields adds a -1px margin, which causes page to jump around if there are multiple select fields being disabled

3 participants