Skip to content

Clean up theme#16166

Merged
wackerow merged 1 commit into
devfrom
cleanup-theme
Sep 15, 2025
Merged

Clean up theme#16166
wackerow merged 1 commit into
devfrom
cleanup-theme

Conversation

@pettinarip
Copy link
Copy Markdown
Member

Remove unused vars from theme and format semantic-tokens.css file

@netlify
Copy link
Copy Markdown

netlify Bot commented Sep 1, 2025

Deploy Preview for ethereumorg ready!

Name Link
🔨 Latest commit cd36e4a
🔍 Latest deploy log https://app.netlify.com/projects/ethereumorg/deploys/68b5b44618cd67000886da2b
😎 Deploy Preview https://deploy-preview-16166--ethereumorg.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
7 paths audited
Performance: 45 (🔴 down 10 from production)
Accessibility: 96 (🟢 up 1 from production)
Best Practices: 92 (🔴 down 8 from production)
SEO: 100 (no change from production)
PWA: 59 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

Comment on lines +95 to +113
--card-gradient: linear-gradient(
123deg,
rgba(255, 255, 255, 0.2) 58.99%,
rgba(174, 110, 203, 0.13) 104.04%
);
--card-gradient-secondary: linear-gradient(
95deg,
rgba(211, 145, 242, 0.12) 0%,
rgba(159, 43, 212, 0.12) 102.78%
);
--card-gradient-secondary-hover: linear-gradient(
95deg,
rgba(211, 145, 242, 0.2) 0%,
rgba(159, 43, 212, 0.2) 102.78%
);
--ten-year-gradient: linear-gradient(
100deg,
#f6c9ea 55.38%,
#c7a9f1 110.54%
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per in-file comment:

    /**
    /* Gradients (radial, conic, or linear over 3 stops)
    /* For linear-gradient up to 3 stops, use Tailwind classes
    /* https://tailwindcss.com/docs/background-image#linear-gradients
    */

Noting that these could be simple tailwind classes instead, though if we want to nit-pick on non-standard angles (123deg, 95deg, 100deg), that would have to wait for tailwind v4, where we could do bg-linear-123 as an example.

Otherwise we could standardize the angles with something like:

bg-gradient-to-br from-white/20 from-[59%] to-[rgb(174,110,203)]/[0.13] to-[104%] in situ

or

--card-gradient: @apply bg-gradient-to-br from-white/20 from-[59%] to-[rgb(174,110,203)]/[0.13] to-[104%];

@pettinarip Not sure if you have a preference... not a huge deal, but given we're using tailwind I try to stick to classes where possible

Comment on lines +95 to 114
--card-gradient: linear-gradient(
123deg,
rgba(255, 255, 255, 0.2) 58.99%,
rgba(174, 110, 203, 0.13) 104.04%
);
--card-gradient-secondary: linear-gradient(
95deg,
rgba(211, 145, 242, 0.12) 0%,
rgba(159, 43, 212, 0.12) 102.78%
);
--card-gradient-secondary-hover: linear-gradient(
95deg,
rgba(211, 145, 242, 0.2) 0%,
rgba(159, 43, 212, 0.2) 102.78%
);
--ten-year-gradient: linear-gradient(
100deg,
#f6c9ea 55.38%,
#c7a9f1 110.54%
);
Copy link
Copy Markdown
Member

@wackerow wackerow Sep 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
--card-gradient: linear-gradient(
123deg,
rgba(255, 255, 255, 0.2) 58.99%,
rgba(174, 110, 203, 0.13) 104.04%
);
--card-gradient-secondary: linear-gradient(
95deg,
rgba(211, 145, 242, 0.12) 0%,
rgba(159, 43, 212, 0.12) 102.78%
);
--card-gradient-secondary-hover: linear-gradient(
95deg,
rgba(211, 145, 242, 0.2) 0%,
rgba(159, 43, 212, 0.2) 102.78%
);
--ten-year-gradient: linear-gradient(
100deg,
#f6c9ea 55.38%,
#c7a9f1 110.54%
);
--card-gradient: @apply bg-gradient-to-br from-white/20 from-[59%] to-[rgb(174,110,203)]/[0.13];
--card-gradient-secondary: @apply bg-gradient-to-r from-[rgb(211,145,242)]/[0.12] to-[rgb(159,43,212)]/[0.12];
--card-gradient-secondary-hover: @apply bg-gradient-to-r from-[rgb(211,145,242)]/20 to-[rgb(159,43,212)]/20;
--ten-year-gradient: @apply bg-gradient-to-r from-[#f6c9ea] from-[55%] to-[#c7a9f1] to-[110%];

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm actually, these aren't within a custom class, so that may not work right... but:

  1. bg-card-gradient is only used in one place that I can find: app/[locale]/trillion-dollar-security/page.tsx
    We could replace that usage with bg-gradient-to-br from-white/20 from-[59%] to-[rgb(174,110,203)]/[0.13] and remove this custom variable from the theme?
  2. bg-ten-year-gradient is also only used once, in app/[locale]/10years/_components/TenYearHomeBanner.tsx attached to after:
    We could replace that usage with after:bg-gradient-to-r after:from-[#f6c9ea] after:from-[55%] after:to-[#c7a9f1] after:to-[110%] dark:after:from-[#1e151b] dark:after:from-[55%] dark:after:to-black dark:after:to-[110%], and similarly remove from the theme.
  3. bg-card-gradient-secondary (4 uses) and bg-card-gradient-secondary-hover (2 uses)... could consider making custom classes for these two outside of semantic-tokens.css?

@pettinarip Just some thoughts on how to iterate on this, but for the sake of not over-complicating, going to accept and pull in what we have here.

Comment on lines +95 to 114
--card-gradient: linear-gradient(
123deg,
rgba(255, 255, 255, 0.2) 58.99%,
rgba(174, 110, 203, 0.13) 104.04%
);
--card-gradient-secondary: linear-gradient(
95deg,
rgba(211, 145, 242, 0.12) 0%,
rgba(159, 43, 212, 0.12) 102.78%
);
--card-gradient-secondary-hover: linear-gradient(
95deg,
rgba(211, 145, 242, 0.2) 0%,
rgba(159, 43, 212, 0.2) 102.78%
);
--ten-year-gradient: linear-gradient(
100deg,
#f6c9ea 55.38%,
#c7a9f1 110.54%
);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm actually, these aren't within a custom class, so that may not work right... but:

  1. bg-card-gradient is only used in one place that I can find: app/[locale]/trillion-dollar-security/page.tsx
    We could replace that usage with bg-gradient-to-br from-white/20 from-[59%] to-[rgb(174,110,203)]/[0.13] and remove this custom variable from the theme?
  2. bg-ten-year-gradient is also only used once, in app/[locale]/10years/_components/TenYearHomeBanner.tsx attached to after:
    We could replace that usage with after:bg-gradient-to-r after:from-[#f6c9ea] after:from-[55%] after:to-[#c7a9f1] after:to-[110%] dark:after:from-[#1e151b] dark:after:from-[55%] dark:after:to-black dark:after:to-[110%], and similarly remove from the theme.
  3. bg-card-gradient-secondary (4 uses) and bg-card-gradient-secondary-hover (2 uses)... could consider making custom classes for these two outside of semantic-tokens.css?

@pettinarip Just some thoughts on how to iterate on this, but for the sake of not over-complicating, going to accept and pull in what we have here.

@wackerow wackerow merged commit d81e431 into dev Sep 15, 2025
12 checks passed
@wackerow wackerow deleted the cleanup-theme branch September 15, 2025 12:50
@pettinarip pettinarip mentioned this pull request Sep 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants