Skip to content

Make it possible to define tabs orientation through CSS #5382

@Artur-

Description

@Artur-

Describe your motivation

When you do a responsive layout, you do the responsiveness in CSS using media queries. You are able to redefine the sizes of components and for flex based layouts, you can change the direction for devices of various sizes. It would be beneficial if the orientation of tabs could also be changed in the same way, using CSS

Describe the solution you'd like

For a flex layout you can do e.g.

@media screen and (max-width: 740px) {
  .mylayout {
    flex-direction: column;
  }

similarly you would want to do e.g.

@media screen and (max-width: 740px) {
  .mytabs {
    --tabs-orientation: vertical;
  }

As long as there is no way to listen to css property value changes from JS, a potential way of implementing this in a "quite good" manner would be to check the variable in the resize observer in tabs

Describe alternatives you've considered

No response

Additional context

No response

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