Skip to content

Commit 73b5916

Browse files
authored
Merge pull request #15524 from ethereum/tracks-gradients
refactor: use tailwind native bg gradient classes
2 parents ede0fe3 + 5bc40fc commit 73b5916

File tree

3 files changed

+10
-30
lines changed

3 files changed

+10
-30
lines changed

app/[locale]/roadmap/tracks/_components/tracks.tsx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -101,61 +101,61 @@ const RoadmapTracksPage = () => {
101101
const popoverConfig = {
102102
endGoal: {
103103
border: "border-primary",
104-
background: "bg-primary-high-contrast-linear-gradient",
104+
background: "bg-gradient-to-b from-primary-high-contrast/10",
105105
pillStyles: "bg-primary text-body-inverse",
106106
pillText: "END GOAL",
107107
},
108108
featureResearch: {
109109
border: "border-border",
110-
background: "bg-background-medium-linear-gradient",
110+
background: "bg-gradient-to-b from-background-medium/10",
111111
pillStyles: "bg-background-medium",
112112
pillText: "RESEARCH",
113113
},
114114
featureScheduled: {
115115
border: "border-warning",
116-
background: "bg-warning-linear-gradient",
116+
background: "bg-gradient-to-b from-warning/10",
117117
pillStyles: "bg-warning",
118118
pillText: "SCHEDULED",
119119
},
120120
featureShipped: {
121121
border: "border-success",
122-
background: "bg-success-linear-gradient",
122+
background: "bg-gradient-to-b from-success/10",
123123
pillStyles: "bg-success",
124124
pillText: "SHIPPED",
125125
},
126126
rollupStage: {
127127
border: "border-primary-high-contrast",
128-
background: "bg-primary-high-contrast-linear-gradient",
128+
background: "bg-gradient-to-b from-primary-high-contrast/10",
129129
pillStyles: "bg-primary-high-contrast text-body-inverse",
130130
pillText: "STAGE",
131131
},
132132
taskIdea: {
133133
border: "border-background-highlight",
134-
background: "bg-background-high-linear-gradient",
134+
background: "bg-gradient-to-b from-background-high/10",
135135
pillStyles: "bg-background-high",
136136
pillText: "IDEA",
137137
},
138138
taskResearch: {
139139
border: "border-border",
140-
background: "bg-background-medium-linear-gradient",
140+
background: "bg-gradient-to-b from-medium/10",
141141
pillStyles: "bg-background-medium",
142142
pillText: "RESEARCH",
143143
},
144144
taskScheduled: {
145145
border: "border-warning",
146-
background: "bg-warning-linear-gradient",
146+
background: "bg-gradient-to-b from-warning/10",
147147
pillStyles: "bg-warning",
148148
pillText: "SCHEDULED",
149149
},
150150
taskShipped: {
151151
border: "border-success",
152-
background: "bg-success-linear-gradient",
152+
background: "bg-gradient-to-b from-success/10",
153153
pillStyles: "bg-success",
154154
pillText: "SHIPPED",
155155
},
156156
track: {
157157
border: "border-primary",
158-
background: "bg-primary-high-contrast-linear-gradient",
158+
background: "bg-gradient-to-b from-primary-high-contrast/10",
159159
pillStyles: "bg-primary-high-contrast text-body-inverse",
160160
pillText: "TRACK",
161161
},

src/styles/semantic-tokens.css

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,6 @@
8989
--card-gradient-secondary: linear-gradient(95deg, rgba(211, 145, 242, 0.12) 0%, rgba(159, 43, 212, 0.12) 102.78%);
9090
--card-gradient-secondary-hover: linear-gradient(95deg, rgba(211, 145, 242, 0.2) 0%, rgba(159, 43, 212, 0.2) 102.78%);
9191

92-
--success-linear-gradient: linear-gradient(to bottom, hsla(var(--green-600), 0.10), hsla(var(--white), 1));
93-
--warning-linear-gradient: linear-gradient(to bottom, hsla(var(--yellow-300), 0.10), hsla(var(--white), 1));
94-
--background-medium-linear-gradient: linear-gradient(to bottom, hsla(var(--background-medium), 0.10), hsla(var(--white), 1));
95-
--background-high-linear-gradient: linear-gradient(to bottom, hsla(var(--background-high), 0.10), hsla(var(--white), 1));
96-
--primary-high-contrast-linear-gradient: linear-gradient(to bottom, hsla(var(--primary-high-contrast), 0.10), hsla(var(--white), 1));
97-
9892
/* Shadows */
9993
--shadow-color-a: hsla(var(--purple-800), 0.02);
10094
--shadow-color-b: hsla(var(--red-800), 0.04);
@@ -210,12 +204,6 @@
210204

211205
--roadmap-card-gradient: linear-gradient(123deg, rgba(34, 34, 34, 0.20) 40.53%, rgba(174, 110, 203, 0.13) 104.05%);
212206

213-
--success-linear-gradient: linear-gradient(to bottom, hsla(var(--green-600), 0.10), hsla(var(--black), 1));
214-
--warning-linear-gradient: linear-gradient(to bottom, hsla(var(--yellow-300), 0.10), hsla(var(--black), 1));
215-
--background-medium-linear-gradient: linear-gradient(to bottom, hsla(var(--background-medium), 0.10), hsla(var(--black), 1));
216-
--background-high-linear-gradient: linear-gradient(to bottom, hsla(var(--background-high), 0.10), hsla(var(--black), 1));
217-
--primary-high-contrast-linear-gradient: linear-gradient(to bottom, hsla(var(--primary-high-contrast), 0.10), hsla(var(--black), 1));
218-
219207
/* Shadows (dark mode adjustments) */
220208
--shadow-color: hsla(var(--white), 0.04);
221209
--shadow-svg-button-link-1: -2px 2px 12px 1px var(--shadow-color);

tailwind.config.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -234,14 +234,6 @@ const config = {
234234
"card-gradient": "var(--card-gradient)",
235235
"card-gradient-secondary": "var(--card-gradient-secondary)",
236236
"card-gradient-secondary-hover": "var(--card-gradient-secondary-hover)",
237-
"success-linear-gradient": "var(--success-linear-gradient)",
238-
"warning-linear-gradient": "var(--warning-linear-gradient)",
239-
"background-medium-linear-gradient":
240-
"var(--background-medium-linear-gradient)",
241-
"background-high-linear-gradient":
242-
"var(--background-high-linear-gradient)",
243-
"primary-high-contrast-linear-gradient":
244-
"var(--primary-high-contrast-linear-gradient)",
245237
},
246238
boxShadow: {
247239
"table-box": "var(--table-box-shadow)",

0 commit comments

Comments
 (0)