I think negative gap values should be allowed #1822

Closed
opened 2025-06-26 11:49:21 -07:00 by vidjuheffex · 1 comment
vidjuheffex commented 2025-06-26 11:49:21 -07:00 (Migrated from github.com)

I opened this issue, but I see this is likely in the underlying Yoga library and not actually in react pdf
https://github.com/diegomura/react-pdf/issues/3180

More specifically, I think this https://github.com/facebook/yoga/pull/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.

I opened this issue, but I see this is likely in the underlying Yoga library and not actually in react pdf https://github.com/diegomura/react-pdf/issues/3180 More specifically, I think this https://github.com/facebook/yoga/pull/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.
NickGerleman commented 2025-06-26 11:52:30 -07:00 (Migrated from github.com)

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.

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 in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DaddyFrosty/yoga#1822
No description provided.