Skip to content

Drop-shadow values appear in reverse order #111

@alehar9320

Description

@alehar9320

Describe the bug
When retrieving token values for shadows from an object with two drop-shadow properties set, the order is reversed.

To Reproduce

  1. Go into Figma
  2. Duplicate Figmagic's Figma document template
  3. Perform the documented steps to make Figmagic retrieve tokens from the Figma document using the Figma API
  4. View the output for the token called Shadow Deep (multiple) inside shadows.ts

Expected behavior
The order of values shall be the same as in Figma. In other words, the drop-shadow that is defined first shall have its values occur first. The drop-shadow that is defined second, shall have its values appear second.

Screenshots
image

The result from Figmagic (reversed order)
Note that the drop-shadow that appears first in Figma has the percentage value of 17%. That now appears last of the values.

// THIS FILE IS AUTO-GENERATED BY FIGMAGIC. DO NOT MAKE EDITS IN THIS FILE! CHANGES WILL GET OVER-WRITTEN BY ANY FURTHER PROCESSING.

const shadows = {
 [...]
 "shadow-deep-multi": "0px 4px 20px rgba(0, 0, 0, 0.10), 0px 4px 4px rgba(0, 0, 0, 0.17)",
} as const

export default shadows;

Desktop

  • OS: Windows
  • Browser: N/A
  • Version: 10
  • Figmagic version: 4.2.21 (also present on 4.0.0).

Additional context
The issue originates from that the Figma API returns them in reverse order. Can be seen by opening figma.json.

Metadata

Metadata

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions