Skip to content

Instantly share code, notes, and snippets.

@lukekrikorian
Last active April 23, 2024 19:37
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 lukekrikorian/0de1a9f83b59967559234563938140e0 to your computer and use it in GitHub Desktop.
Save lukekrikorian/0de1a9f83b59967559234563938140e0 to your computer and use it in GitHub Desktop.
Sketch.app grid settings generator
# ~ CHANGE ME ~
offset = 0
number_of_columns = 48
gutter_on_outside = False
gutter_width = 24
column_width = 48
gutter_height = gutter_width
row_height = 4 * gutter_height
# ! DON'T CHANGE ME ! #
number_of_gutters = number_of_columns - 1
gutter_check = 'x' if gutter_on_outside else ' '
total_width = number_of_gutters * gutter_width + number_of_columns * column_width
# def print_control(name, value)
# print("%>30:")
print(f"[x] Columns: Total Width: {total_width}px ")
print(f" Offset: 0 ")
print(f" Number of Columns: {number_of_columns} ")
print(f" [{gutter_check}] Gutter on Outside")
print(f" -----------------------------------------------------------")
print(f" Gutter Width: {gutter_width} px ")
print(f" Column Width: {column_width} px ")
print(f"-------------------------------------------------------------")
print(f"[x] Rows: Gutter Height: {gutter_height}px ")
print(f" Row Height: {row_height / gutter_height} ✕ Gutter Height ")
print(f" [ ] Draw all horizontal lines ")
print(f"-------------------------------------------------------------")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment