Skip to content

Removing dimension tokens strips "Hug contents" from auto-layout framesΒ #3805

@rbosker

Description

@rbosker

Description

When a dimension token is applied to an auto-layout frame that has "Hug contents" set as its height, removing that token (via "Remove selected" or "Set to none" in the Inspect tab) overwrites the height from "Hug contents" to a fixed pixel value. The frame collapses/resizes unexpectedly.

Expected behavior: removing a dimension token should clear the token reference but preserve the original auto-layout mode ("Hug contents").

Steps to Reproduce

  1. Create an auto-layout frame with height set to Hug contents
  2. Open the Tokens Studio plugin (v2.11)
  3. Apply a dimension/sizing token to the frame (e.g. left-click a sizing token)
  4. Go to the Inspect tab in the plugin
  5. Click "Remove selected" or "Set to none" to clear the applied token
  6. Observe: the frame's height changes from "Hug contents" to a fixed value β€” the component visibly collapses

Expected Behavior

Removing the dimension token should restore the frame to its previous state with "Hug contents" as the height mode, not replace it with a fixed pixel value.

Actual Behavior

The frame's height is set to a fixed pixel value (the resolved value of the removed token), losing the "Hug contents" auto-layout setting.

Evidence

Screen recording provided by reporter demonstrating the issue consistently across multiple elements.

Environment

  • Plugin version: v2.11

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    πŸ“₯ Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions