material icon indicating copy to clipboard operation
material copied to clipboard

tabs: tab min-width and max-width values are not implemented

Open valenburm opened this issue 10 years ago • 8 comments

Actual Behavior:

  • What is the issue? Tab width is unrestricted in case of a long last label. [x] button is not visible.

missingX

  • What is the expected behavior? Scroll tabs with a long last label to the end with possibility of its closing..

Angular Versions: *

  • Angular Version: 1.5.8
  • Angular Material Version: 1.1.0-rc.5

Additional Information:

  • Browser Type: *
  • Browser Version: *
  • OS: Windows
  • Stack Traces:

valenburm avatar Aug 09 '16 10:08 valenburm

+1

DAbrashin avatar Aug 09 '16 10:08 DAbrashin

+1

VasiliyZhushma avatar Aug 09 '16 10:08 VasiliyZhushma

+1

ivorobkalo avatar Aug 09 '16 10:08 ivorobkalo

+1

dmitriyK1 avatar Aug 09 '16 10:08 dmitriyK1

+1

soutlan avatar Aug 09 '16 10:08 soutlan

+1

vovashevchenko avatar Aug 10 '16 06:08 vovashevchenko

related to #9779.

ThomasBurleson avatar Oct 12 '16 19:10 ThomasBurleson

It appears as thought the Material Design spec does have minimum and maximum settings for scrollable tab which have not been implemented yet. I'll rename this Issue to better clarify that.

https://material.google.com/components/tabs.html#tabs-specs

For a quick fix, you can add the following CSS ou can add this CSS to your application to restrict the width of the tab items to any value you want:

.md-tab { 
  min-width: 160px;
  max-width: 264px; 
}

Custom components (like the close button) are not something we can fully support, but restricting the width (aka using max-width) is valid.

clshortfuse avatar Oct 31 '16 15:10 clshortfuse