Skip to content

[scroll area] Need a styling attribute to check for overflow presence #1100

@vladmoroz

Description

@vladmoroz

Feature request

I attempted styling ScrollArea with a hard scrollbar and ended up with a selector that looked like this:

  .ScrollAreaViewport {
    height: 100%;

    &:has(+ .ScrollAreaScrollbar[data-orientation='horizontal']) {
      padding-bottom: 1.5rem;
    }
}

I think we need data attributes both on Root and Viewport to target this comfortably.

Naming ideas:

  • data-has-overflow-x / data-has-overflow-y
  • data-has-vertical-scrollbar / data-has-horizontal-scrollbar

Metadata

Metadata

Assignees

No one assigned

    Labels

    component: scroll areaChanges related to the scroll area component.customizationtype: enhancementIt’s an improvement, but we can’t make up our mind whether it's a bug fix or a new feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions