Skip to content

feat(Toolbar & Tabs): support more density scale levels in Toolbar or Tabs #28371

Open
@marek-aguita

Description

@marek-aguita

Feature Description

Currently there are these densities supported for Tabs:

image

and these for Toolbar:

image

From these scale levels vs height in pixels maps we can see that the highest Tabs have their Tab Header 48px high and the lowest Toolbar is 52px high (on desktop). This means these two components never get the same height regardless the density applied.

In case they are used next to each other, when Tabs are used as kind of a 'toolbar' on a screen, it causes a visual discrepancy. Here is a demonstration where default 0 density is used for Tabs and -3 density used for Toolbars:

https://stackblitz.com/edit/egbtbh?file=src%2Ftheme.scss

image

This may look as a tiny problem, but the Design, Business or QA departments may have very attentive eyes and report this as a visual bug (as it happened in my team). I am trying to avoid changing the heights with some custom CSS as this is not an approach recommended by Angular Material team as per this section in the official docs: https://material.angular.io/guide/customizing-component-styles#targeting-custom-styles

image

Therefore my question is, would it be please possible to add more density scale levels for either Tabs or Toolbar and still be compliant to the Material Design specs? Or maybe the whole use case of having Tabs next to a Toolbar is not correct from the Material Design specs point of view and I should ask our Design department to fix the designs?

Use Case

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: material/tabsarea: material/toolbarfeatureThis issue represents a new feature or feature request rather than a bug or bug fix

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions