Skip to content

Gap does not support a value of Auto #265

@nicoburns

Description

@nicoburns

Problem

To match CSS, thegap property should not really have Auto or Undefined variants.

See: bevyengine/bevy#6743 (comment)

Proposed solution

A new LengthPercentage enum which does not include the Undefined or Auto variants

enum LengthPercentage {
    /// Abstract absolute units
    Points(f32),
    /// The dimension is stored in percentage relative to the parent item.
    Percent(f32),
}

Not 100% sure on the name, but LengthPercentage is what the CSS specification uses and is pretty descriptive.

Notes

This isn't really a problem in practice. We currently just treat Auto and Undefined as 0.0. But it is potentially confusing to users of taffy.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions