Skip to content

TabView styling and css inheritance #5803

Closed as not planned
Closed as not planned

Description

@MartoYankov

Problem: There are no separate elements for the tab content and the tab strip item. The TabViewItem element wraps both. This breaks css inheritance - the css is applied to both content and tab strip, but you can't override the css separately.

There are also some discrepancies between properties and between platforms:

  • font-size and text-transform have native implementations on TabViewItem, color doesn't. There is however tab-text-color which applies color to all tab strip items.
  • text-transform is for some reason not an inherited property
  • font-size is hard coded for iOS TabViewItems to 10.

Proposed solution:
As a rule I think inherited css properties shouldn't have implementations on elements that are not separately represented in the mark up.

  • Make text-transform inherited as per CSS spec.
  • Remove font-size and text-transform from TabViewItem.
  • Introduce new properties in their place on both TabView and TabViewItem tab-text-font-size and tab-text-transform.
  • Optionally introduce more font properties, e.g. tab-text-font, tab-text-font-style, tab-text-font-family.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Activity

  1. self-assigned this
    on May 10, 2018
  2. MartoYankov commented on Jan 7, 2019

    @MartoYankov
    ContributorAuthor

    This is partly implemented in #5752, but needs further design considerations.

  3. NathanWalker commented on Oct 23, 2026

    @NathanWalker
    Contributor

    Closing as not planned: part of this landed in #5752. Restructuring how TabViewItem styles split between the tab strip and the content would be a breaking change, and it hasn't drawn demand since. Please open a focused issue for a specific property that can't be styled today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions