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

md-select layout issue #6200

Closed
myagoo opened this issue Dec 9, 2015 · 7 comments
Closed

md-select layout issue #6200

myagoo opened this issue Dec 9, 2015 · 7 comments
Labels
g3: reported The issue was reported by an internal or external product team. P1: urgent Urgent issues that should be addressed in the next minor or patch release.

Comments

@myagoo
Copy link

myagoo commented Dec 9, 2015

Now md-select is able to use md-option's html as display value, this rule seems a little aggressive

.md-select-value *:first-child {
    flex: 1 0 auto;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    transform: translate3d(0, 2px, 0);
}

this rule will push 2px down each first children !

I don't know the meaning of this rule but maybe something like .md-select-value > *:first-child should do the trick

@mckenzielong
Copy link
Contributor

👍 also overflow: hidden; is causing clipping on characters that fall below the baseline.

@myagoo
Copy link
Author

myagoo commented Dec 9, 2015

Exactly ! I think this zealous rule is and will be the source of several bugs

@mckenzielong
Copy link
Contributor

Even something like .md-select-value span or .md-select-value > span do the trick just fine.

I didn't realize it at first glance, but the transition is applied to the div that gets created in the dirty select... so selects with a selected value have an extra 2px transform applied. Getting rid of the extra 2px gets rid of the need to change overflow:hidden;

This is a small visual bug that is noticeable in the pizza / topping demo. Select one and leave one untouched. Bonus: select something like sausage or one that contains a character that hangs below the baseline.

@ddimitrop
Copy link

+1
I think that this is very noticeable and problematic.

Here is a codepen: http://codepen.io/ddimitrop/pen/bEdWqq

@jelbourn jelbourn added the g3: reported The issue was reported by an internal or external product team. label Dec 10, 2015
@jelbourn
Copy link
Member

cc @rschmukler

@nickjackson
Copy link

I'm getting some issues with the flex: 1 0 auto; on that very class. The targeted nodes are not respecting the parent width and therefore the ellipsis wasn't working for md-option's with longer values.

@chrisajohn
Copy link

I am also having issues with the flex: 1 0 auto; I found that by altering the class this way gets the same result without any adverse impacts (that I can see).

.md-select-value *:first-child {
    flex: initial;
    width: 100%;
}

@ThomasBurleson ThomasBurleson added P1: urgent Urgent issues that should be addressed in the next minor or patch release. - Easy fix labels Jan 14, 2016
@ThomasBurleson ThomasBurleson modified the milestone: Backlog Jan 14, 2016
david-meza pushed a commit to david-meza/material that referenced this issue Mar 10, 2016
- Make selector less agressive restricting it to the text span only
- Add a max width, so the overflow rule will go in effect if we reach the width of the container

Closes angular#6200
david-meza pushed a commit to david-meza/material that referenced this issue Mar 10, 2016
- Make selector less agressive restricting it to the text span only
- Add a max width, so the overflow rule will go in effect if we reach the width of the container

Closes angular#6200
david-meza pushed a commit to david-meza/material that referenced this issue Mar 11, 2016
- Make selector less agressive restricting it to the text span only
- Add a max width, so the overflow rule will go in effect if we reach the width of the container

Closes angular#6200
david-meza pushed a commit to david-meza/material that referenced this issue Mar 11, 2016
- Make selector less agressive restricting it to the text span only
- Add a max width, so the overflow rule will go in effect if we reach the width of the container
- Allow span to shrink if width is greather than that of the input container

Closes angular#6200 and angular#6312
ThomasBurleson pushed a commit that referenced this issue Mar 16, 2016
- Make selector less agressive restricting it to the text span only
- Add a max width, so the overflow rule will go in effect if we reach the width of the container
- Allow span to shrink if width is greather than that of the input container

Closes #6200 and #6312

Closes #7509
@Splaktar Splaktar removed this from the - Backlog milestone Feb 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
g3: reported The issue was reported by an internal or external product team. P1: urgent Urgent issues that should be addressed in the next minor or patch release.
Projects
None yet
Development

No branches or pull requests

9 participants