Skip to content

fix(tw): use v3 button styling #7937

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 7, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions packages/ui-components/src/styles/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,27 @@
@import './base.css' layer(utilities);
@import './markdown.css' layer(utilities);

/*
The default border color has changed to `currentColor` in Tailwind CSS v4,
so we've added these compatibility styles to make sure everything still
looks the same as it did with Tailwind CSS v3.

If we ever want to remove these styles, we need to add an explicit border
color utility to any element that depends on these defaults.
*/
@layer base {
:root {
--header-height: calc(var(--spacing, 0.25rem) * 16);
}

/* See https://tailwindcss.com/docs/upgrade-guide#default-border-color */
*,
::after,
::before,
::backdrop,
::file-selector-button {
border-color: var(--color-gray-200, currentColor);
}

/* See https://tailwindcss.com/docs/upgrade-guide#buttons-use-the-default-cursor */
button,
[role='button'] {
&:not(:disabled) {
@apply cursor-pointer;
}
}
}

@custom-variant aria-current (&[aria-current="page"]);
Loading