tailwindcss/src
Jordan Pittman d093dce0fb
Add variable fallback to fix Chrome issue (#15003)
This works around an issue in Chrome where `::selection` does not read
from variables defined on `::selection` thus breaking all uses of color
utilities with the selection variant. e.g. `selection::bg-red-200`.

We now add a fallback value of `1` to all uses of
`var(--tw-bg-opacity)`, `var(--tw-text-opacity)`,
`var(--tw-border-opacity)`, etc… since Chrome treats the variable as if
it did not exist because it's not defined on the parent.

In Chrome 131 (until the change is rolled back) existing utilities like
these will not work:
- `selection:text-opacity-50`
- `selection:[--tw-text-opacity:0.5]`

Fixes #15000

---------

Co-authored-by: Adam Wathan <adam.wathan@gmail.com>
2024-11-14 13:33:27 -05:00
..
cli Warn when broad glob patterns are used in the content configuration (#14140) 2024-08-07 16:55:20 +02:00
css Don't set display: none on elements that use hidden="until-found" (#14625) 2024-10-09 13:55:48 +02:00
lib Improve the performance when checking broad glob patterns. (#14481) 2024-09-23 10:52:05 +02:00
postcss-plugins/nesting Redirect to the up-to-date plugin url (#8081) 2022-04-11 13:06:10 -04:00
public Extend default color palette with new 950 shades (#10879) 2023-03-27 14:47:13 -04:00
util Add variable fallback to fix Chrome issue (#15003) 2024-11-14 13:33:27 -05:00
value-parser Fix parsing of theme() inside calc() when there are no spaces around operators (#11157) 2023-07-13 11:48:34 -04:00
cli-peer-dependencies.js Add postcss-import support to the CLI (#8437) 2022-05-25 14:28:52 -04:00
cli.js Cleanup oxide — Part #2 (#13312) 2024-03-22 17:12:14 +01:00
corePlugins.js Normalize attribute selector for data-* and aria-* modifiers (#14037) 2024-07-24 18:46:21 +02:00
featureFlags.js Cleanup oxide — Part #2 (#13312) 2024-03-22 17:12:14 +01:00
index.js Replace __OXIDE__ at build time to prevent @tailwindcss/oxide leaks in the stable engine (#10988) 2023-04-18 12:19:20 +02:00
plugin.js Cleanup oxide — Part #2 (#13312) 2024-03-22 17:12:14 +01:00
processTailwindFeatures.js Only detect nesting when using @apply (#13325) 2024-03-23 19:10:51 -04:00