@classic-homes/theme-styles 0.1.52 → 0.1.54
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/package.json +3 -2
- package/src/accessibility.css +1 -1
- package/src/base.css +15 -2
- package/src/utilities.css +22 -84
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@classic-homes/theme-styles",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.54",
|
|
4
4
|
"description": "Base styles and utilities for the Classic Theme design system",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
"access": "public"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
|
-
"@classic-homes/theme-tokens": "*"
|
|
37
|
+
"@classic-homes/theme-tokens": "*",
|
|
38
|
+
"tailwindcss": ">=3.0.0"
|
|
38
39
|
}
|
|
39
40
|
}
|
package/src/accessibility.css
CHANGED
package/src/base.css
CHANGED
|
@@ -6,7 +6,18 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
@layer classic-theme.base {
|
|
9
|
-
/*
|
|
9
|
+
/*
|
|
10
|
+
* Import brand fonts from Google Fonts.
|
|
11
|
+
*
|
|
12
|
+
* PERFORMANCE NOTE: This @import inside a CSS layer causes a render-blocking
|
|
13
|
+
* network request. For best performance, load fonts via <link> in your HTML <head>:
|
|
14
|
+
*
|
|
15
|
+
* <link rel="preconnect" href="https://fonts.googleapis.com">
|
|
16
|
+
* <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
17
|
+
* <link href="https://fonts.googleapis.com/css2?family=Figtree:wght@300;400;500;600;700;900&family=Source+Serif+4:opsz,wght@8..60,400;8..60,600;8..60,700&display=swap" rel="stylesheet">
|
|
18
|
+
*
|
|
19
|
+
* If you load fonts via HTML, you can safely remove this @import.
|
|
20
|
+
*/
|
|
10
21
|
@import url('https://fonts.googleapis.com/css2?family=Figtree:wght@300;400;500;600;700;900&family=Source+Serif+4:opsz,wght@8..60,400;8..60,600;8..60,700&display=swap');
|
|
11
22
|
|
|
12
23
|
/* Base HTML setup */
|
|
@@ -91,7 +102,9 @@
|
|
|
91
102
|
a {
|
|
92
103
|
color: hsl(var(--primary));
|
|
93
104
|
text-decoration: none;
|
|
94
|
-
transition:
|
|
105
|
+
/* No color transition: interpolating between base and hover colors renders
|
|
106
|
+
off-palette intermediate frames that read as flicker when sweeping across
|
|
107
|
+
adjacent links (menus, sidebars, lists). Hover color changes must snap. */
|
|
95
108
|
}
|
|
96
109
|
|
|
97
110
|
a:hover {
|
package/src/utilities.css
CHANGED
|
@@ -68,12 +68,11 @@
|
|
|
68
68
|
transition-duration: 150ms;
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
/* Menu item transition (for sidebar/nav items)
|
|
71
|
+
/* Menu item transition (for sidebar/nav items).
|
|
72
|
+
Transform only — color/background transitions on hover produce visible
|
|
73
|
+
off-palette intermediate frames (flicker) when sweeping across items. */
|
|
72
74
|
.transition-menu-item {
|
|
73
|
-
transition:
|
|
74
|
-
background-color 150ms ease,
|
|
75
|
-
color 150ms ease,
|
|
76
|
-
transform 100ms ease;
|
|
75
|
+
transition: transform 100ms ease;
|
|
77
76
|
}
|
|
78
77
|
|
|
79
78
|
/* ===== Text Utilities ===== */
|
|
@@ -165,85 +164,24 @@
|
|
|
165
164
|
0 2px 4px -2px rgb(0 0 0 / 0.1);
|
|
166
165
|
}
|
|
167
166
|
|
|
168
|
-
/*
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
animation:
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
/* Pulse animation */
|
|
189
|
-
@keyframes pulse {
|
|
190
|
-
0%,
|
|
191
|
-
100% {
|
|
192
|
-
opacity: 1;
|
|
193
|
-
}
|
|
194
|
-
50% {
|
|
195
|
-
opacity: 0.5;
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
.animate-pulse {
|
|
200
|
-
animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
/* Fade in animation */
|
|
204
|
-
@keyframes fade-in {
|
|
205
|
-
from {
|
|
206
|
-
opacity: 0;
|
|
207
|
-
}
|
|
208
|
-
to {
|
|
209
|
-
opacity: 1;
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
.animate-fade-in {
|
|
214
|
-
animation: fade-in 200ms ease-out;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
/* Slide up animation */
|
|
218
|
-
@keyframes slide-up {
|
|
219
|
-
from {
|
|
220
|
-
opacity: 0;
|
|
221
|
-
transform: translateY(10px);
|
|
222
|
-
}
|
|
223
|
-
to {
|
|
224
|
-
opacity: 1;
|
|
225
|
-
transform: translateY(0);
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
.animate-slide-up {
|
|
230
|
-
animation: slide-up 200ms ease-out;
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
/* Slide down animation */
|
|
234
|
-
@keyframes slide-down {
|
|
235
|
-
from {
|
|
236
|
-
opacity: 0;
|
|
237
|
-
transform: translateY(-10px);
|
|
238
|
-
}
|
|
239
|
-
to {
|
|
240
|
-
opacity: 1;
|
|
241
|
-
transform: translateY(0);
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
.animate-slide-down {
|
|
246
|
-
animation: slide-down 200ms ease-out;
|
|
167
|
+
/*
|
|
168
|
+
* Animation keyframes and utility classes (spin, pulse, fade-in, slide-up,
|
|
169
|
+
* slide-down, progress-indeterminate, shimmer) are defined in the Tailwind
|
|
170
|
+
* preset (tailwind-preset/index.js) as the single source of truth.
|
|
171
|
+
*
|
|
172
|
+
* The shimmer utility below requires custom background styling beyond
|
|
173
|
+
* what Tailwind's animation config provides, so it remains here.
|
|
174
|
+
*/
|
|
175
|
+
|
|
176
|
+
.animate-shimmer {
|
|
177
|
+
background-image: linear-gradient(
|
|
178
|
+
90deg,
|
|
179
|
+
hsl(var(--muted)) 0%,
|
|
180
|
+
hsl(var(--muted-foreground) / 0.08) 50%,
|
|
181
|
+
hsl(var(--muted)) 100%
|
|
182
|
+
);
|
|
183
|
+
background-size: 200% 100%;
|
|
184
|
+
animation: shimmer 2s linear infinite;
|
|
247
185
|
}
|
|
248
186
|
|
|
249
187
|
/* ===== Print Utilities ===== */
|