vectojs-responsive-layout
Installation
SKILL.md
VectoJS Responsive Layout
Use this skill when a VectoJS UI must adapt to viewport size, browser zoom, density, content length, or resizable panels.
Layout workflow
- Define layout state in logical CSS pixels, not backing-store pixels.
- Resize the
Scenefrom the containing element, not blindly fromwindow, when embedding in an app shell. - Compose with
Stack,Flow,Card,ScrollView,VirtualList,TreeView, and resizable panels. - After direct child size changes, call the parent layout method and mark the scene dirty.
- Keep one scroll owner per region; avoid nested wheel handlers without clear boundaries.
- Use role labels and semantic regions even for canvas-rendered layout containers.
Read references/layout-recipes.md for copyable patterns.
For OS/browser/zoom/DPR consistency and text-selection alignment (embedded
scene.resize() bridge, Firefox Range recalibration, web-font race, the
DPR-1-vs-2 test matrix), read references/cross-environment.md.