Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Toolbar content overflow problem. #2451

Closed
rpicone opened this issue Dec 28, 2016 · 4 comments · Fixed by #2454
Closed

Toolbar content overflow problem. #2451

rpicone opened this issue Dec 28, 2016 · 4 comments · Fixed by #2454
Assignees

Comments

@rpicone
Copy link

rpicone commented Dec 28, 2016

Bug, feature request, or proposal:

Bug with toolbar content overflow.

What is the expected behavior?

The toolbar content should be kept inside the toolbar with ellipsis

What is the current behavior?

The content transpass the height of the toolbar.

What are the steps to reproduce?

Here is the Plunker:
http://plnkr.co/edit/HxeAlLOVKhpnKl5ifSq5?p=preview

What is the use-case or motivation for changing an existing behavior?

Better visual.

Which versions of Angular, Material, OS, browsers are affected?

"@angular/material": "2.0.0-beta.1",

Is there anything else we should know?

@dahaupt
Copy link

dahaupt commented Dec 29, 2016

Well, it happens because of :

md-toolbar-row {
   height: 64px;
}

I'm not sure if we should make the toolbar more flexible or stick to this height due to the spec.

@rpicone Do you have this problem in one of your applications?

devversion added a commit to devversion/material2 that referenced this issue Dec 29, 2016
* No longer wraps lines inside of a `md-toolbar-row`
* Overflow for X-axis and Y-Axis are now hidden. Developers should use multiple `md-toolbar-row` elements or can always overwrite the styles.

Fixes angular#2451
@devversion devversion self-assigned this Dec 29, 2016
@rpicone
Copy link
Author

rpicone commented Dec 29, 2016

@dahaupt, yes I´m having this problem but reading flexbox-truncated-text I could find a solution to work with ellipsis inside the toolbar:

http://plnkr.co/edit/K44BuhjqJmhKR2GoTK5y?p=preview

@devversion
Copy link
Member

@rpicone Yeah, the problem is that text-overflow: ellipsis won't work on flex parents and flex items properly.

The ellipsis can be archived for flex items, by using the workaround you mentioned (using min-width: 0), but it won't help when having a flex parent (as the md-toolbar-row)

The PR #2454 just ensures that the text never exceeds / overflows the toolbar row.

tinayuangao pushed a commit that referenced this issue Feb 10, 2017
* fix(toolbar): prevent content overflow and line-wrapping

* No longer wraps lines inside of a `md-toolbar-row`
* Overflow for X-axis and Y-Axis are now hidden. Developers should use multiple `md-toolbar-row` elements or can always overwrite the styles.

Fixes #2451

* Address comment

* Update comment
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants