@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.
- package/AGENTS.md +32 -0
- package/CHANGELOG.md +159 -0
- package/CLAUDE.md +104 -0
- package/GEMINI.md +48 -0
- package/LICENSE +21 -0
- package/README.md +253 -0
- package/dist/fluid.min.css +2 -0
- package/fluid-agent-kit/README.md +57 -0
- package/fluid-agent-kit/skills/accessibility.md +41 -0
- package/fluid-agent-kit/skills/css-conventions.md +51 -0
- package/fluid-agent-kit/skills/image-optimization.md +115 -0
- package/fluid-agent-kit/skills/ux-rules.md +43 -0
- package/package.json +68 -0
- package/src/animations/scroll-reveal.css +224 -0
- package/src/components/accordion.css +250 -0
- package/src/components/alert.css +453 -0
- package/src/components/avatar.css +192 -0
- package/src/components/badge.css +182 -0
- package/src/components/button.css +387 -0
- package/src/components/card.css +650 -0
- package/src/components/chip.css +143 -0
- package/src/components/dropdown.css +335 -0
- package/src/components/empty-state.css +105 -0
- package/src/components/form.css +508 -0
- package/src/components/hero.css +293 -0
- package/src/components/indicator.css +455 -0
- package/src/components/loading.css +274 -0
- package/src/components/modal.css +364 -0
- package/src/components/nav.css +726 -0
- package/src/components/scroll-progress.css +104 -0
- package/src/components/search-input.css +125 -0
- package/src/components/settings-panel.css +603 -0
- package/src/components/step-indicator.css +188 -0
- package/src/components/table.css +350 -0
- package/src/components/themed-images.css +229 -0
- package/src/components/tooltip.css +247 -0
- package/src/components/version-badge.css +70 -0
- package/src/core/base.css +884 -0
- package/src/core/reset.css +159 -0
- package/src/core/tokens.css +2416 -0
- package/src/fluid.css +242 -0
- package/src/layouts/positioning.css +626 -0
- package/src/sections/cta.css +210 -0
- package/src/sections/features.css +356 -0
- package/src/sections/footer.css +283 -0
- package/src/sections/stats.css +234 -0
- package/src/sections/team.css +181 -0
- package/src/sections/testimonials.css +251 -0
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fluid Framework - Hero Component
|
|
3
|
+
* @layer components
|
|
4
|
+
*
|
|
5
|
+
* Full-width hero sections for landing pages and page headers.
|
|
6
|
+
* Uses the positioning system for layout - just add data attributes.
|
|
7
|
+
*
|
|
8
|
+
* Philosophy:
|
|
9
|
+
* - The hero is a canvas, not a constraint
|
|
10
|
+
* - Backgrounds, overlays, and content are separate concerns
|
|
11
|
+
* - Serene presence, not aggressive attention-seeking
|
|
12
|
+
*
|
|
13
|
+
* Usage:
|
|
14
|
+
* <section class="hero" data-layout="center" data-padding="xl">
|
|
15
|
+
* <h1>Headline</h1>
|
|
16
|
+
* <p>Subheadline</p>
|
|
17
|
+
* <button>Call to Action</button>
|
|
18
|
+
* </section>
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
@layer components {
|
|
22
|
+
|
|
23
|
+
/* ========================================
|
|
24
|
+
BASE HERO
|
|
25
|
+
A full-width section ready for content
|
|
26
|
+
======================================== */
|
|
27
|
+
|
|
28
|
+
.hero {
|
|
29
|
+
--hero-min-height: 60vh;
|
|
30
|
+
--hero-background: var(--color-surface);
|
|
31
|
+
--hero-text-color: var(--color-text);
|
|
32
|
+
|
|
33
|
+
position: relative;
|
|
34
|
+
min-block-size: var(--hero-min-height);
|
|
35
|
+
background-color: var(--hero-background);
|
|
36
|
+
color: var(--hero-text-color);
|
|
37
|
+
overflow: hidden;
|
|
38
|
+
container-type: inline-size;
|
|
39
|
+
|
|
40
|
+
/* Inline padding to prevent text touching edges */
|
|
41
|
+
padding-inline: var(--space-5);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/* Ensure content stays above backgrounds/overlays */
|
|
45
|
+
.hero > * {
|
|
46
|
+
position: relative;
|
|
47
|
+
z-index: var(--z-raised);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
/* ========================================
|
|
52
|
+
HERO SIZES
|
|
53
|
+
Control the visual impact
|
|
54
|
+
======================================== */
|
|
55
|
+
|
|
56
|
+
.hero[data-size="compact"] {
|
|
57
|
+
--hero-min-height: 40vh;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.hero[data-size="full"] {
|
|
61
|
+
--hero-min-height: 100vh;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.hero[data-size="auto"] {
|
|
65
|
+
--hero-min-height: auto;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
/* ========================================
|
|
70
|
+
HERO CONTENT
|
|
71
|
+
Structured content within the hero
|
|
72
|
+
======================================== */
|
|
73
|
+
|
|
74
|
+
.hero__content {
|
|
75
|
+
max-inline-size: var(--content-width, var(--container-md));
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.hero__headline {
|
|
79
|
+
/* Fluid scaling: smooth transition across all viewport sizes */
|
|
80
|
+
font-size: clamp(2rem, 1rem + 5vw, 3.5rem);
|
|
81
|
+
font-weight: var(--weight-bold);
|
|
82
|
+
letter-spacing: -0.03em;
|
|
83
|
+
line-height: var(--leading-tight);
|
|
84
|
+
margin-block-end: var(--space-4);
|
|
85
|
+
text-wrap: balance; /* Prevent orphans in headlines */
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.hero__subheadline {
|
|
89
|
+
/* Fluid scaling for subheadlines */
|
|
90
|
+
font-size: clamp(1.125rem, 0.875rem + 1.5vw, 1.5rem);
|
|
91
|
+
color: var(--hero-text-muted, var(--color-text-muted));
|
|
92
|
+
line-height: var(--leading-relaxed);
|
|
93
|
+
margin-block-end: var(--space-6);
|
|
94
|
+
text-wrap: pretty; /* Better line breaks */
|
|
95
|
+
max-inline-size: 65ch; /* Optimal reading width */
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.hero__actions {
|
|
99
|
+
display: flex;
|
|
100
|
+
flex-wrap: wrap;
|
|
101
|
+
gap: var(--space-4);
|
|
102
|
+
justify-content: inherit;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
/* ========================================
|
|
107
|
+
HERO BACKGROUNDS
|
|
108
|
+
Image and gradient backgrounds
|
|
109
|
+
======================================== */
|
|
110
|
+
|
|
111
|
+
.hero__background {
|
|
112
|
+
position: absolute;
|
|
113
|
+
inset: 0;
|
|
114
|
+
z-index: 0;
|
|
115
|
+
overflow: hidden;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.hero__background img,
|
|
119
|
+
.hero__background video {
|
|
120
|
+
inline-size: 100%;
|
|
121
|
+
block-size: 100%;
|
|
122
|
+
object-fit: cover;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/* Focal point control for hero backgrounds */
|
|
126
|
+
.hero__background[data-focus="top"] img { object-position: center top; }
|
|
127
|
+
.hero__background[data-focus="bottom"] img { object-position: center bottom; }
|
|
128
|
+
.hero__background[data-focus="left"] img { object-position: left center; }
|
|
129
|
+
.hero__background[data-focus="right"] img { object-position: right center; }
|
|
130
|
+
.hero__background[data-focus="center"] img { object-position: center center; }
|
|
131
|
+
|
|
132
|
+
/* Custom focal point via CSS custom properties */
|
|
133
|
+
.hero__background[style*="--focus"] img {
|
|
134
|
+
object-position: var(--focus-x, 50%) var(--focus-y, 50%);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
/* ========================================
|
|
139
|
+
HERO OVERLAY
|
|
140
|
+
Darken backgrounds for text readability
|
|
141
|
+
======================================== */
|
|
142
|
+
|
|
143
|
+
.hero[data-overlay]::before {
|
|
144
|
+
content: "";
|
|
145
|
+
position: absolute;
|
|
146
|
+
inset: 0;
|
|
147
|
+
z-index: 0;
|
|
148
|
+
background: var(--hero-overlay, oklch(0% 0 0 / 0.4));
|
|
149
|
+
pointer-events: none;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/* Overlay intensity presets */
|
|
153
|
+
.hero[data-overlay="light"]::before {
|
|
154
|
+
--hero-overlay: oklch(0% 0 0 / 0.2);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.hero[data-overlay="medium"]::before {
|
|
158
|
+
--hero-overlay: oklch(0% 0 0 / 0.4);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.hero[data-overlay="heavy"]::before {
|
|
162
|
+
--hero-overlay: oklch(0% 0 0 / 0.6);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/* Gradient overlays - subtle fade from bottom */
|
|
166
|
+
.hero[data-overlay="gradient"]::before {
|
|
167
|
+
--hero-overlay: linear-gradient(
|
|
168
|
+
to top,
|
|
169
|
+
oklch(0% 0 0 / 0.6) 0%,
|
|
170
|
+
oklch(0% 0 0 / 0.3) 40%,
|
|
171
|
+
oklch(0% 0 0 / 0) 100%
|
|
172
|
+
);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
/* ========================================
|
|
177
|
+
HERO THEMES
|
|
178
|
+
Pre-designed color schemes
|
|
179
|
+
======================================== */
|
|
180
|
+
|
|
181
|
+
/* Dark hero with light text — derives from page's dark mode colors */
|
|
182
|
+
.hero[data-theme="dark"] {
|
|
183
|
+
--hero-background: color-mix(in oklch, var(--accent) 10%, oklch(12% 0.02 230));
|
|
184
|
+
--hero-text-color: oklch(94% 0.01 220);
|
|
185
|
+
--hero-text-muted: oklch(70% 0.01 220);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
/* Accent color hero */
|
|
189
|
+
.hero[data-theme="accent"] {
|
|
190
|
+
--hero-background: var(--accent);
|
|
191
|
+
--hero-text-color: var(--white);
|
|
192
|
+
--hero-text-muted: oklch(100% 0 0 / 0.85);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/* Subtle/muted hero */
|
|
196
|
+
.hero[data-theme="subtle"] {
|
|
197
|
+
--hero-background: var(--color-surface);
|
|
198
|
+
--hero-text-color: var(--color-text);
|
|
199
|
+
--hero-text-muted: var(--color-text-muted);
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
/* Gradient hero - derives from accent color */
|
|
203
|
+
.hero[data-theme="gradient"] {
|
|
204
|
+
--hero-background: linear-gradient(
|
|
205
|
+
135deg,
|
|
206
|
+
color-mix(in oklch, var(--accent) 30%, oklch(15% 0.02 230)) 0%,
|
|
207
|
+
color-mix(in oklch, var(--accent) 20%, oklch(25% 0.02 230)) 50%,
|
|
208
|
+
color-mix(in oklch, var(--accent) 15%, oklch(35% 0.02 230)) 100%
|
|
209
|
+
);
|
|
210
|
+
--hero-text-color: oklch(95% 0.01 0);
|
|
211
|
+
--hero-text-muted: oklch(80% 0.01 0);
|
|
212
|
+
background: var(--hero-background);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
/* ========================================
|
|
217
|
+
SPLIT HERO
|
|
218
|
+
Content + media side by side
|
|
219
|
+
======================================== */
|
|
220
|
+
|
|
221
|
+
.hero[data-layout="split"] .hero__media,
|
|
222
|
+
.hero[data-layout="split-reverse"] .hero__media {
|
|
223
|
+
block-size: 100%;
|
|
224
|
+
min-block-size: 40vh;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.hero[data-layout="split"] .hero__media img,
|
|
228
|
+
.hero[data-layout="split-reverse"] .hero__media img {
|
|
229
|
+
inline-size: 100%;
|
|
230
|
+
block-size: 100%;
|
|
231
|
+
object-fit: cover;
|
|
232
|
+
border-radius: var(--radius-lg);
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
/* ========================================
|
|
237
|
+
RESPONSIVE BEHAVIOR
|
|
238
|
+
Font sizes use fluid clamp() - no breakpoints needed
|
|
239
|
+
======================================== */
|
|
240
|
+
|
|
241
|
+
@container (max-width: 40rem) {
|
|
242
|
+
/* Actions stack vertically on narrow containers */
|
|
243
|
+
.hero__actions {
|
|
244
|
+
flex-direction: column;
|
|
245
|
+
align-items: stretch;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.hero__actions > * {
|
|
249
|
+
justify-content: center;
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
/* ========================================
|
|
255
|
+
HERO BUTTON CONTRAST
|
|
256
|
+
Ensure buttons are visible on themed backgrounds
|
|
257
|
+
======================================== */
|
|
258
|
+
|
|
259
|
+
/* Dark theme: use light outline buttons for secondary */
|
|
260
|
+
.hero[data-theme="dark"] button[data-variant="outline"],
|
|
261
|
+
.hero[data-theme="gradient"] button[data-variant="outline"] {
|
|
262
|
+
--_btn-color: var(--white);
|
|
263
|
+
--_btn-border: var(--white);
|
|
264
|
+
--_btn-bg-hover: oklch(100% 0 0 / 0.15);
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
/* Accent theme: invert button colors for contrast */
|
|
268
|
+
.hero[data-theme="accent"] button:not([data-variant]) {
|
|
269
|
+
--_btn-color: var(--accent);
|
|
270
|
+
--_btn-bg: var(--white);
|
|
271
|
+
--_btn-bg-hover: var(--gray-95);
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
.hero[data-theme="accent"] button[data-variant="outline"] {
|
|
275
|
+
--_btn-color: var(--white);
|
|
276
|
+
--_btn-border: var(--white);
|
|
277
|
+
--_btn-bg-hover: oklch(100% 0 0 / 0.15);
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
/* ========================================
|
|
282
|
+
REDUCED MOTION
|
|
283
|
+
Respect user preferences
|
|
284
|
+
======================================== */
|
|
285
|
+
|
|
286
|
+
@media (prefers-reduced-motion: reduce) {
|
|
287
|
+
.hero,
|
|
288
|
+
.hero * {
|
|
289
|
+
animation: none !important;
|
|
290
|
+
transition: none !important;
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
}
|