You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(ui): a host's root font size shrinks the side panel #238
On a host whose root font size is not 16px, the widget's side panel shrinks and its text wraps letter by letter ("Kingdo/m", "Canad/a"), while the map camera still pads for a 352px panel. Twenty Twenty (on the fleet) and OceanWP set html { font-size: 62.5% }; the panel measures about 220px on both. Found by the plugin's browser lane (sydevs/SahajAtlasWordpress#38): cells twentytwenty, oceanwp, root-font, fixed-header.
Approach
TAILWIND_REM_TO_PX already converts most of the scale to px, but several values stay in rem:
w-[var(--sy-drawer-w,22rem)] and max-w-[calc(100%-2rem)] (src/components/atoms/Drawer/Drawer.tsx:80-87)
the cog offset calc(var(--sy-drawer-w,22rem)+2rem|3rem) (src/views/DrawerStack/DrawerStack.tsx:823)
max-w-[6rem] (ActionRow.tsx:42), the Modal's calc(…-2rem) (Modal.tsx:42)
globals.css:301,456-458, vaul.css:162,176-177, and the Schedule-X calendar CSS
src/hooks/use-map-controller-real.tsx:40-41 hard-codes 22 * 16. Convert the remaining values to px (the drawer width to 352px), and add a build assertion that fails on a rem in the injected CSS outside the calendar chunk.
Acceptance criteria
With html { font-size: 62.5% } on the host, the side panel is 352px wide and no list label wraps mid-word.
The map camera's left padding matches the panel's rendered width.
Verification checklist
pnpm build fails if a non-calendar injected stylesheet contains rem.
In SahajAtlasWordpress, pnpm test:browser --only twentytwenty,root-font reports no "side panel keeps its width" finding.
Notes
From the 2026-09-30 integration audit (finding C3).
Activity
fix(comments): correct the rem premise in the src guide