Commit 266de32
committed
fix(tailwind): restore v3 hover, blur and breakpoint behaviour
An independent parity audit across light, dark and touch contexts found four
user-visible differences the earlier desktop-only checks could not see.
- hover: v4 wraps `hover:`/`group-hover:`/`peer-hover:` in
`@media (hover: hover)`, so 64 hover-family classes were dead on touch
devices — row highlights, reveal-on-hover icons, nav menus. This codebase
already has `hover-hover` for the cases that want that gating, so plain
`hover:` was meant to apply everywhere. Restored with `@custom-variant hover`.
- blur-0 no longer exists in v4. Two sites used `group-hover:blur-0` to clear a
base `blur-[2px]`, leaving the icon permanently blurred. Renamed to
`blur-none`.
- space-y-* dropped from specificity 0-3-0 to `:where()` 0-0-0 and moved to the
preceding sibling, so a child's own `mt-*` now wins. Two layouts grew 4-8px;
removed the child margins v3 was overriding.
- Breakpoints: v4 emits rem, which resolves against the browser's initial font
size rather than `html { font-size }`, so a reader on a larger default text
size got the mobile layout at desktop widths. Pinned back to v3's px.
Hardening from the same pass:
- `::before`/`::after`/`::backdrop` border-color — v4 leaves them
`currentColor` and the app's `*` rule did not cover pseudo-elements.
- apps/docs was missing the `cn-tables.ts` source exclusion, so its bundle
carried phantom `float-left`, `clear-end` and every `mix-blend-*`.
- Hairline plugin: narrowed to border-width longhands (it could rewrite an
`outline-width` sharing a rule), stopped `\b1px\b` splicing into `0.1px`, and
skipped node_modules stylesheets. Added 18 fixture tests.
- 23 golden-case tests for `cn`, pinning the font-size class group.
- The tables drift check now derives its flags from `cn:build` so the two
cannot diverge, uses the local bin instead of `bun x`, and writes to tmpdir.1 parent aba7b8b commit 266de32
15 files changed
Lines changed: 333 additions & 39 deletions
File tree
- apps
- docs/app
- sim
- app
- (landing)/components
- content-post-page
- hero/components/hero-visual
- _styles
- unsubscribe
- workspace/[workspaceId]
- components/resource/components/resource-header
- home/components/user-input/components/mic-button
- logs/components/log-details
- lib/postcss
- packages
- emcn/src/lib
- workflow-renderer/src/note
- scripts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
8 | 15 | | |
9 | 16 | | |
10 | 17 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
104 | | - | |
| 104 | + | |
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
45 | 54 | | |
46 | 55 | | |
47 | 56 | | |
| |||
77 | 86 | | |
78 | 87 | | |
79 | 88 | | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
80 | 101 | | |
81 | 102 | | |
82 | 103 | | |
| |||
1034 | 1055 | | |
1035 | 1056 | | |
1036 | 1057 | | |
1037 | | - | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
1038 | 1068 | | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
1039 | 1072 | | |
1040 | 1073 | | |
1041 | 1074 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | | - | |
| 127 | + | |
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
540 | 540 | | |
541 | 541 | | |
542 | 542 | | |
543 | | - | |
544 | | - | |
| 543 | + | |
| 544 | + | |
545 | 545 | | |
546 | 546 | | |
547 | 547 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
105 | | - | |
| 105 | + | |
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
113 | | - | |
| 113 | + | |
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
516 | 516 | | |
517 | 517 | | |
518 | 518 | | |
519 | | - | |
520 | | - | |
| 519 | + | |
| 520 | + | |
521 | 521 | | |
522 | 522 | | |
523 | 523 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
36 | 60 | | |
37 | 61 | | |
38 | 62 | | |
| |||
62 | 86 | | |
63 | 87 | | |
64 | 88 | | |
65 | | - | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
66 | 95 | | |
67 | 96 | | |
68 | 97 | | |
69 | | - | |
70 | | - | |
| 98 | + | |
| 99 | + | |
71 | 100 | | |
72 | | - | |
| 101 | + | |
73 | 102 | | |
74 | 103 | | |
75 | 104 | | |
| |||
0 commit comments