Skip to content

fix(docs): consistent hover styling for inline-code links#2213

Merged
notrab merged 14 commits into
mainfrom
fix/docs-inline-code-link-styling
May 28, 2026
Merged

fix(docs): consistent hover styling for inline-code links#2213
notrab merged 14 commits into
mainfrom
fix/docs-inline-code-link-styling

Conversation

@notrab
Copy link
Copy Markdown
Member

@notrab notrab commented May 27, 2026

Lite PR

Tip: Review docs on the ENSNode PR process

Summary


Why

  • Requested by @lightwalker-eth to improve the styling of our links and consistent hover style.

Testing

  • How this was tested.
  • If you didn't test it, say why.

Notes for Reviewer (Optional)

  • Anything non-obvious or worth a heads-up.

Pre-Review Checklist (Blocking)

  • This PR does not introduce significant changes and is low-risk to review quickly.
  • Relevant changesets are included (or are not required)

Copilot AI review requested due to automatic review settings May 27, 2026 18:32
@notrab notrab requested a review from a team as a code owner May 27, 2026 18:32
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 27, 2026

⚠️ No Changeset found

Latest commit: 8fc0335

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented May 27, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
enskit-react-example.ensnode.io Ready Ready Preview, Comment May 28, 2026 3:38pm
ensnode.io Ready Ready Preview, Comment May 28, 2026 3:38pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
admin.ensnode.io Skipped Skipped May 28, 2026 3:38pm
ensrainbow.io Skipped Skipped May 28, 2026 3:38pm

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 27, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 5bb3f26a-7e62-4e98-96cf-3577c1f5c139

📥 Commits

Reviewing files that changed from the base of the PR and between 5ff7d12 and 8fc0335.

📒 Files selected for processing (4)
  • docs/ensnode.io/src/components/organisms/OmnigraphStaticExampleSet.astro
  • docs/ensnode.io/src/content/docs/docs/integrate/integration-options/enskit/example.mdx
  • docs/ensnode.io/src/content/docs/docs/integrate/integration-options/enssdk/example.mdx
  • docs/ensnode.io/src/styles/starlight.css

📝 Walkthrough

Walkthrough

This PR refines link hover and underline animation behavior across the ENSNode documentation site. Component back-navigation and hosted links remove hover color changes and narrow transitions to text-underline-offset. Global Starlight CSS updates align markdown link hover colors and refine underline animation mechanics.

Changes

Link hover and underline animation refinement

Layer / File(s) Summary
Component and example back-link updates
docs/ensnode.io/src/components/molecules/HostedEnsNodeInstance.astro, docs/ensnode.io/src/components/organisms/OmnigraphStaticExampleSet.astro, docs/ensnode.io/src/content/docs/docs/integrate/integration-options/enskit/example.mdx, docs/ensnode.io/src/content/docs/docs/integrate/integration-options/enssdk/example.mdx
Icon classlists simplified to remove hover/transition color classes; back-link label underline transitions constrained to transition-[text-underline-offset] duration-200 (replacing transition-all) and existing underline-offset hover values preserved.
Starlight CSS hover color and underline animation refinement
docs/ensnode.io/src/styles/starlight.css
Global markdown link hover color set to --sl-color-text-accent and paragraph/list underline hover animations changed to target only text-underline-offset with a smaller hover offset; TOC hover color aligned to --sl-color-text-accent.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • namehash/ensnode#2201: Adjusts the same HostedEnsNodeInstance.astro "Hosted at" link hover/underline classes by removing accent-color hover and narrowing behavior to underline-offset transitions.
  • namehash/ensnode#2170: Updates the same "Back to enskit/enssdk overview" links in example.mdx files with Icon class simplification and text-underline-offset-only transitions, plus overlapping starlight.css underline and hover rule changes.
  • namehash/ensnode#2151: Modifies docs/ensnode.io/src/styles/starlight.css to change paragraph and markdown link underline and hover transition behavior.

Suggested labels

docs

Poem

🐰 Hops across the docs so spry,
Underlines now drift and fly,
Hover trims the noisy hue,
Offset dances, crisp and true,
A tiny hop — styles renewed.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: standardizing hover styling for inline-code links across documentation.
Description check ✅ Passed The description follows the template structure with all required sections present, though the Testing section is left as a placeholder without actual testing details.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/docs-inline-code-link-styling

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint skipped: no ESLint configuration detected in root package.json. To enable, add eslint to devDependencies.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Small CSS-only tweak in the docs site to make link hover styling consistent, particularly for inline-code links inside markdown paragraphs and lists, plus minor trailing-whitespace cleanups in comments.

Changes:

  • Add underline-offset hover transition for a:has(code) links in markdown paragraphs/list items.
  • Switch hover color tokens from --sl-color-accent / --sl-color-accent-high to --sl-color-text-accent, and add a heading-link hover color rule.
  • Clean up trailing whitespace in several CSS comments.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 27, 2026

Greptile Summary

This PR standardises hover styling across inline-code links and plain-text links in the ENSNode docs site. It removes per-element hover colour overrides (previously using --sl-color-accent-high) in favour of a single, broad .sl-markdown-content a:hover rule that locks all links to --sl-color-text-accent, and narrows every transition to text-underline-offset only so the only animated effect on hover is the underline shortening.

  • starlight.css: Adds a broad a:hover colour rule, adds a dedicated a:has(code) underline block mirroring the existing plain-text link block, removes the old per-selector hover colour overrides, and updates starlight-toc a:hover to --sl-color-text-accent.
  • Astro components / MDX files: Strips hover:text-[…] Tailwind utilities and transition-all from back-link buttons in HostedEnsNodeInstance, OmnigraphStaticExampleSet, and the enskit/enssdk example pages, replacing them with transition-[text-underline-offset]; icon colour-change animations on those same links are also removed.

Confidence Score: 5/5

Pure CSS and markup styling changes scoped to the docs site; no logic, data, or API surface is touched.

All changes are presentational — hover colour tokens, transition properties, and Tailwind utility classes on docs components. The new a:hover rule in starlight.css is well-scoped with :not(:where(.not-content *)), and the back-link button simplifications in Astro/MDX files are straightforward removals of redundant utilities. No functional regressions are introduced.

docs/ensnode.io/src/styles/starlight.css — the two identical underline-animation blocks could be consolidated, but this is a minor maintainability point and does not affect correctness.

Important Files Changed

Filename Overview
docs/ensnode.io/src/styles/starlight.css Adds a broad a:hover rule setting color to --sl-color-text-accent, replaces per-selector hover-color rules, and introduces a dedicated a:has(code) block; the two new blocks have identical bodies but target complementary selector sets.
docs/ensnode.io/src/components/molecules/HostedEnsNodeInstance.astro Removes explicit hover-color utility class and narrows transition to text-underline-offset only, consistent with the new CSS approach.
docs/ensnode.io/src/components/organisms/OmnigraphStaticExampleSet.astro Strips icon hover-color transition and narrows paragraph transition to text-underline-offset; icon no longer changes color on hover.
docs/ensnode.io/src/content/docs/docs/integrate/integration-options/enskit/example.mdx Same icon/text hover simplification as OmnigraphStaticExampleSet; straightforward style cleanup.
docs/ensnode.io/src/content/docs/docs/integrate/integration-options/enssdk/example.mdx Mirrors enskit/example.mdx changes; straightforward style cleanup.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Link hovered] --> B{Is it inside .sl-markdown-content?}
    B -- Yes --> C[a:hover rule sets color to --sl-color-text-accent]
    B -- No --> D[No color change - stays at default]
    C --> E{Link type}
    E -- Plain-text link in p / li --> F[transition: text-underline-offset 0.2s\nunderline-offset 4px to 2px]
    E -- Inline-code link in p / li --> G[transition: text-underline-offset 0.2s\nunderline-offset 4px to 2px]
    E -- Link in aside --> H[transition: text-underline-offset 0.2s\nunderline-offset 4px to 2px]
    E -- Tab role link --> I[No underline animation]
    D --> J{Back-link button?}
    J -- Yes --> K[Tailwind group-hover: underline-offset 4px to 2px]
    J -- No --> L[No hover effect]
Loading

Reviews (4): Last reviewed commit: "updates" | Re-trigger Greptile

Comment thread docs/ensnode.io/src/styles/starlight.css
…ode-link-styling

Brings in PR #2208 component-level hover cleanups (HostedEnsNodeInstance,
OmnigraphStaticExampleSet, enskit/example.mdx, enssdk/example.mdx) and the
broader `a:hover` override in starlight.css.

Conflict in starlight.css resolved by:
- Keeping #2208's broader `.sl-markdown-content a:hover` override.
- Dropping our narrower `> p a` / `li a` hover rule (redundant under #2208's selector).
- Keeping the code-link underline-offset rule from this branch.
Copilot AI review requested due to automatic review settings May 28, 2026 08:16
@vercel vercel Bot temporarily deployed to Preview – admin.ensnode.io May 28, 2026 08:16 Inactive
@vercel vercel Bot temporarily deployed to Preview – ensrainbow.io May 28, 2026 08:16 Inactive
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
docs/ensnode.io/src/styles/starlight.css (1)

218-241: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Remove empty lines before declarations to satisfy stylelint.

The stylelint rule declaration-empty-line-before flags the empty lines at lines 224 and 236. Remove them for consistency with the project's CSS formatting rules.

🧹 Proposed fix
 .sl-markdown-content > p a:not(:has(code), [role="tab"]),
 .sl-markdown-content :is(ul, ol) > li a:not(:has(code), [role="tab"]),
 .starlight-aside__content a {
   text-decoration: underline;
   text-underline-offset: 4px;
-
   transition: text-underline-offset 0.2s ease-in-out;
-
   &:hover {
     text-underline-offset: 2px;
   }
 }
 
 .sl-markdown-content > p a:has(code):not([role="tab"]),
 .sl-markdown-content :is(ul, ol) > li a:has(code):not([role="tab"]) {
   text-decoration: underline;
   text-underline-offset: 4px;
-
   transition: text-underline-offset 0.2s ease-in-out;

   &:hover {
     text-underline-offset: 2px;
   }
 }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/ensnode.io/src/styles/starlight.css` around lines 218 - 241, Remove the
blank lines that precede declarations inside the rule blocks for the selectors
".sl-markdown-content > p a:not(:has(code), [role="tab"]), .sl-markdown-content
:is(ul, ol) > li a:not(:has(code), [role="tab"]), .starlight-aside__content a"
and ".sl-markdown-content > p a:has(code):not([role="tab"]),
.sl-markdown-content :is(ul, ol) > li a:has(code):not([role="tab"])" so there
are no empty lines immediately before properties like "text-decoration" and
"text-underline-offset" (remove the blank lines currently above those
declarations to satisfy the declaration-empty-line-before stylelint rule).
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@docs/ensnode.io/src/styles/starlight.css`:
- Around line 218-241: Remove the blank lines that precede declarations inside
the rule blocks for the selectors ".sl-markdown-content > p a:not(:has(code),
[role="tab"]), .sl-markdown-content :is(ul, ol) > li a:not(:has(code),
[role="tab"]), .starlight-aside__content a" and ".sl-markdown-content > p
a:has(code):not([role="tab"]), .sl-markdown-content :is(ul, ol) > li
a:has(code):not([role="tab"])" so there are no empty lines immediately before
properties like "text-decoration" and "text-underline-offset" (remove the blank
lines currently above those declarations to satisfy the
declaration-empty-line-before stylelint rule).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: d6d887eb-1be4-4c5f-a317-6d99d7ec7f7e

📥 Commits

Reviewing files that changed from the base of the PR and between d42e0e1 and 5ff7d12.

📒 Files selected for processing (5)
  • docs/ensnode.io/src/components/molecules/HostedEnsNodeInstance.astro
  • docs/ensnode.io/src/components/organisms/OmnigraphStaticExampleSet.astro
  • docs/ensnode.io/src/content/docs/docs/integrate/integration-options/enskit/example.mdx
  • docs/ensnode.io/src/content/docs/docs/integrate/integration-options/enssdk/example.mdx
  • docs/ensnode.io/src/styles/starlight.css

Copilot AI review requested due to automatic review settings May 28, 2026 08:19
@vercel vercel Bot temporarily deployed to Preview – ensrainbow.io May 28, 2026 08:19 Inactive
@vercel vercel Bot temporarily deployed to Preview – admin.ensnode.io May 28, 2026 08:19 Inactive
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.

Copy link
Copy Markdown
Member

@Y3drk Y3drk left a comment

Choose a reason for hiding this comment

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

Looks good to me.

Left two minor comments that would be cool to address before merging.

Comment thread docs/ensnode.io/src/styles/starlight.css Outdated
Comment thread docs/ensnode.io/src/styles/starlight.css Outdated
Copilot AI review requested due to automatic review settings May 28, 2026 15:36
@vercel vercel Bot temporarily deployed to Preview – ensrainbow.io May 28, 2026 15:37 Inactive
@vercel vercel Bot temporarily deployed to Preview – admin.ensnode.io May 28, 2026 15:37 Inactive
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 28, 2026

Actionable comments posted: 0

@notrab notrab merged commit 08fa508 into main May 28, 2026
21 checks passed
@notrab notrab deleted the fix/docs-inline-code-link-styling branch May 28, 2026 15:42
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