Files
supabase/packages/config/css/utilities.css
T
Ivan Vasilov 0abe792889 chore: Migrate the main Tailwind JS config to CSS (#45686)
This PR migrates the JS config for Tailwind into a CSS config. As such,
all variables have been defined as CSS variables and they're using the
specialized Tailwind syntax for generating utility classes.

Beside the migration, these changes were also added:
- Added `tailwind.config.css` to few packages to make the Tailwind
Intellisense work.
- Migrated away from Radix style color classes to our defined classes,
the values will remain the same.
- Most of the CSS is generated by scripts, they'll be removed in next
PRs.
* Removed redundant `border-light` classes from several components since
it was undefined.
* Removed redundant `text-strong` classes from several components since
it was undefined.

How to test:
- Open all apps, compare the UI (mainly colors) to builds from #45417
and try to find a difference.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Style**
* Harmonized color variable usages and updated UI color references
(affects palettes, charts, gradients, hero illustrations, and
scrollbars).
  * Tweaked border, tab, and selection visuals across components.

* **New Features**
* Added a suite of theme animations and refined typography presets used
by site prose and docs.

* **Refactor**
* Overhauled Tailwind/theme configuration and color token generation for
more consistent theming.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-05-13 13:14:58 +02:00

72 lines
2.2 KiB
CSS

/*
* Custom Tailwind v4 utilities migrated from packages/config/ui.config.js
* (addUtilities + matchUtilities) and packages/config/tailwind.config.js
* (the .bg legacy shim).
*
* Note: .no-scrollbar lives in packages/config/tailwind-plugins/motion-safe-transition.js
* and is loaded via @plugin from tailwind.config.css, so it's not duplicated here.
*/
/*
* The `bg` class worked in Tailwind v3 but stopped working in v4. Restored as
* an alias for `bg-default` to avoid a wide rename across the codebase.
* Should be deprecated in favor of `bg-default`.
*/
@utility bg {
background-color: hsl(var(--background-default));
}
/*
* Soft shimmer gradient used by LoadingLine.
*/
@utility line-loading-bg {
background: rgb(0, 0, 0);
background: linear-gradient(
90deg,
rgba(0, 0, 0, 0) 0%,
rgba(255, 255, 255, 0.65) 50%,
rgba(0, 0, 0, 0) 100%
);
}
@utility line-loading-bg-light {
background: rgb(0, 0, 0);
background: linear-gradient(
90deg,
rgba(0, 0, 0, 0) 0%,
rgba(33, 33, 33, 0.65) 50%,
rgba(0, 0, 0, 0) 100%
);
}
/* may be unused — verify before pruning */
@utility mask-fadeout-right {
-webkit-mask-image: linear-gradient(to right, white 98%, transparent 100%);
mask-image: linear-gradient(to right, white 98%, transparent 100%);
}
/* may be unused — verify before pruning */
@utility mask-fadeout-left {
-webkit-mask-image: linear-gradient(to left, white 98%, transparent 100%);
mask-image: linear-gradient(to left, white 98%, transparent 100%);
}
/*
* Functional color utilities. The `--value(--color-*)` token accepts any
* registered --color-* design token (e.g. highlight-foreground-light).
*/
/* may be unused — verify before pruning */
@utility highlight-* {
box-shadow: inset 0 1px 0 0 --value(--color-*);
}
/* may be unused — verify before pruning */
@utility subhighlight-* {
box-shadow: inset 0 -1px 0 0 --value(--color-*);
}
/*
* Inline-SVG grid background. Used by ProjectLinker as bg-grid-black/5 and
* bg-grid-white/5 for the integrations onboarding visuals.
*/
@utility bg-grid-* {
background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32' width='32' height='32' fill='none' stroke='--value(--color-*)'><path d='M0 .5H31.5V32'/></svg>");
}