8000 [babel-plugin] Some shorthand expansions broken with `legacy-expand-shorthands` · Issue #1091 · facebook/stylex · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
[babel-plugin] Some shorthand expansions broken with legacy-expand-shorthands #1091
Open
@mellyeliu

Description

@mellyeliu

Describe the issue

A lot of the shorthand properties in legacy-expand-shorthands are actually not expanded correctly. Properties like margin, padding, and borderColor seem to be fine, but many other properties like paddingInline, marginInline, and other values are never expanded. Technically we discourage use of multivalue shorthands anyway, but the rule is only turned on in xplat-react folders.

This leads to properties like paddingInline: "5px 10px" being expanded to paddingLeft: "5px 10px" and paddingRight: "5px 10px". Not ideal, whatever the circumstance.

Expected behavior

paddingInline: "5px 10px" should be paddingLeft: "5px" and paddingRight: "10px" in ltr and flipped in rtl

Steps to reproduce

See generated CSS w 50B3 hen passing paddingInline: "5px 10px" with styleResolution: legacy-expand-shorthands

Test case

No response

Additional comments

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0