Skip to content

I think negative gap values should be allowed #1822

Closed

Description

@vidjuheffex

I opened this issue, but I see this is likely in the underlying Yoga library and not actually in react pdf
diegomura/react-pdf#3180

More specifically, I think this #1405 is incorrect, while negative gap values might be unwise, they aren't "illegal" and shouldnt be clamped, and as you can see from the screenshots on the issue I opened in react-pdf, there are times when they are useful/the only way to accomplish certain layouts.

Activity

  1. NickGerleman commented on Jun 26, 2025

    @NickGerleman
    Contributor

    The spec explicitly disallows negative values (and I am certain browsers would do the same).

    https://www.w3.org/TR/css-align-3/#column-row-gap

    Negative values are invalid.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions