Fluid scaling to 1920px and height-aware variables; speed and responsive guidelines

- fluid-wide.css: the fluid.css variables stretched over 360→1920px (export
  @intecion/ipal-kit/fluid-wide.css); fluid.css values unchanged.
- New variables in both (unused until a project opts in): --ipal-measure,
  --ipal-container(-wide), --ipal-hero-min-h (svh), --ipal-fs-display-fit,
  --ipal-fs-h1-fit, --ipal-space-section-fit — keep the hero CTA above the fold
  on 1366×768. Verified in Chromium at 360…1920 widths.
- AGENT.md §6.11a (scaling, viewport test list incl. 13–15" laptops and 125/150 %
  zoom) and §6.11b (Core Web Vitals table: LCP image, sizes, placeholders, video
  modes, YouTube facade, images preset, fonts).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
2026-10-16 03:21:38 +02:00
co-authored by Claude Opus 5.5
parent 55fc27a13f
commit 69309b09e3
5 changed files with 114 additions and 2 deletions
+47
View File
@@ -0,0 +1,47 @@
/*
* @intecion/ipal-kit/fluid-wide.css — the fluid.css scale stretched over 360 → 1920px.
* Same variable names: import ONE of the two. With fluid.css everything stops
* growing at 1280px, so a 13" laptop and a 27" monitor look the same; here type
* and spacing keep scaling up to 1920px (at 1280px they're a little smaller than
* in fluid.css — check the design at 1280, 1440 and 1920).
*
* @import "tailwindcss";
* @import "@intecion/ipal-kit/fluid-wide.css";
* @theme inline { --text-h1: var(--ipal-fs-h1); --spacing-section: var(--ipal-space-section); … }
*
* rem-based (browser zoom and user font size still work, WCAG 1.4.4). Override
* any variable in the project's :root.
*/
:root {
--ipal-fs-sm: clamp(0.875rem, 0.8606rem + 0.0641vw, 0.9375rem); /* 0.875→0.9375rem · small print, captions */
--ipal-fs-base: clamp(1rem, 0.9712rem + 0.1282vw, 1.125rem); /* 1→1.125rem · body text */
--ipal-fs-lg: clamp(1.125rem, 1.0673rem + 0.2564vw, 1.375rem); /* 1.125→1.375rem · lead / intro */
--ipal-fs-h3: clamp(1.25rem, 1.1346rem + 0.5128vw, 1.75rem); /* 1.25→1.75rem · h3 */
--ipal-fs-h2: clamp(1.5rem, 1.2692rem + 1.0256vw, 2.5rem); /* 1.5→2.5rem · h2 — section headings */
--ipal-fs-h1: clamp(2rem, 1.6538rem + 1.5385vw, 3.5rem); /* 2→3.5rem · h1 — page heading */
--ipal-fs-display: clamp(2.5rem, 2.0385rem + 2.0513vw, 4.5rem); /* 2.5→4.5rem · hero / display */
--ipal-space-gap: clamp(1rem, 0.7692rem + 1.0256vw, 2rem); /* 1→2rem · gap between items in a section */
--ipal-space-gutter: clamp(1rem, 0.6538rem + 1.5385vw, 2.5rem); /* 1→2.5rem · container side padding */
--ipal-space-section: clamp(3rem, 1.9615rem + 4.6154vw, 7.5rem); /* 3→7.5rem · vertical padding of a section */
}
/*
* Layout & height-aware helpers (added in 1.10 — nothing uses them until the
* project does, so existing sites look exactly the same):
* max-w-[var(--ipal-measure)] comfortable line length for running text
* --ipal-container / -wide content widths for the section container
* min-h-[var(--ipal-hero-min-h)] hero that fills a laptop screen, not a 4K one
* text-[length:var(--ipal-fs-display-fit)], py-[var(--ipal-space-section-fit)]
* shrink on SHORT screens (1366×768, 1280×720,
* landscape phones) so the hero CTA stays above the fold
* svh = the small viewport height (mobile browser bars shown) — never 100vh.
*/
:root {
--ipal-measure: 68ch;
--ipal-container: 80rem;
--ipal-container-wide: 96rem;
--ipal-hero-min-h: min(100svh, 56rem);
--ipal-fs-display-fit: min(var(--ipal-fs-display), 7svh + 0.75rem);
--ipal-fs-h1-fit: min(var(--ipal-fs-h1), 6svh + 0.5rem);
--ipal-space-section-fit: min(var(--ipal-space-section), 10svh);
}
+24
View File
@@ -19,6 +19,9 @@
*
* The design (DESIGN.md) decides the numbers: override any variable in the project's
* :root — the plugin only removes the clamp() maths from every project.
*
* Wider screens should keep growing (13" laptop → 27" monitor)? Import
* @intecion/ipal-kit/fluid-wide.css instead: same variables, scaled 360 → 1920px.
*/
:root {
--ipal-fs-sm: clamp(0.875rem, 0.8505rem + 0.1087vw, 0.9375rem); /* 0.875→0.9375rem · small print, captions */
@@ -32,3 +35,24 @@
--ipal-space-gutter: clamp(1rem, 0.413rem + 2.6087vw, 2.5rem); /* 1→2.5rem · container side padding */
--ipal-space-section: clamp(3rem, 1.2391rem + 7.8261vw, 7.5rem); /* 3→7.5rem · vertical padding of a section */
}
/*
* Layout & height-aware helpers (added in 1.10 — nothing uses them until the
* project does, so existing sites look exactly the same):
* max-w-[var(--ipal-measure)] comfortable line length for running text
* --ipal-container / -wide content widths for the section container
* min-h-[var(--ipal-hero-min-h)] hero that fills a laptop screen, not a 4K one
* text-[length:var(--ipal-fs-display-fit)], py-[var(--ipal-space-section-fit)]
* shrink on SHORT screens (1366×768, 1280×720,
* landscape phones) so the hero CTA stays above the fold
* svh = the small viewport height (mobile browser bars shown) — never 100vh.
*/
:root {
--ipal-measure: 68ch;
--ipal-container: 80rem;
--ipal-container-wide: 96rem;
--ipal-hero-min-h: min(100svh, 56rem);
--ipal-fs-display-fit: min(var(--ipal-fs-display), 7svh + 0.75rem);
--ipal-fs-h1-fit: min(var(--ipal-fs-h1), 6svh + 0.5rem);
--ipal-space-section-fit: min(var(--ipal-space-section), 10svh);
}