[docs] Use Tailwind utilities and oklch in Tailwind demos instead of CSS variables#4166
Merged
atomiks merged 3 commits intomui:masterfrom Feb 24, 2026
Merged
Conversation
Bundle size report
Check out the code infra dashboard for more information about this PR. |
✅ Deploy Preview for base-ui ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
commit: |
atomiks
reviewed
Feb 23, 2026
docs/src/app/(docs)/react/components/drawer/demos/mobile-nav/tailwind/index.tsx
Show resolved
Hide resolved
atomiks
approved these changes
Feb 23, 2026
Contributor
atomiks
left a comment
There was a problem hiding this comment.
Thanks @CiscoFran10 - looks good, with one note
colmtuite
approved these changes
Feb 23, 2026
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
Replace CSS variable usage (
var(--color-*)) with Tailwind utility classes and explicit oklch values in Tailwind demos so colors and shadows work without relying on theme CSS variables (e.g. in CodeSandbox where those variables are not defined).Changes
oklch(12%_9%_264deg/7%)for light andoklch(29%_0.75%_264deg/80%)for dark instead ofvar(--color-gray-200).oklch(12%_9%_264deg/7%)instead ofvar(--color-gray-200).var(--color-*)replaced with Tailwind classes (bg-gray-50,text-gray-900,outline-gray-200,text-gray-600,outline-blue-800,text-gray-700,bg-gray-500,before:bg-gray-200).var(--color-gray-50)replaced withbg-gray-50and gradient utilities (before:bg-gradient-to-b before:from-gray-50,after:bg-gradient-to-t after:from-gray-50).Why
Tailwind demos that used
var(--color-gray-200)and similar in arbitrary values break or look wrong in environments (e.g. CodeSandbox) where the docs theme CSS is not loaded. Using Tailwind utilities and oklch where needed keeps demos self-contained and correct in both light and dark mode.