Skip to content

Style.t isn't enough, should we add Style.calculated? #523

@MoOx

Description

@MoOx

As we know, all stylesheet values cannot be used in various places to add/combine styles (because they are int). Also we cannot use array() in stylesheets (runtime error).

Should we do something (at least try to) to avoid this kind of issue?

Maybe StyleSheet.create could returns Style.calculated so we cannot reuse those styles (& btw, flatten could only accept those styles ?).
That would make more complex the way we allow to use style in array for example but I wanted to give it a shot...

Also, in #520 we are saying that absoluteFill & absoluteFillObject are "the same" but they are not are one is a js object & the other is an int...

Thoughts?

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