Skip to main content

Version 1, Update 120

New layout options for grid

  • Frames with layoutMode 'GRID' now support 'HUG' for layoutSizingHorizontal and layoutSizingVertical.
  • Frames with layoutMode 'GRID' also support 'HUG' as a GridTrackSize type in the row and column sizes
  • Frames with layoutMode 'GRID' now support values other than 1 for 'FLEX' sized tracks in gridRowsSizes and gridColumnsSizes. This corresponds to the fr unit in CSS Grid
  • Note: in Figma Design, when creating a new grid, the container and all rows and columns are automatically set to HUG, but in the Plugin API, new grids are FIXED and their tracks are FLEX.
  • Breaking change: previously, calling the GridTrackSize setters with a value would set the track to 'FIXED' if it was previously set as 'FLEX'. Now, the type will only be automatically set to 'FIXED' if the track was previously set to 'HUG'

Instance method deprecation

  • The resetOverrides method on InstanceNode is deprecated in favor of removeOverrides. This is a change in method name only.