Skip to content

Comments

[docs] Use Tailwind utilities and oklch in Tailwind demos instead of CSS variables#4166

Merged
atomiks merged 3 commits intomui:masterfrom
CiscoFran10:docs/tailwind-demos-variables
Feb 24, 2026
Merged

[docs] Use Tailwind utilities and oklch in Tailwind demos instead of CSS variables#4166
atomiks merged 3 commits intomui:masterfrom
CiscoFran10:docs/tailwind-demos-variables

Conversation

@CiscoFran10
Copy link
Contributor

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).

image

Changes

  • Drawer (mobile-nav): Shadow uses oklch(12%_9%_264deg/7%) for light and oklch(29%_0.75%_264deg/80%) for dark instead of var(--color-gray-200).
  • Combobox (async-single, async-multiple): Popup shadow uses oklch(12%_9%_264deg/7%) instead of var(--color-gray-200).
  • Dialog (inside-scroll): All 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).
  • Scroll-area (scroll-fade): var(--color-gray-50) replaced with bg-gray-50 and 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.

@mui-bot
Copy link

mui-bot commented Feb 23, 2026

Bundle size report

Bundle Parsed size Gzip size
@base-ui/react 0B(0.00%) 0B(0.00%)

Details of bundle changes


Check out the code infra dashboard for more information about this PR.

@netlify
Copy link

netlify bot commented Feb 23, 2026

Deploy Preview for base-ui ready!

Name Link
🔨 Latest commit 1dbb592
🔍 Latest deploy log https://app.netlify.com/projects/base-ui/deploys/699d15e8238ca10008388e26
😎 Deploy Preview https://deploy-preview-4166--base-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 23, 2026

commit: 1dbb592

@atomiks atomiks added the docs Improvements or additions to the documentation. label Feb 23, 2026
Copy link
Contributor

@atomiks atomiks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @CiscoFran10 - looks good, with one note

@atomiks atomiks merged commit 82a7728 into mui:master Feb 24, 2026
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to the documentation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants