align-diagonal-guides
| description | Align vertical guide lines to responsive content edges. Join them with mirrored SVG diagonals, precisely centered outline squares and unobtrusive line entrances. |
|---|---|
| import_scope | signals-cleared-supporting-files |
| license | MIT |
| license_url | https://github.com/MengTo/Skills/blob/2f8cb46167bec49ee3c4a6ca37972fc065b6b47e/LICENSE |
| name | align-diagonal-guides |
| publisher | MengTo |
| repository_url | https://github.com/MengTo/Skills |
| source_url | https://github.com/MengTo/Skills/blob/2f8cb46167bec49ee3c4a6ca37972fc065b6b47e/agent-skills/web-design/align-diagonal-guides/SKILL.md |
| upstream_copyright | Copyright (c) 2026 Meng To |
| upstream_revision | 2f8cb46167bec49ee3c4a6ca37972fc065b6b47e |
Align Diagonal Guides

Anchor a small number of guides to elements that already form a grid. Align the first rail to the left edge of the header and lower controls, the last rail to their right edge, and the inner pair to the type or image column.
Lay out the connections
- Add the guide fragment as a direct child of a positioned .guide-frame. Load guides.css. Give content a higher stacking level. The overlay ignores pointer input and is hidden from assistive technology.
- Share --edge with the actual controls and set --inner-left and --inner-right on .guides. The right value is the inset from the right. For a centered max-width container, use the larger of its gutter and half the unused width. For measured layouts, subtract the frame rectangle before writing CSS lengths. Update after fonts, resize and breakpoint changes.
- Start a connector half a CSS pixel inside the outer 1px rail. Its width is the inner inset minus the outer inset. Use a percentage SVG line with no viewBox so its endpoints follow the span without stretching the dash pattern. Mirror the wrapper on the right and below.
- Center hollow 6px squares on both endpoints with a 50% translation. Use the same stroke color as the line. Keep diagonals quieter than rails and hide the affected connector if a menu or projection occupies that region.
- For narrow frames collapse a pair if there is no usable span. Shorten the diagonal height before moving the content. Limit animation to the entry stroke and a subtle passing highlight. Honor reduced motion.
Check
Resize through the mobile breakpoint and a wide monitor. Compare each endpoint to the center of its rail within half a CSS pixel. Check at 125% zoom and 2× pixel density, expand a popover, and click through the diagonal. No extra horizontal scrolling should appear.
Copyright (c) 2026 Meng To
The license files are attached. MIT
The attached ZIP contains the pinned supporting files cleared for import. Applicable license notices are attached or included when cleared.
Like how this is organised?
Build your own Memory tree on knowen.md: notes, decisions and tasks in one connected markdown graph, shared with your team and your AI agents.