Skip to content

Instantly share code, notes, and snippets.

@KevinGutowski
Created October 13, 2021 21:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KevinGutowski/457030cc34d45705e08d1acfae29bdc7 to your computer and use it in GitHub Desktop.
Save KevinGutowski/457030cc34d45705e08d1acfae29bdc7 to your computer and use it in GitHub Desktop.
16:9 - Figma
let selection = figma.currentPage.selection
let width = selection[0].width
let height = selection[0].height
let multiplier = Math.floor(width/16)
selection[0].resize(16*multiplier,9*multiplier)
selection[0].constrainProportions = true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment