Skip to content

[css-images] Avoid 0/0 division in stripes() #9666

Open
@Loirooriol

Description

@Loirooriol

https://drafts.csswg.org/css-images-4/#stripes

A <flex> is evaluated as a fraction of the total width relative to the total sum of <flex> entries in the function, after subtracting the thickness of any non-<flex> entries (flooring the subtraction result at zero). If the sum of <flex> values is less than 1fr, the result of the subtraction is multiplied by the sum’s value before being distributed.

If all the <flex> values are 0fr, then the fractions will be 0/0.

Since the amount being distributed is multiplied by 0, then it seems fine to just not distribute anything.

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