Skip to content

Migrate logo icons to Tailwind#3847

Open
binary-koan wants to merge 7 commits intomainfrom
logo-icons
Open

Migrate logo icons to Tailwind#3847
binary-koan wants to merge 7 commits intomainfrom
logo-icons

Conversation

@binary-koan
Copy link
Contributor

Ref #3011

Converts the logo-g and logo-full classes to Tailwind + React. See inline comments for details.

No visual changes, logos look the same:

Screenshot 2026-02-28 at 23 29 08 Screenshot 2026-02-28 at 23 29 32 Screenshot 2026-02-28 at 23 29 51

@binary-koan binary-koan self-assigned this Feb 28, 2026
Copy link
Contributor Author

@binary-koan binary-koan left a comment

Choose a reason for hiding this comment

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

@gianfrancopiana Could you review this one too?

[
"Powered by",
tag.span("Gumroad", class: "logo-full", aria: { label: "Gumroad" })
tag.span("Gumroad", class: "inline-block aspect-115/22 h-[1lh] shrink-0 bg-current mask-(--logo) mask-contain mask-center mask-no-repeat")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

As with other migrations, just inlined these into the helper. Eventually we'll replace all ERB with Inertia and remove these

aria-label="Gumroad"
/>
<a href={Routes.discover_url({ host: discoverDomain })} className="shrink-0" aria-label="Gumroad">
<Logo className="h-auto w-[245px]" />
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Overrides the default styling and computes the aspect ratio based on width rather than height (note: since the aspect ratio in Logo is different the height actually changes, but it's a flex container anyway so it doesn't affect the layout)

<div className="override grid grid-cols-[auto_1fr_auto] items-center gap-3 p-4 text-lg leading-6 lg:hidden">
<a href={Routes.root_url()} className="no-underline">
<span className="logo-g" />
<img src={logo} className="size-6" alt="Home" />
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the only place logo-g was used, and it works fine with just an img tag

$icons: [];
@import "../stylesheets/icons";

.logo-full {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Similar to button styles, just inlined the relevant CSS as-is here. We don't need to migrate this file in the short term, we can handle it further down the line alongside emails since it's another bundle separate to the main app

<span
className={classNames(
// Deliberately using an aspect ratio that adds vertical padding, so that the logo aligns with text
"inline-block aspect-115/22 h-[1lh] shrink-0 bg-current mask-(--logo) mask-contain mask-center mask-no-repeat selection:bg-transparent selection:text-transparent",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Kept the mask-image approach since it's easier to handle dark mode than img, easier to read than inline SVG, and it's nice that when the page content is copied and pasted "Powered by Gumroad" is preserved as text

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