Skip to content

Expose border calculated value #223

@afonsolage

Description

@afonsolage

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

Currently Taffy uses border as a second margin, which is just used to compute inner margin of children. If some crate want to draw borders Taffy doesn't tell where the border begins and where it ends, which forces crate users to recalculate border by hand.

What solution would you like?

Expose the computed border value, so users can differentiate between padding (external), border (middle) and margin (internal)

What alternative(s) have you considered?

Computing border by hand, which is very error prone.

Additional context

In fact border isn't part of Flex, it's more likely part of CSS specification which is used to draw fancy borders on documents, but since Taffy already supports border (in fact border-width), it would be a nice feature to expose this to users than can actually draw their borders.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions