Skip to content

www: align copy icon - #4981

Open
geocine wants to merge 1 commit into
rust-lang:mainfrom
geocine:align-copy-icon
Open

www: align copy icon#4981
geocine wants to merge 1 commit into
rust-lang:mainfrom
geocine:align-copy-icon

Conversation

@geocine

@geocine geocine commented Jul 27, 2026

Copy link
Copy Markdown

Summary

This has been bothering me everytime I visit the rustup.rs website

image

Why

It's misaligned

Validation

Check screenshot

@ChrisDenton

Copy link
Copy Markdown
Member

If the issue is extract vertical spacing messing up the centering, would using div.copy-icon svg { display:bock } have the same effect without needing to manually specifying the offset?

@rami3l

rami3l commented Jul 27, 2026

Copy link
Copy Markdown
Member

If the issue is extract vertical spacing messing up the centering, would using div.copy-icon svg { display:bock } have the same effect without needing to manually specifying the offset?

@ChrisDenton I think the thing with our icon is that IIRC its visual center is not the actual center so that's why manual adjustments have to be made 😓

I'd argue that in "proper" Web frontend an asset library is needed but probably not in this case: so far we are keeping a very minimal Vanilla JS setup.

@ChrisDenton

Copy link
Copy Markdown
Member

For the horizontal center that's true (because there's a bit to one side) but for the vertical center it shouldn't be

@rami3l

rami3l commented Jul 27, 2026

Copy link
Copy Markdown
Member

For the horizontal center that's true (because there's a bit to one side) but for the vertical center it shouldn't be

@ChrisDenton I get it, it's a typo XDD (block, not bock)

@ChrisDenton

Copy link
Copy Markdown
Member

Oops, sorry!

Comment thread www/rustup.css
}

div.copy-icon svg {
fill: var(--body-color);

@rami3l rami3l Jul 27, 2026

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.

Suggested change
fill: var(--body-color);
display: block;

View changes since the review

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.

@ChrisDenton Is it more like this?

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.

Yep! Does it make a difference in your browser?

Comment thread www/rustup.css

div.copy-icon {
transform: translateX(3px);
transform: translateX(2px) translateY(2px);

@rami3l rami3l Jul 27, 2026

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.

Suggested change
transform: translateX(2px) translateY(2px);
transform: translateX(2px);

View changes since the review

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.

3 participants