Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes site title UX issues #5621

Merged
merged 7 commits into from
Dec 12, 2023
Merged

Fixes site title UX issues #5621

merged 7 commits into from
Dec 12, 2023

Conversation

natemoo-re
Copy link
Member

Description (required)

Tweaks to the site title link UX to address a few usability issues

Hover Behavior

Previously, the :hover behavior could lead to stuttering because the bounding boxes of the a elements were not normalized. There was also not enough padding on the inline axis of the elements.

CleanShot.2023-12-05.at.09.31.37.mp4

This PR adjusts the a elements so that the :hover behavior is consistent. The inline padding has been adjusted to provide a larger interaction target.

CleanShot.2023-12-05.at.09.44.29.mp4

Focus (Visible) Behavior

Previously, the :focus-visible behavior was unclear because of the size of the a elements.

CleanShot.2023-12-05.at.10.12.41.mp4

This PR adds a pseudo-element to both a elements when :focus-visible matches to ensure that the focus ring remains visible.

CleanShot.2023-12-05.at.10.12.59.mp4

Copy link

vercel bot commented Dec 5, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview Dec 12, 2023 3:13pm

Copy link
Member

@delucis delucis left a comment

Choose a reason for hiding this comment

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

Thanks @natemoo-re! This was on my list to revisit — thanks for checking it off :-D

One small suggestion to avoid the complexity of the pseudo element.

src/components/starlight/SiteTitle.astro Show resolved Hide resolved
@sarah11918 sarah11918 added the site improvement Some thing that improves the website functionality - ask @delucis for help! label Dec 8, 2023
Copy link
Member

@delucis delucis left a comment

Choose a reason for hiding this comment

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

Thanks @natemoo-re! I feel like we’re maybe patching over some decisions we could improve — like relying on the space inside the Astro wordmark SVG for spacing — but happy to get this in for now.

@delucis delucis merged commit 71e9f67 into main Dec 12, 2023
5 checks passed
@delucis delucis deleted the fix/site-title-ux branch December 12, 2023 15:18
ematipico pushed a commit that referenced this pull request Jan 26, 2024
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
site improvement Some thing that improves the website functionality - ask @delucis for help!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants