Skip to content

[scroll-state] rules won't reset when the container stops being scrollable #11688

Open
@LcsGa

Description

@LcsGa

I would like to apply some style on an element based on its container being scrollable or not.

  • Once the scrollbar appears, the style within my container query gets applied (✅)
  • Once the scrollbar disappears, the style within my container query won't reset (❌)

Here is a small reproduction of my "issue".

In the end, what I would like is some way to determine if some element is scrollable or not (or if the scrollbar is visible, actually) and I only found the newer scroll-state to achieve this, but it may not be meant for this thoug...

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