@fluid-theme/core 0.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/AGENTS.md +32 -0
  2. package/CHANGELOG.md +159 -0
  3. package/CLAUDE.md +104 -0
  4. package/GEMINI.md +48 -0
  5. package/LICENSE +21 -0
  6. package/README.md +253 -0
  7. package/dist/fluid.min.css +2 -0
  8. package/fluid-agent-kit/README.md +57 -0
  9. package/fluid-agent-kit/skills/accessibility.md +41 -0
  10. package/fluid-agent-kit/skills/css-conventions.md +51 -0
  11. package/fluid-agent-kit/skills/image-optimization.md +115 -0
  12. package/fluid-agent-kit/skills/ux-rules.md +43 -0
  13. package/package.json +68 -0
  14. package/src/animations/scroll-reveal.css +224 -0
  15. package/src/components/accordion.css +250 -0
  16. package/src/components/alert.css +453 -0
  17. package/src/components/avatar.css +192 -0
  18. package/src/components/badge.css +182 -0
  19. package/src/components/button.css +387 -0
  20. package/src/components/card.css +650 -0
  21. package/src/components/chip.css +143 -0
  22. package/src/components/dropdown.css +335 -0
  23. package/src/components/empty-state.css +105 -0
  24. package/src/components/form.css +508 -0
  25. package/src/components/hero.css +293 -0
  26. package/src/components/indicator.css +455 -0
  27. package/src/components/loading.css +274 -0
  28. package/src/components/modal.css +364 -0
  29. package/src/components/nav.css +726 -0
  30. package/src/components/scroll-progress.css +104 -0
  31. package/src/components/search-input.css +125 -0
  32. package/src/components/settings-panel.css +603 -0
  33. package/src/components/step-indicator.css +188 -0
  34. package/src/components/table.css +350 -0
  35. package/src/components/themed-images.css +229 -0
  36. package/src/components/tooltip.css +247 -0
  37. package/src/components/version-badge.css +70 -0
  38. package/src/core/base.css +884 -0
  39. package/src/core/reset.css +159 -0
  40. package/src/core/tokens.css +2416 -0
  41. package/src/fluid.css +242 -0
  42. package/src/layouts/positioning.css +626 -0
  43. package/src/sections/cta.css +210 -0
  44. package/src/sections/features.css +356 -0
  45. package/src/sections/footer.css +283 -0
  46. package/src/sections/stats.css +234 -0
  47. package/src/sections/team.css +181 -0
  48. package/src/sections/testimonials.css +251 -0
package/AGENTS.md ADDED
@@ -0,0 +1,32 @@
1
+ # AI Agent Instructions
2
+
3
+ This project uses **The Fluid Theme** — a semantic CSS design system. If you are an AI coding assistant, read the following files to understand project conventions:
4
+
5
+ ## Essential Reading
6
+
7
+ 1. **`fluid-agent-kit/skills/css-conventions.md`** — CSS layer order, design tokens, logical properties, data attributes
8
+ 2. **`fluid-agent-kit/skills/accessibility.md`** — Non-negotiable accessibility standards
9
+ 3. **`fluid-agent-kit/skills/ux-rules.md`** — 12 behavioral rules for interactive components
10
+ 4. **`fluid-agent-kit/skills/image-optimization.md`** — Responsive images, lazy loading, focal points
11
+
12
+ ## Key Rules
13
+
14
+ - Use **semantic HTML** with data attributes — not utility classes
15
+ - Use **CSS custom properties** (tokens) for all values — never hardcode `16px` or `#333`
16
+ - Use **logical properties** — `margin-block-start` not `margin-top`
17
+ - Use **`<dialog>`** for modals — not `<div role="dialog">`
18
+ - **Never remove focus outlines** — restyle if needed
19
+ - **Respect `prefers-reduced-motion`** in all animations
20
+ - Every `<img>` needs `alt`, `width`, `height`, and `loading="lazy"` (except above-fold)
21
+
22
+ ## Full Documentation
23
+
24
+ - `_docs/DEVELOPMENT.md` — Master development guide
25
+ - `_docs/UX-BEHAVIOR-SPEC.md` — Complete UX specification (18 sections)
26
+ - `_docs/images-guide.md` — Image optimization guide
27
+ - `_docs/reference/components.md` — Component API reference
28
+ - `_docs/reference/tokens.md` — Design token reference
29
+
30
+ ## Framework Version
31
+
32
+ 0.4.0
package/CHANGELOG.md ADDED
@@ -0,0 +1,159 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [0.4.3] - 2026-03-24
9
+
10
+ ### Fixed
11
+ - feat: npm package setup — @fluid-theme/core v0.4.2
12
+
13
+
14
+ ## [0.4.2] - 2026-03-21
15
+
16
+ ### Added
17
+ - **npm package** configured as `@fluid-theme/core` (scoped, leaving room for `@fluid-theme/react`, `@fluid-theme/vue`, etc.)
18
+ - **CSS build pipeline**: `npm run build` bundles all `@import` statements and minifies to `dist/fluid.min.css` via lightningcss
19
+ - **`dist/fluid.min.css`**: production-ready minified build (196 kB) for CDN and npm consumers
20
+ - **CDN links**: jsDelivr and unpkg will serve the minified build automatically once published
21
+ - **Package exports**: `@fluid-theme/core` resolves to minified build; `@fluid-theme/core/src` gives access to raw source
22
+ - **`PUBLISHING.md`**: step-by-step guide for completing the npm publish (create account, create org, login, publish)
23
+
24
+ ### Changed
25
+ - Package renamed from `the-fluid-theme` → `@fluid-theme/core`
26
+ - `package.json` `main` and `style` fields now point to `dist/fluid.min.css`
27
+ - `prepublishOnly` hook ensures dist is always rebuilt before publishing
28
+ - README installation instructions updated with correct CDN links and npm install command
29
+
30
+ ### Fixed
31
+ - Removed internal `.agent/` and `.claude/` directories from git tracking
32
+
33
+ ## [0.4.1] - 2026-03-20
34
+
35
+ ### Added
36
+ - **Image optimization pipeline**: `npm run optimize-images` generates WebP (640w, 1024w) and AVIF (full-width) variants via sharp
37
+ - **`<picture>` elements**: all 62 template images wrapped with AVIF + WebP sources and `srcset`/`sizes` for responsive delivery
38
+ - **Build scripts**: `scripts/optimize-images.js` (image conversion) and `scripts/update-html-picture.js` (HTML template updates)
39
+
40
+ ### Changed
41
+ - **Image payload reduced 77.5%**: 33.6MB PNG originals → 7.6MB optimized WebP/AVIF variants
42
+ - All hero/full-width images use `sizes="100vw"`, card images use responsive sizes
43
+ - Avatar images intentionally excluded from `<picture>` wrapping (too small for srcset)
44
+ - PNG originals preserved as fallbacks inside `<picture>` elements
45
+
46
+ ## [0.4.0] - 2026-03-20
47
+
48
+ ### Added
49
+ - **Image utilities** in CSS framework:
50
+ - Focal point control via `data-focus` attribute on `.hero__background` and `.card__media` (top, bottom, left, right, center)
51
+ - Custom focal point via `--focus-x` / `--focus-y` CSS custom properties
52
+ - Image protection utility via `[data-protected]` (casual right-click deterrent, not DRM)
53
+ - Orientation-aware images via `[data-orientation="landscape|portrait"]`
54
+ - **Lazy loading** (`loading="lazy"`) added to 70 below-fold images across all templates and examples
55
+ - **Image dimensions** (`width`/`height`) added to all `<img>` tags for CLS prevention
56
+ - **Image optimization guide** (`_docs/images-guide.md`) — format recommendations, responsive patterns, focal points, lazy loading, stack-specific solutions
57
+ - **The Fluid Agent Kit** (`fluid-agent-kit/`) — AI coding assistant support with 4 skills:
58
+ - CSS conventions, UX rules, accessibility standards, image optimization
59
+ - **AI pointer files**: `AGENTS.md` (agent-agnostic), `GEMINI.md` (Google Gemini)
60
+ - **Updated `CLAUDE.md`** to reference Fluid Agent Kit instead of internal tools
61
+
62
+ ### Fixed
63
+ - **Heading order** on homepage: h4 under h2 "Features" changed to h3
64
+ - **Customizer 404**: nav link changed from broken `<a>` to `<button>` that opens settings panel
65
+ - **Lint script**: added `.unlighthouse/` exclusion to prevent false positives from third-party tool output
66
+
67
+ ### Changed
68
+ - Internal development tools (`.agent/`, `.claude/`) are now gitignored — not shipped publicly
69
+ - Version bump from 0.3.5 to 0.4.0
70
+
71
+ ## [0.3.5] - 2026-03-20
72
+
73
+ ### Fixed
74
+ - **`--color-primary` phantom token**: replaced 40+ references across 8 HTML files with `--accent` — all were rendering nothing
75
+ - **Duplicate `<main>` in dashboard.html**: changed inner `<main>` to `<div role="region">`
76
+ - **Missing `prefers-reduced-motion`** in `form.css` (6 transitions) and `themed-images.css` (2 transitions)
77
+ - **`outline: none` in reset.css**: changed to `outline: 2px solid transparent` for high-contrast mode
78
+ - **`--gray-12` typo in footer.css**: token doesn't exist, changed to `--gray-15`
79
+ - **Duplicate `.progress__track` selector** in indicator.css: merged into single rule
80
+ - **Dead `max-inline-size` rule** in footer.css `.site-footer__brand`: removed duplicate
81
+ - **Print styles**: now hide all `.nav` (not just sticky), use token for `pre/code` background
82
+ - **Missing `<h1>` in search-results.html**: added heading
83
+ - **Generic `alt="Team member"`** on about.html: changed to actual names
84
+ - **Documentation phantom API**: `tokens.md` documented non-existent `--color-primary` family, changed to `--accent`
85
+ - **Stale documentation**: getting-started (v0.3.2, 17 components, 9 templates, old repo URL), _start-here (v0.3.2, 17/16), README (17/9), installation (17) — all corrected to v0.3.5 / 23 / 18
86
+
87
+ ### Added
88
+ - **Pre-release audit report** (`_docs/PRE-RELEASE-AUDIT.md`): 13-phase comprehensive audit covering CSS validity, browser compat, accessibility, HTML validation, token consistency, responsive, dark mode, print, documentation, npm readiness, cross-file consistency, security, performance
89
+
90
+ ## [0.3.4] - 2026-03-20
91
+
92
+ ### Added
93
+ - **Version badge** documented in components reference
94
+ - **Claude Code skills**: CSS conventions, UX rules, accessibility, Agile Kit reference
95
+ - **Lint script** for convention checking (`.claude/scripts/lint-conventions.sh`)
96
+
97
+ ### Fixed
98
+ - All `outline: none` violations replaced with `outline: 2px solid transparent` for high-contrast mode accessibility (7 files)
99
+ - Added `prefers-reduced-motion` handling to `base.css` progress bar animation
100
+ - UX audit report updated — all 17 critical items now marked as resolved
101
+ - Footer consistency: added missing footer to blog-post, dashboard, login, register, search-results templates
102
+ - Hero consistency: added missing `data-size="full"` to services.html hero
103
+ - Landing page version badges now use `{{ site.version }}` instead of hardcoded values
104
+
105
+ ## [0.3.3] - 2026-03-20
106
+
107
+ ### Added
108
+ - **Section components** (6): features, testimonials, CTA, footer, team, stats
109
+ - **Version badge component**: fixed-position version display, toggled via `data-show-version`
110
+ - **Page templates** (8): blog post, SaaS landing, agency landing, product landing, login, register, dashboard, search results
111
+ - **Integration guides**: React/Next.js, Vue/Nuxt, Svelte/SvelteKit
112
+ - **Migration guides**: Bootstrap, Tailwind
113
+ - **Documentation**: installation, first-component tutorial, theming guide, layout guide
114
+ - **GitHub infrastructure**: CI workflow, release workflow, issue templates, PR template, contributing guide, code of conduct
115
+ - New components: empty state, steps, search input, chip
116
+
117
+ ### Fixed
118
+ - Contact form validation with `aria-invalid`, `.form-error`, and submission feedback
119
+ - All critical UX audit items resolved (17 critical, 25 warnings addressed)
120
+ - Remaining physical properties converted to logical properties
121
+ - Token consistency across all components
122
+ - Deep accessibility improvements — focus management, landmarks, motion safety
123
+ - Print styles, dark mode shadows, switch documentation
124
+ - Destructive modal specificity (action-specific labels)
125
+ - Responsive tables with `data-responsive` + `td[data-label]`
126
+ - `prefers-reduced-motion` in button, card, nav components
127
+ - Hardcoded color overrides replaced with token-based values
128
+ - Browser support requirements documentation
129
+
130
+ ## [0.3.2] - 2026-03-15
131
+
132
+ ### Added
133
+ - Badge component
134
+ - Scroll reveal animations
135
+ - Layout positioning utilities (flex, grid, sidebar, holy grail, dashboard)
136
+ - Container query support throughout components
137
+
138
+ ### Fixed
139
+ - Dark mode uses deep palette colors instead of black
140
+ - Subdued contrast mode with proper muted palettes
141
+ - Fluid typography scaling
142
+
143
+ ## [0.3.0] - 2026-03-14
144
+
145
+ ### Added
146
+ - 17 UI components (buttons, cards, nav, forms, heroes, indicators, settings panel, scroll progress, themed images, modal, tooltip, accordion, alert, table, avatar, loading, dropdown)
147
+ - 10 color palettes with 6 accent colors each
148
+ - 7 physics-based motion styles
149
+ - CSS layer architecture
150
+ - Dark mode, light mode, auto mode, subdued contrast
151
+ - OKLCH color system with color-mix()
152
+
153
+ [0.3.5]: https://github.com/Agile-Media-Agency/the-fluid-theme/compare/v0.3.4...v0.3.5
154
+ [0.3.4]: https://github.com/Agile-Media-Agency/the-fluid-theme/compare/v0.3.3...v0.3.4
155
+ [0.3.3]: https://github.com/Agile-Media-Agency/the-fluid-theme/compare/v0.3.2...v0.3.3
156
+ [0.3.2]: https://github.com/Agile-Media-Agency/the-fluid-theme/compare/v0.3.0...v0.3.2
157
+ [0.3.0]: https://github.com/Agile-Media-Agency/the-fluid-theme/releases/tag/v0.3.0
158
+ [0.4.2]: https://github.com/Agile-Media-Agency/the-fluid-theme/compare/v0.4.1...v0.4.2
159
+ [0.4.3]: https://github.com/Agile-Media-Agency/the-fluid-theme/compare/v0.4.2...v0.4.3
package/CLAUDE.md ADDED
@@ -0,0 +1,104 @@
1
+ # CLAUDE.md
2
+
3
+ > **Fluid Framework** — A modern, semantic CSS design system built on physics principles, not utility classes.
4
+
5
+ ## Before Doing Anything
6
+
7
+ 1. Read `fluid-agent-kit/skills/` — 4 skill files covering CSS conventions, UX rules, accessibility, and image optimization
8
+ 2. Read `_docs/DEVELOPMENT.md` — master development guide
9
+ 3. Read `_docs/UX-BEHAVIOR-SPEC.md` — 18-section behavioral specification (skim first, deep-read relevant sections)
10
+
11
+ ## Quick Reference
12
+
13
+ ```bash
14
+ npm run serve # Open examples in browser at localhost:8080
15
+ ```
16
+
17
+ ## What This Is
18
+
19
+ A CSS framework that proves modern CSS can replace the utility-class approach of Tailwind/Bootstrap:
20
+
21
+ - **Semantic HTML** over `<div class="flex flex-col p-4">` soup
22
+ - **CSS Custom Properties** for runtime theming (no rebuild needed)
23
+ - **Complete presets** that change typography, colors, motion, AND layout
24
+ - **Dark mode uses deep palette colors**, not just black
25
+ - **No build step** — link one CSS file and go
26
+
27
+ ## Core Principles
28
+
29
+ 1. **Semantic HTML** — Use meaningful elements, not div soup
30
+ 2. **CSS Custom Properties** — All values via tokens (`var(--space-5)`)
31
+ 3. **Logical Properties** — `margin-block`, `padding-inline` (not `-top`, `-left`)
32
+ 4. **No Build Step** — Works directly in browsers
33
+ 5. **Progressive Enhancement** — Works without JavaScript
34
+ 6. **Presets are complete experiences** — Not just color swaps
35
+ 7. **Accessibility is non-negotiable** — Connected to disabled and autism communities
36
+
37
+ ## Layer Order
38
+
39
+ ```css
40
+ @layer reset, tokens, base, layouts, components, themes, utilities;
41
+ ```
42
+
43
+ ## Key Files
44
+
45
+ | File | Purpose |
46
+ |------|---------|
47
+ | `src/fluid.css` | Main entry point (imports everything) |
48
+ | `src/core/tokens.css` | Design tokens, palettes, presets |
49
+ | `src/components/` | 23 component CSS files |
50
+ | `src/sections/` | 6 section CSS files |
51
+ | `templates/` | 18 HTML templates |
52
+ | `examples/` | Live component demos |
53
+ | `_docs/UX-BEHAVIOR-SPEC.md` | UX behavioral rules (18 sections) |
54
+ | `_docs/images-guide.md` | Image optimization best practices |
55
+ | `fluid-agent-kit/` | AI agent skills and conventions |
56
+
57
+ ## The Fluid Agent Kit
58
+
59
+ This project includes the **Fluid Agent Kit** (`fluid-agent-kit/`) with skill files for AI coding assistants. See `fluid-agent-kit/README.md` for details.
60
+
61
+ **Available skills:**
62
+ - `fluid-agent-kit/skills/css-conventions.md` — Layer order, tokens, logical properties
63
+ - `fluid-agent-kit/skills/ux-rules.md` — 12 behavioral rules for interactive components
64
+ - `fluid-agent-kit/skills/accessibility.md` — HTML, keyboard, motion, color standards
65
+ - `fluid-agent-kit/skills/image-optimization.md` — Responsive images, lazy loading, focal points
66
+
67
+ ## UX Behavior Spec
68
+
69
+ Full spec at `_docs/UX-BEHAVIOR-SPEC.md`. Quick reference at `fluid-agent-kit/skills/ux-rules.md`.
70
+
71
+ **The non-negotiables:**
72
+ - Every destructive action requires a confirmation modal with specific title and consequence body
73
+ - Every user action requires visible feedback (toast, alert, or state change)
74
+ - Every button requires a specific label ("Save Changes" not "Submit")
75
+ - Every pattern must be consistent across all screens (search and update all instances)
76
+ - Every interactive element must be keyboard accessible with visible focus
77
+ - Every animation must respect `prefers-reduced-motion`
78
+
79
+ ## Image Optimization
80
+
81
+ Full guide at `_docs/images-guide.md`. Quick reference at `fluid-agent-kit/skills/image-optimization.md`.
82
+
83
+ **The non-negotiables:**
84
+ - Every `<img>` must have `width` and `height` attributes (prevents CLS)
85
+ - Every below-fold image must have `loading="lazy"`
86
+ - Every image must have meaningful `alt` text
87
+ - Use `data-focus` for focal point control on hero backgrounds and card media
88
+ - Use `data-aspect` for consistent aspect ratios on card media
89
+ - Serve modern formats (WebP/AVIF) with `<picture>` fallbacks
90
+
91
+ ## Documentation
92
+
93
+ | Document | What It Covers |
94
+ |----------|----------------|
95
+ | [DEVELOPMENT.md](_docs/DEVELOPMENT.md) | Master guide — read first |
96
+ | [UX-BEHAVIOR-SPEC.md](_docs/UX-BEHAVIOR-SPEC.md) | Behavioral rules — 18 sections |
97
+ | [images-guide.md](_docs/images-guide.md) | Image optimization best practices |
98
+ | [architecture.md](_docs/architecture.md) | Technical decisions |
99
+ | [reference/components.md](_docs/reference/components.md) | Component API |
100
+ | [reference/tokens.md](_docs/reference/tokens.md) | Design token reference |
101
+
102
+ ## Version
103
+
104
+ **Current: 0.4.1** — Update in package.json, PROJECT_STATUS.md, CHANGELOG.md, _config.yml, and version badges on every session that modifies files.
package/GEMINI.md ADDED
@@ -0,0 +1,48 @@
1
+ # Gemini Instructions — The Fluid Theme
2
+
3
+ You are working with **The Fluid Theme**, a semantic CSS design system built on physics principles.
4
+
5
+ ## Read These First
6
+
7
+ 1. `fluid-agent-kit/skills/css-conventions.md` — CSS rules and token system
8
+ 2. `fluid-agent-kit/skills/accessibility.md` — Accessibility standards
9
+ 3. `fluid-agent-kit/skills/ux-rules.md` — UX behavioral rules
10
+ 4. `fluid-agent-kit/skills/image-optimization.md` — Image best practices
11
+
12
+ ## Core Rules
13
+
14
+ ### CSS
15
+ - Layer order: `@layer reset, tokens, base, layouts, components, themes, utilities;`
16
+ - All values from design tokens: `var(--space-4)` not `16px`
17
+ - Logical properties only: `margin-block-start` not `margin-top`
18
+ - Variants via data attributes: `data-variant="danger"` not `.btn--danger`
19
+ - Components in `@layer components { }`
20
+
21
+ ### HTML
22
+ - Semantic elements: `<article class="card">` not `<div class="flex flex-col">`
23
+ - Native `<dialog>` for modals (automatic focus trapping via `.showModal()`)
24
+ - Every `<img>` needs `alt`, `width`, `height`
25
+ - `loading="lazy"` on all below-fold images
26
+ - Use `data-focus` for image focal points, `data-aspect` for aspect ratios
27
+
28
+ ### Accessibility (Non-Negotiable)
29
+ - Never remove `:focus-visible` outlines
30
+ - `prefers-reduced-motion: reduce` in every animated component
31
+ - 44x44px minimum touch targets
32
+ - Color alone never conveys information
33
+
34
+ ### UX Behavior
35
+ - Destructive actions require confirmation modals
36
+ - Every action produces visible feedback
37
+ - Specific button labels only ("Save Changes" not "Submit")
38
+ - Validate forms on blur, then keystroke after first error
39
+
40
+ ## Documentation
41
+
42
+ - `_docs/DEVELOPMENT.md` — Master guide
43
+ - `_docs/UX-BEHAVIOR-SPEC.md` — Full UX specification
44
+ - `_docs/images-guide.md` — Image optimization guide
45
+ - `_docs/reference/components.md` — Component API
46
+ - `_docs/reference/tokens.md` — Token reference
47
+
48
+ ## Version: 0.4.0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Agile Media Agency
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,253 @@
1
+ # The Fluid Theme Framework
2
+
3
+ **[TheFluidTheme.com](https://thefluidtheme.com)** | [Live Components](https://thefluidtheme.com/examples/components.html) | [Live Foundation](https://thefluidtheme.com/examples/foundation.html) | [Templates](https://thefluidtheme.com/templates/)
4
+
5
+ ## A Physics-Based Design System
6
+
7
+ A modern approach to web theming built on **fluid dynamics principles**. Every animation, transition, and interaction is governed by real physics — viscosity, displacement, surface tension, momentum, and friction.
8
+
9
+ > *"There HAS to be a better way..." — And now there is.*
10
+
11
+ ## What Makes This Different
12
+
13
+ Most design systems pick arbitrary animation timings. We use **Reynolds numbers** — the same physics that determines whether water flows smoothly or turbulently:
14
+
15
+ | Motion Style | Reynolds | Behavior |
16
+ |-------------|----------|----------|
17
+ | **Still** | 0 | No motion, instant state changes |
18
+ | **Serene** | ~10 | Slow, meditative, Ken Burns |
19
+ | **Stream** | ~100 | Laminar flow, smooth and predictable |
20
+ | **Flowing** | ~500 | Organic ease-in-out |
21
+ | **Cascade** | ~1000 | Transitional, gentle waterfalls |
22
+ | **Rapids** | ~5000 | Turbulent, energetic with resistance |
23
+ | **Tsunami** | ~50000 | Massive force, dramatic displacement |
24
+
25
+ ## Installation
26
+
27
+ ### CDN (recommended for quick start)
28
+
29
+ **jsDelivr** (recommended):
30
+ ```html
31
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fluid-theme/core/dist/fluid.min.css">
32
+ ```
33
+
34
+ **unpkg:**
35
+ ```html
36
+ <link rel="stylesheet" href="https://unpkg.com/@fluid-theme/core/dist/fluid.min.css">
37
+ ```
38
+
39
+ ### npm
40
+
41
+ ```bash
42
+ npm install @fluid-theme/core
43
+ ```
44
+
45
+ Then in your HTML:
46
+ ```html
47
+ <!-- Production (minified) -->
48
+ <link rel="stylesheet" href="node_modules/@fluid-theme/core/dist/fluid.min.css">
49
+
50
+ <!-- Source (readable, for customisation) -->
51
+ <link rel="stylesheet" href="node_modules/@fluid-theme/core/src/fluid.css">
52
+ ```
53
+
54
+ Or in a bundler (Vite, Webpack, etc.):
55
+ ```js
56
+ import '@fluid-theme/core';
57
+ ```
58
+
59
+ ### Download
60
+
61
+ Grab the latest release from the [GitHub Releases](https://github.com/Agile-Media-Agency/the-fluid-theme/releases) page.
62
+
63
+ ## Quick Start
64
+
65
+ ```html
66
+ <!-- Link the CSS -->
67
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fluid-theme/core/dist/fluid.min.css">
68
+
69
+ <!-- Set your preferences -->
70
+ <body data-theme="dark" data-motion="cascade" data-palette="fluid" data-accent="1">
71
+
72
+ <!-- Use semantic HTML -->
73
+ <article class="card">
74
+ <div class="card__content">
75
+ <h2 class="card__title">Clean and Semantic</h2>
76
+ <p class="card__description">No utility class soup needed.</p>
77
+ </div>
78
+ </article>
79
+ ```
80
+
81
+ ```bash
82
+ # Local development
83
+ npm run serve # Opens at localhost:8080
84
+ ```
85
+
86
+ ## Core Features
87
+
88
+ ### Motion System
89
+ Seven physics-based animation styles:
90
+ - **Still** — Reduced motion, instant transitions
91
+ - **Serene** — Slow, meditative Ken Burns (1200ms)
92
+ - **Stream** — Smooth, laminar animations (800ms)
93
+ - **Flowing** — Organic ease-in-out (600ms)
94
+ - **Cascade** — Gentle waterfall effects (500ms)
95
+ - **Rapids** — Turbulent with friction and drag (300ms)
96
+ - **Tsunami** — Dramatic rise, crest, and crash (400ms)
97
+
98
+ ### 23 Components
99
+ Buttons, Cards, Navigation, Forms, Heroes, Indicators, Scroll Progress, Settings Panel, Themed Images, Modal/Dialog, Tooltip/Popover, Accordion, Alert/Toast, Table, Avatar, Loading/Skeleton, Dropdown
100
+
101
+ ### Color Palettes
102
+ Ten curated palettes, each with 6 accent colors:
103
+
104
+ | Palette | Vibe |
105
+ |---------|------|
106
+ | **Fluid** | Water-themed, auto-links to motion style |
107
+ | **Morandi** | Muted, sophisticated Italian aesthetics |
108
+ | **Bold** | High saturation, confident primaries |
109
+ | **Pastel** | Soft, approachable pastels |
110
+ | **Earth** | Natural, organic tones |
111
+ | **Mono** | Grayscale with subtle warmth |
112
+ | **80s** | Neon retrowave |
113
+ | **Matrix** | Cyberpunk greens |
114
+ | **Subtle** | Nearly neutral, whisper quiet |
115
+ | **Tsunami** | Deep ocean palette (Hokusai-inspired) |
116
+
117
+ ### Theme Modes
118
+ - **Light** — Clean, high contrast
119
+ - **Dark** — Easy on the eyes
120
+ - **Auto** — Follows system preference
121
+ - **Subdued** — Low contrast for any mode (OKLCH-based)
122
+
123
+ ### Layout System
124
+ - **Flex utilities** — Direction, wrap, grow/shrink, basis
125
+ - **Grid utilities** — 2/3/4 columns, auto-fit responsive, span
126
+ - **Layout patterns** — Sidebar, holy grail, dashboard
127
+ - **Position utilities** — Sticky, z-index, overflow, responsive visibility
128
+
129
+ ### Image Optimization
130
+
131
+ Built-in CSS utilities for responsive, performant images:
132
+
133
+ - **Focal point control** — `data-focus="top|bottom|left|right|center"` on hero backgrounds and card media
134
+ - **Custom focal points** — `--focus-x` / `--focus-y` CSS custom properties
135
+ - **Aspect ratios** — `data-aspect="square|video|portrait|wide"` on `.card__media`
136
+ - **Image protection** — `data-protected` blocks casual right-click saving (not DRM)
137
+ - **Orientation-aware** — `data-orientation="landscape|portrait"` shows/hides based on viewport
138
+ - **Lazy loading** — all templates use `loading="lazy"` on below-fold images
139
+ - **Dimensions** — all `<img>` tags include `width`/`height` for CLS prevention
140
+
141
+ See `_docs/images-guide.md` for the full guide including `<picture>` patterns, `srcset`, format recommendations (AVIF > WebP > JPEG), and stack-specific solutions.
142
+
143
+ ### CSS Architecture
144
+ ```css
145
+ @layer reset, tokens, base, layouts, components, themes, utilities;
146
+ ```
147
+
148
+ Modern CSS features throughout:
149
+ - **OKLCH colors** with `color-mix()` for derived shades
150
+ - **Logical properties** (`margin-block`, `padding-inline`)
151
+ - **Container queries** for component-level responsiveness
152
+ - **View Transitions API** for page transitions
153
+ - **CSS Custom Properties** for runtime theming
154
+
155
+ ## The Fluid Agent Kit
156
+
157
+ This project ships with the **Fluid Agent Kit** (`fluid-agent-kit/`) — skill files that help AI coding assistants produce correct Fluid Theme code.
158
+
159
+ | Skill | What It Covers |
160
+ |-------|----------------|
161
+ | CSS Conventions | Layer order, tokens, logical properties, data attributes |
162
+ | UX Rules | 12 behavioral rules for interactive components |
163
+ | Accessibility | HTML, keyboard, motion, touch, color standards |
164
+ | Image Optimization | Responsive images, lazy loading, focal points, formats |
165
+
166
+ Works automatically with **Claude Code** (reads `CLAUDE.md`), **Gemini** (reads `GEMINI.md`), and any AI assistant that reads project-level instructions (reads `AGENTS.md`).
167
+
168
+ ## Project Structure
169
+
170
+ ```
171
+ the-fluid-theme/
172
+ ├── fluid-agent-kit/ # AI coding assistant skills
173
+ │ ├── README.md # Kit overview
174
+ │ └── skills/ # CSS, UX, a11y, image skills
175
+ ├── _docs/ # Documentation
176
+ │ ├── _start-here.md # Full documentation
177
+ │ ├── images-guide.md # Image optimization guide
178
+ │ └── reference/ # Component + layout API docs
179
+ ├── _includes/ # Jekyll includes
180
+ ├── src/
181
+ │ ├── core/
182
+ │ │ ├── reset.css # Modern reset
183
+ │ │ ├── tokens.css # Design tokens + motion + palettes
184
+ │ │ └── base.css # Base element styles
185
+ │ ├── components/ # 23 UI components
186
+ │ ├── layouts/ # Layout patterns + utilities
187
+ │ ├── animations/ # Scroll reveal system
188
+ │ └── fluid.css # Main entry point
189
+ ├── examples/ # 7 demo pages
190
+ ├── templates/ # 18 page templates
191
+ ├── CLAUDE.md # Claude Code instructions
192
+ ├── GEMINI.md # Google Gemini instructions
193
+ └── AGENTS.md # Agent-agnostic instructions
194
+ ```
195
+
196
+ ## Data Attributes
197
+
198
+ Control everything via HTML attributes:
199
+
200
+ ```html
201
+ <body
202
+ data-theme="dark" <!-- light | dark | auto -->
203
+ data-motion="cascade" <!-- still | serene | stream | flowing | cascade | rapids | tsunami -->
204
+ data-palette="fluid" <!-- fluid | morandi | bold | pastel | earth | mono | 80s | matrix | subtle | tsunami -->
205
+ data-accent="1" <!-- 1-6, selects from current palette -->
206
+ data-contrast="normal" <!-- normal | subdued -->
207
+ >
208
+ ```
209
+
210
+ ## Philosophy
211
+
212
+ **Semantic First** — Use `<article class="card">` not `<div class="flex flex-col p-4 m-2 rounded-lg shadow-md">`
213
+
214
+ **Progressive Enhancement** — Everything works without JavaScript, then enhances gracefully
215
+
216
+ **Zero Build Step** — No compilation needed, works directly in browsers
217
+
218
+ **Physics-Based** — Animations feel natural because they follow natural laws
219
+
220
+ **Accessibility Built-In** — `prefers-reduced-motion` respected, WCAG 2.1 AA focused
221
+
222
+ ## Development Status
223
+
224
+ - [x] **Phase 1: Foundation** — Reset, tokens, base styles
225
+ - [x] **Phase 2: Core Components** — Buttons, cards, nav, forms, heroes, indicators (9 components)
226
+ - [x] **Phase 3: Extended Components + Layouts** — Modal, tooltip, accordion, alert, table, avatar, loading, dropdown + flex/grid utilities (17 total)
227
+ - [x] **Phase 4: Documentation** — Getting started guide, installation, tutorials, image optimization guide
228
+ - [x] **Phase 5: Distribution** — npm publish, CDN, Fluid Agent Kit for AI assistants
229
+
230
+ **Current**: v0.4.2 — See [PROJECT_STATUS.md](PROJECT_STATUS.md) for details.
231
+
232
+ ## Browser Support
233
+
234
+ Modern browsers: Chrome 120+, Firefox 120+, Safari 16.4+, Edge 120+
235
+
236
+ ## Documentation
237
+
238
+ - **[TheFluidTheme.com](https://thefluidtheme.com)** — Live demo site
239
+ - **[Getting Started](_docs/getting-started.md)** — Installation and first steps
240
+ - **[Full Documentation](_docs/_start-here.md)** — Complete guide
241
+ - **[Component Reference](_docs/reference/components.md)** — All 23 components
242
+ - **[Positioning Reference](_docs/reference/positioning.md)** — Layout system
243
+ - **[Tokens Reference](_docs/reference/tokens.md)** — Design tokens
244
+ - **[Public Readiness Roadmap](FRAMEWORK_READINESS.md)** — Launch plan
245
+ - **[Executive Summary](SUMMARY.md)** — Quick overview
246
+
247
+ ## License
248
+
249
+ MIT — Use it, modify it, make it yours.
250
+
251
+ ---
252
+
253
+ **Version 0.4.2** | **[TheFluidTheme.com](https://thefluidtheme.com)** | Built with physics and 32 years of design experience.