Repository navigation
fix: give the tinted error and callout boxes a tint Tailwind 3 can build - #416
Merged
anurag629 merged 1 commit intoOct 28, 2026
Conversation
Classes like border-[var(--rose)]/30 and bg-[var(--rose)]/5 build no CSS in Tailwind 3, which cannot put an opacity on a var() colour, so 32 of them in 12 files left the boxes with the default grey border and no tint. They now use border-tint-rose-30 and bg-tint-rose-5 style classes, which tailwind.config.ts defines as a color-mix of the accent with transparent. A test fails if a [var(--x)]/NN class comes back, and checks that Tailwind builds every tint class the source uses. Closes codercops#411
anurag629
approved these changes
Oct 28, 2026
anurag629
left a comment
Member
There was a problem hiding this comment.
Thanks @Saifjafri212213, clean fix. Lint (develop's 11 warnings), all 2432 tests, the build and the pages pass on top of develop. The built CSS now has the tint rules (color-mix(in srgb, var(--violet) 10%, transparent) and so on), and on the JWT guide the numbered circles get their violet tint and border in both themes, each following that theme's own violet.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The tinted error boxes and guide callouts never got their tint. Classes like
border-[var(--rose)]/30andbg-[var(--rose)]/5build no CSS in Tailwind 3, because it cannot put an opacity on avar()colour, so the boxes fell back to the default grey border (rgb(229, 231, 235)) with a transparent background.Closes #411
Fix
tailwind.config.tsnow definestintcolours:border-tint-rose-30,bg-tint-rose-5and so on, for the eight accents and the steps 5, 10, 30 and 40. Each iscolor-mix(in srgb, var(--rose) 30%, transparent), so the accent still follows the theme.color-mix()is already used in the project's inline styles, so there is no new browser requirement. To use another percentage, add it toTINT_STEPS.border-[var(--rose)]/30becomesborder-tint-rose-30,bg-[var(--cyan)]/10becomesbg-tint-cyan-10, and so on), so each box keeps its accent, its percentages and its other classes.lib/__tests__/tint-classes.test.tsfails when a[var(--x)]/NNor[var(--x)]/[0.N]class shows up again inapp/,components/orlib/, and checks that Tailwind itself builds every tint class the source uses.How I Tested This
border-[var(--rose)]andtext-[var(--rose)]rules exist, but there is no rule for any[var(--x)]/NNclass. In the built app, the UUID inspector's error box hadborder-top-color: rgb(229, 231, 235)andbackground-color: rgba(0, 0, 0, 0)in both themes.tintnot added to the colours, a different colour space, an opaque mix, the wrong accent) and the guard (ignoring/[0.3], scanning too few folders) each makes a test fail.rgb(255, 77, 109)in the dark theme andrgb(212, 39, 78)in the light one). I triggered each error state for real:next dev), because the two pages did not finish loading in my browser pane with a production build, and the same happens on a cleandevelopbuild, so it is not caused by this change. The classes are the same ones the built app was checked with, and both gave the same computed values.tscis clean, lint is at develop's 11 warnings, the full suite passes (2432 tests) andnext buildsucceeds. The CI check for a BOM or garbled characters finds nothing.AI assistance
An AI coding assistant helped write the fix and the test. I checked the built CSS and the computed styles in a real browser, and ran the checks listed above.