Skip to content

[docs] text-secondary CSS variable does not work with Tailwind v4 #47870

@mloffer

Description

@mloffer

Steps to reproduce

Steps:

  1. Open this link to live example (from the official docs): https://play.tailwindcss.com/f1ZIr0qSNG
  2. Inspect the computed text color of either body copy (light or dark mode) using className="text-text-secondary".
    e.g. Lizards are a widespread group of squamate reptiles, with over 6,000 species, ranging across all continents except Antarctica

Current behavior

The computed color is a plain rgb (no alpha) color: rgb(0,0,0) in light mode, rgb(255,255,255) in dark mode.

Expected behavior

The computed colors should resolve to the same colors as in the default theme found at palette.text.secondary, which are rgba(0, 0, 0, 0.6) and rgba(255, 255, 255, 0.7), respectively.

https://mui.com/material-ui/customization/default-theme/

Context

I am running across this issue in my nextjs application, but it seemed easier to use the official documentation to demonstrate the issue.

Your environment

npx @mui/envinfo
  System:
    OS: Linux 6.6 Ubuntu 22.04.5 LTS 22.04.5 LTS (Jammy Jellyfish)
  Binaries:
    Node: 24.11.1 - /home/mloffer/.nvm/versions/node/v24.11.1/bin/node
    npm: 11.6.2 - /home/mloffer/.nvm/versions/node/v24.11.1/bin/npm
    pnpm: 10.29.3 - /home/mloffer/.nvm/versions/node/v24.11.1/bin/pnpm
  Browsers:
    Chrome: 145.0.7632.109
    Firefox: Not Found
  npmPackages:
    typescript: catalog: => 5.9.3

Search keywords: tailwind text-secondary CSS variable

Metadata

Metadata

Assignees

No one assigned

    Labels

    customization: cssDesign CSS customizability.docsImprovements or additions to the documentation.scope: systemThe system, the design tokens / styling foundations used across components. eg. @mui/system with MUItype: bugIt doesn't behave as expected.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions