@classic-homes/theme-styles 0.1.53 → 0.1.55

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@classic-homes/theme-styles",
3
- "version": "0.1.53",
3
+ "version": "0.1.55",
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
  }
@@ -26,7 +26,7 @@
26
26
  select:focus-visible,
27
27
  textarea:focus-visible,
28
28
  a:focus-visible {
29
- border-radius: var(--radius, 0.25rem);
29
+ border-radius: var(--radius, 0.5rem);
30
30
  }
31
31
 
32
32
  /* ===== Reduced Motion (WCAG 2.3.3) ===== */
package/src/base.css CHANGED
@@ -5,10 +5,24 @@
5
5
  * following Classic Homes brand guidelines.
6
6
  */
7
7
 
8
- @layer classic-theme.base {
9
- /* Import brand fonts from Google Fonts */
10
- @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');
8
+ /*
9
+ * Import brand fonts from Google Fonts.
10
+ *
11
+ * This must stay at the top of the file: @import is only valid before any
12
+ * other rule, and browsers silently drop it inside a @layer block.
13
+ *
14
+ * PERFORMANCE NOTE: This @import causes a render-blocking network request.
15
+ * For best performance, load fonts via <link> in your HTML <head>:
16
+ *
17
+ * <link rel="preconnect" href="https://fonts.googleapis.com">
18
+ * <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
19
+ * <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">
20
+ *
21
+ * If you load fonts via HTML, you can safely remove this @import.
22
+ */
23
+ @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
24
 
25
+ @layer classic-theme.base {
12
26
  /* Base HTML setup */
13
27
  html {
14
28
  font-family: var(
@@ -91,7 +105,9 @@
91
105
  a {
92
106
  color: hsl(var(--primary));
93
107
  text-decoration: none;
94
- transition: color 0.2s ease;
108
+ /* No color transition: interpolating between base and hover colors renders
109
+ off-palette intermediate frames that read as flicker when sweeping across
110
+ adjacent links (menus, sidebars, lists). Hover color changes must snap. */
95
111
  }
96
112
 
97
113
  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,112 +164,14 @@
165
164
  0 2px 4px -2px rgb(0 0 0 / 0.1);
166
165
  }
167
166
 
168
- /* ===== Animation Utilities ===== */
169
-
170
- /* Spin animation */
171
- @keyframes spin {
172
- from {
173
- transform: rotate(0deg);
174
- }
175
- to {
176
- transform: rotate(360deg);
177
- }
178
- }
179
-
180
- .animate-spin {
181
- animation: spin 1s linear infinite;
182
- }
183
-
184
- .animate-spin-slow {
185
- animation: spin 2s linear infinite;
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;
247
- }
248
-
249
- /* ===== Loading Animation Utilities ===== */
250
-
251
- /* Progress bar indeterminate */
252
- @keyframes progress-indeterminate {
253
- 0% {
254
- transform: translateX(-100%);
255
- }
256
- 100% {
257
- transform: translateX(400%);
258
- }
259
- }
260
-
261
- .animate-progress-indeterminate {
262
- animation: progress-indeterminate 1.5s ease-in-out infinite;
263
- }
264
-
265
- /* Skeleton shimmer */
266
- @keyframes shimmer {
267
- 0% {
268
- background-position: -200% 0;
269
- }
270
- 100% {
271
- background-position: 200% 0;
272
- }
273
- }
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
+ */
274
175
 
275
176
  .animate-shimmer {
276
177
  background-image: linear-gradient(