Skip to content

feat(preview): add a column guide over the canvas - #42

Merged
flowtricks merged 1 commit into
flowtricks:mainfrom
SylvainDruaux:guide-overlay
Oct 19, 2026
Merged

flowtricks merged 1 commit into
flowtricks:mainfrom
SylvainDruaux:guide-overlay

Conversation

@SylvainDruaux

Copy link
Copy Markdown
Contributor

A new toolbar button, next to the breakpoints buttons, opens the column guide's menu. When on, the guide draws full-height columns over the preview, under the selection outlines. It never takes a click and never writes to the project. It works in the desktop app and in Studio, which share the same implementation.

In a Lumos project, the guide reads the layout variables at the current preview width: the column count from --site-column-count, --site-columns or --_column-count, and the margin, gutter and max width from --site-margin, --site-gutter and --max-width-main. Fluid clamp() values are resolved to pixels by the preview frame.

Without those variables, Stacki's defaults apply: 12 columns, a fluid margin (16–48px) and gutter (16–32px), and no max width.

In the menu, the column count can be picked from an editable list of whole numbers from 4 to 24, or read from a project variable. A count outside that range is ignored, and the menu says why. The margin, gutter and max width take a length (px or rem) or a project variable. Reset brings back the project's value or the default.

Colour, opacity, numbers and visibility are saved per project, and ⇧G shows or hides the guide. The menu reuses the style panel's controls, which adds a preview edge to eslint.config.mjs.

A new toolbar button, next to the breakpoints buttons, opens the column
guide's menu. When on, the guide draws full-height columns over the
preview, under the selection outlines. It never takes a click and never
writes to the project. It works in the desktop app and in Studio, which
share the same implementation.

In a Lumos project, the guide reads the layout variables at the current
preview width: the column count from --site-column-count, --site-columns
or --_column-count, and the margin, gutter and max width from
--site-margin, --site-gutter and --max-width-main. Fluid clamp() values
are resolved to pixels by the preview frame.

Without those variables, Stacki's defaults apply: 12 columns, a fluid
margin (16–48px) and gutter (16–32px), and no max width.

In the menu, the column count can be picked from an editable list of
whole numbers from 4 to 24, or read from a project variable. A count
outside that range is ignored, and the menu says why. The margin, gutter
and max width take a length (px or rem) or a project variable. Reset
brings back the project's value or the default.

Colour, opacity, numbers and visibility are saved per project, and ⇧G
shows or hides the guide. The menu reuses the style panel's controls,
which adds a preview edge to eslint.config.mjs.
@flowtricks

Copy link
Copy Markdown
Owner

Amazing! Thank you

@flowtricks
flowtricks merged commit d291b62 into flowtricks:main Oct 19, 2026
@SylvainDruaux
SylvainDruaux deleted the guide-overlay branch October 21, 2026 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants