Skip to content

Commit 6e827f1

Browse files
authored
chore: Tailwind CSS v4 migration (#4139)
Migrates the webapp from Tailwind CSS 3.4 to 4.x.
1 parent e0bf74b commit 6e827f1

246 files changed

Lines changed: 2095 additions & 2464 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
area: webapp
3+
type: improvement
4+
---
5+
6+
Migrated the webapp to Tailwind CSS v4 with a CSS-first `@theme`. Semantic color tokens are now CSS variables overridable per theme (multi-theme support). Tailwind runs through `@tailwindcss/postcss`; plugins replaced or upgraded to v4-compatible versions.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
area: webapp
3+
type: improvement
4+
---
5+
6+
Replaced raw charcoal-* Tailwind classes with semantic theme tokens (surfaces, borders, text) across the dashboard. Adds surface/border/text tokens to the themable layer so future themes only override CSS variables.

apps/webapp/app/components/AskAI.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ function AskAIDialog({ initialQuery, isOpen, onOpenChange, closeAskAI }: AskAIDi
173173
return (
174174
<Dialog open={isOpen} onOpenChange={handleOpenChange}>
175175
<DialogContent className="animated-gradient-glow flex max-h-[90vh] min-h-fit w-full flex-col justify-between gap-0 px-0 pb-0 pt-0 sm:max-w-prose">
176-
<DialogHeader className="flex h-[2.75rem] items-start justify-center rounded-t-md bg-background-bright pl-3">
176+
<DialogHeader className="flex h-11 items-start justify-center rounded-t-md bg-background-bright pl-3">
177177
<div className="flex items-center gap-1">
178178
<AISparkleIcon className="size-5" />
179179
<DialogTitle className="text-sm font-medium text-text-bright">Ask AI</DialogTitle>
@@ -226,7 +226,7 @@ function ChatMessages({
226226
];
227227

228228
return (
229-
<div className="flex-1 overflow-y-auto p-4 scrollbar-thin scrollbar-track-transparent scrollbar-thumb-charcoal-600">
229+
<div className="flex-1 overflow-y-auto p-4 scrollbar-thin scrollbar-track-transparent scrollbar-thumb-surface-control">
230230
{conversation.length === 0 ? (
231231
<motion.div
232232
className="flex flex-col gap-2 pb-2"
@@ -249,7 +249,7 @@ function ChatMessages({
249249
{exampleQuestions.map((question, index) => (
250250
<motion.button
251251
key={index}
252-
className="group flex w-fit items-center gap-2 rounded-full border border-dashed border-charcoal-600 px-4 py-2 transition-colors hover:border-solid hover:border-indigo-500"
252+
className="group flex w-fit items-center gap-2 rounded-full border border-dashed border-border-bright px-4 py-2 transition-colors hover:border-solid hover:border-indigo-500"
253253
onClick={() => onExampleClick(question)}
254254
variants={{
255255
hidden: {
@@ -468,7 +468,7 @@ function ChatInterface({ initialQuery }: { initialQuery?: string }) {
468468
error={error}
469469
addFeedback={addFeedback}
470470
/>
471-
<form onSubmit={handleSubmit} className="flex-shrink-0 border-t border-grid-bright p-4">
471+
<form onSubmit={handleSubmit} className="shrink-0 border-t border-grid-bright p-4">
472472
<div className="flex gap-3">
473473
<input
474474
type="text"
@@ -511,7 +511,7 @@ function ChatInterface({ initialQuery }: { initialQuery?: string }) {
511511
disabled={!message.trim()}
512512
LeadingIcon={<ArrowUpIcon className="size-5 text-text-bright" />}
513513
variant="primary/large"
514-
className="size-10 min-w-10 rounded-full group-disabled/button:border-charcoal-550 group-disabled/button:bg-charcoal-600"
514+
className="size-10 min-w-10 rounded-full group-disabled/button:border-border-brighter group-disabled/button:bg-surface-control"
515515
/>
516516
)}
517517
</div>
@@ -531,11 +531,11 @@ function GradientSpinnerBackground({
531531
}) {
532532
return (
533533
<div
534-
className={`flex rounded-full bg-gradient-to-br from-indigo-500 via-purple-500 to-fuchsia-500 p-px ${className}`}
534+
className={`flex rounded-full bg-linear-to-br from-indigo-500 via-purple-500 to-fuchsia-500 p-px ${className}`}
535535
>
536536
<div
537-
className={`flex h-full w-full items-center justify-center rounded-full bg-charcoal-600 ${
538-
hoverEffect ? "transition group-hover:bg-charcoal-550" : ""
537+
className={`flex h-full w-full items-center justify-center rounded-full bg-surface-control ${
538+
hoverEffect ? "transition group-hover:bg-surface-control-hover" : ""
539539
}`}
540540
>
541541
{children}

apps/webapp/app/components/BackgroundWrapper.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export function BackgroundWrapper({ children }: { children: ReactNode }) {
77
return (
88
<div className="relative h-full w-full overflow-hidden bg-background-dimmed lg:bg-transparent">
99
<div
10-
className="absolute left-0 top-0 hidden w-[260px] bg-contain bg-left-top bg-no-repeat lg:block"
10+
className="absolute left-0 top-0 hidden w-[260px] bg-contain bg-top-left bg-no-repeat lg:block"
1111
style={{
1212
backgroundImage: `url(${blurredDashboardBackgroundMenuTop})`,
1313
aspectRatio: "auto",
@@ -17,7 +17,7 @@ export function BackgroundWrapper({ children }: { children: ReactNode }) {
1717
/>
1818

1919
<div
20-
className="absolute bottom-0 left-0 hidden w-[260px] bg-contain bg-left-bottom bg-no-repeat lg:block"
20+
className="absolute bottom-0 left-0 hidden w-[260px] bg-contain bg-bottom-left bg-no-repeat lg:block"
2121
style={{
2222
backgroundImage: `url(${blurredDashboardBackgroundMenuBottom})`,
2323
aspectRatio: "auto",
@@ -27,7 +27,7 @@ export function BackgroundWrapper({ children }: { children: ReactNode }) {
2727
/>
2828

2929
<div
30-
className="absolute top-0 hidden bg-left-top bg-no-repeat lg:block"
30+
className="absolute top-0 hidden bg-top-left bg-no-repeat lg:block"
3131
style={{
3232
left: "260px",
3333
backgroundImage: `url(${blurredDashboardBackgroundTable})`,

apps/webapp/app/components/BlankStatePanels.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ export function DeploymentsNoneDev() {
304304
organization={organization}
305305
project={project}
306306
environment={environment}
307-
className="w-fit border border-charcoal-600 bg-secondary hover:border-charcoal-550 hover:bg-charcoal-600"
307+
className="w-fit border border-border-bright bg-secondary hover:border-border-brighter hover:bg-surface-control"
308308
/>
309309
</StepContentContainer>
310310
</>

apps/webapp/app/components/DefinitionTooltip.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ export function DefinitionTip({
1717
<TooltipProvider>
1818
<Tooltip disableHoverableContent={disableHoverableContent}>
1919
<TooltipTrigger className="text-left">
20-
<span className="cursor-default underline decoration-charcoal-500 decoration-dashed underline-offset-4 transition hover:decoration-charcoal-400">
20+
<span className="cursor-default underline decoration-text-faint decoration-dashed underline-offset-4 transition hover:decoration-text-dimmed">
2121
{children}
2222
</span>
2323
</TooltipTrigger>
24-
<TooltipContent align="end" side="right" className="w-[16rem] min-w-[16rem]">
24+
<TooltipContent align="end" side="right" className="w-64 min-w-64">
2525
<Header3 className="mb-1">{title}</Header3>
2626
{typeof content === "string" ? (
2727
<Paragraph variant="small">{content}</Paragraph>

apps/webapp/app/components/Feedback.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export function Feedback({ button, defaultValue = "bug", onOpenChange }: Feedbac
8484
<DialogHeader>Contact us</DialogHeader>
8585
<div className="mt-2 flex flex-col gap-4">
8686
<div className="flex items-center gap-4">
87-
<Icon icon={EnvelopeIcon} className="size-10 min-w-[2.5rem] text-blue-500" />
87+
<Icon icon={EnvelopeIcon} className="size-10 min-w-10 text-blue-500" />
8888
<Paragraph variant="base/bright">
8989
How can we help? We read every message and will respond as quickly as we can.
9090
</Paragraph>

apps/webapp/app/components/GitMetadata.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export function GitMetadataBranch({
2828
leadingIconClassName="group-hover/table-row:text-text-bright"
2929
iconSpacing="gap-x-1"
3030
to={git.branchUrl}
31-
className="pl-1 duration-0 [&_span]:duration-0 [&_span]:group-hover/table-row:text-text-bright"
31+
className="pl-1 duration-0 [&_span]:duration-0 group-hover/table-row:[&_span]:text-text-bright"
3232
>
3333
{git.branchName}
3434
</LinkButton>
@@ -52,7 +52,7 @@ export function GitMetadataCommit({
5252
LeadingIcon={<GitCommitIcon className="size-4" />}
5353
leadingIconClassName="group-hover/table-row:text-text-bright"
5454
iconSpacing="gap-x-1"
55-
className="pl-1 duration-0 [&_span]:duration-0 [&_span]:group-hover/table-row:text-text-bright"
55+
className="pl-1 duration-0 [&_span]:duration-0 group-hover/table-row:[&_span]:text-text-bright"
5656
>
5757
{`${git.shortSha} / ${git.commitMessage}`}
5858
</LinkButton>
@@ -78,7 +78,7 @@ export function GitMetadataPullRequest({
7878
LeadingIcon={<GitPullRequestIcon className="size-4" />}
7979
leadingIconClassName="group-hover/table-row:text-text-bright"
8080
iconSpacing="gap-x-1"
81-
className="pl-1 duration-0 [&_span]:duration-0 [&_span]:group-hover/table-row:text-text-bright"
81+
className="pl-1 duration-0 [&_span]:duration-0 group-hover/table-row:[&_span]:text-text-bright"
8282
>
8383
#{git.pullRequestNumber} {git.pullRequestTitle}
8484
</LinkButton>

apps/webapp/app/components/ListPagination.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export function ListPagination({ list, className }: { list: List; className?: st
2323
<NextButton cursor={list.pagination.next} />
2424
<div
2525
className={cn(
26-
"order-2 h-6 w-px bg-charcoal-600 transition-colors peer-hover/next:bg-charcoal-550 peer-hover/prev:bg-charcoal-550",
26+
"order-2 h-6 w-px bg-surface-control transition-colors peer-hover/next:bg-surface-control-hover peer-hover/prev:bg-surface-control-hover",
2727
bothDisabled && "opacity-30"
2828
)}
2929
/>
@@ -41,7 +41,7 @@ function PreviousButton({ cursor }: { cursor?: string }) {
4141
variant={"secondary/small"}
4242
LeadingIcon={ChevronLeftIcon}
4343
className={cn(
44-
"flex items-center rounded-r-none border-r-0 pl-2 pr-[0.5625rem]",
44+
"flex items-center rounded-r-none border-r-0 pl-2 pr-2.25",
4545
!path && "cursor-not-allowed opacity-50"
4646
)}
4747
onClick={(e) => !path && e.preventDefault()}
@@ -63,7 +63,7 @@ function NextButton({ cursor }: { cursor?: string }) {
6363
variant={"secondary/small"}
6464
TrailingIcon={ChevronRightIcon}
6565
className={cn(
66-
"flex items-center rounded-l-none border-l-0 pl-[0.5625rem] pr-2",
66+
"flex items-center rounded-l-none border-l-0 pl-2.25 pr-2",
6767
!path && "cursor-not-allowed opacity-50"
6868
)}
6969
onClick={(e) => !path && e.preventDefault()}

apps/webapp/app/components/LoginPageLayout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export function LoginPageLayout({ children }: { children: React.ReactNode }) {
6868
</div>
6969
<div className="flex flex-col items-center gap-4 px-8">
7070
<Paragraph>Trusted by developers at</Paragraph>
71-
<div className="flex w-full flex-wrap items-center justify-center gap-x-6 gap-y-3 text-charcoal-500 xl:justify-between xl:gap-0">
71+
<div className="flex w-full flex-wrap items-center justify-center gap-x-6 gap-y-3 text-text-faint xl:justify-between xl:gap-0">
7272
<LyftLogo className="w-11" />
7373
<UnkeyLogo />
7474
<MiddayLogo />

0 commit comments

Comments
 (0)