Skip to content

Support the overflow property #304

@nicoburns

Description

@nicoburns

What problem does this solve or what need does it fill?

Layout of UI containing scrollable regions.

What solution would you like?

Taffy should not implement support for scrolling itself (the actual scroll offset). But it should implement support for layout for nodes that are scrollable:

  • Add new style property Overflow, which can be controlled independently in each axis.
  • Support Overflow::Hidden #424
    • If a flexbox or grid item has overflow: hidden (or scroll or auto) in a given axis then it's automatic minimum size can be assumed to be zero (this is partly a performance optimisation, but it can also affect layout).
  • Support Overflow::Scroll #446
    • If a node has overflow: scroll in a given axis and scrollbar-width is greater than 0, then space for a scrollbar should be set aside in the opposite axis (vertical scrolling requires a scrollbar that takes up horizontal space). This space should also be added to it's content size for the purpose of intrinsic sizing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions