Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ interface ENSNodeServiceCardProps {
const { title, description, href } = Astro.props as ENSNodeServiceCardProps;
---

<a href={href} class="not-content group w-full h-fit min-h-[100px] flex flex-row justify-between items-center gap-5 border border-gray-200 hover:border-gray-300 hover:shadow-xs cursor-pointer rounded-2xl overflow-hidden p-4">
<a href={href} class="not-content group w-full h-fit min-h-[100px] flex flex-row justify-between items-center gap-5 border border-gray-200 hover:border-[#4a5c63] hover:shadow cursor-pointer rounded-2xl overflow-hidden p-4 transition-all duration-200">
Comment thread
vercel[bot] marked this conversation as resolved.
<div class="w-fit flex flex-row justify-start items-center gap-5">
<slot name="icon"/>
<div class="not-content w-full h-fit flex flex-col justify-start items-start gap-2">
<h4 class="not-content text-2xl leading-normal font-semibold text-black">{title}</h4>
<p class="not-content text-base leading-normal text-[var(--sl-color-text)]">{description}</p>
</div>
</div>
<Icon name="lucide:chevron-right" class="not-content h-10 w-10 shrink-0 text-gray-200 group-hover:text-gray-300" />
<Icon name="lucide:chevron-right" class="not-content h-10 w-10 shrink-0 text-gray-200 group-hover:text-[#4a5c63]" />
Comment on lines +13 to +21
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 The hover color #4a5c63 is hardcoded in two places on this element. This value won't respond to Tailwind theme changes or dark/light mode switching, and it silently diverges from the design-token system already used elsewhere (e.g. var(--sl-color-text)). The closest existing token—var(--sl-color-accent)—gives the same teal-ish look while staying theme-aware.

Suggested change
<a href={href} class="not-content group w-full h-fit min-h-[100px] flex flex-row justify-between items-center gap-5 border border-gray-200 hover:border-[#4a5c63] hover:shadow cursor-pointer rounded-2xl overflow-hidden p-4 transition-all duration-200">
<div class="w-fit flex flex-row justify-start items-center gap-5">
<slot name="icon"/>
<div class="not-content w-full h-fit flex flex-col justify-start items-start gap-2">
<h4 class="not-content text-2xl leading-normal font-semibold text-black">{title}</h4>
<p class="not-content text-base leading-normal text-[var(--sl-color-text)]">{description}</p>
</div>
</div>
<Icon name="lucide:chevron-right" class="not-content h-10 w-10 shrink-0 text-gray-200 group-hover:text-gray-300" />
<Icon name="lucide:chevron-right" class="not-content h-10 w-10 shrink-0 text-gray-200 group-hover:text-[#4a5c63]" />
<a href={href} class="not-content group w-full h-fit min-h-[100px] flex flex-row justify-between items-center gap-5 border border-gray-200 hover:border-[var(--sl-color-accent)] hover:shadow cursor-pointer rounded-2xl overflow-hidden p-4 transition-all duration-200">
<div class="w-fit flex flex-row justify-start items-center gap-5">
<slot name="icon"/>
<div class="not-content w-full h-fit flex flex-col justify-start items-start gap-2">
<h4 class="not-content text-2xl leading-normal font-semibold text-black">{title}</h4>
<p class="not-content text-base leading-normal text-[var(--sl-color-text)]">{description}</p>
</div>
</div>
<Icon name="lucide:chevron-right" class="not-content h-10 w-10 shrink-0 text-gray-200 group-hover:text-[var(--sl-color-accent)]" />

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

  • We only support light mode, so theme changes are not a concern
  • The color was chosen to match the hover colors of the search component

</a>
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ sidebar:
order: 2
---

import { Icon } from "@astrojs/starlight/components";
import EnskitExampleInteractivePlayground from "@components/organisms/EnskitExampleInteractivePlayground";
import HostedInstanceSdkVersionWarning from "@components/molecules/HostedInstanceSdkVersionWarning.astro";

Expand All @@ -26,4 +27,7 @@ StackBlitz is having problems with embedded WebContainer projects as of **May 19

<EnskitExampleInteractivePlayground client:load />

[Back to enskit overview](/docs/integrate/integration-options/enskit)
<a class="group w-fit flex flex-row justify-start items-center gap-2 mt-4" href="/docs/integrate/integration-options/enskit">
<Icon name="left-arrow" class="h-5 w-5 text-[var(--sl-color-accent)] group-hover:text-[var(--sl-color-white)] transition-colors duration-200" />
Comment thread
Y3drk marked this conversation as resolved.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 On hover, the icon color transitions to --sl-color-white. In this project --sl-color-white is mapped to var(--color-surface), which in light mode is a very light (near-white) value — the same family of colour as the page background. The icon would effectively disappear on hover in light mode. Using --sl-color-accent-high preserves visibility in both themes. The same issue exists in the enssdk example.

Suggested change
<Icon name="left-arrow" class="h-5 w-5 text-[var(--sl-color-accent)] group-hover:text-[var(--sl-color-white)] transition-colors duration-200" />
<Icon name="left-arrow" class="h-5 w-5 text-[var(--sl-color-accent)] group-hover:text-[var(--sl-color-accent-high)] transition-colors duration-200" />

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

  • In our current setup, --sl-color-white is a near black color, so the visibility is not an issue.
  • Additionally, that color matches the hover styles of the text-body links that we want to mimic there

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You're right — I can see in starlight.css that --sl-color-white is remapped to var(--color-surface), and that same token is used consistently throughout the stylesheet for hover states (sidebar items, pagination arrows, heading links, etc.). My concern was based on the standard Starlight convention where --sl-color-white is literally white, but your theme inverts that mapping intentionally. The usage here is consistent with the rest of the design system. My comment was incorrect.

Tip: You can give me more context with [.greptile/rules.md](https://www.greptile.com/docs/code-review/custom-standards) so I get this right next time.

<p class="not-content m-0 underline underline-offset-4 group-hover:underline-offset-2 transition-all duration-200">Back to enskit overview</p>
</a>
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ sidebar:
order: 2
---

import { Icon } from "@astrojs/starlight/components";
import EnssdkExampleInteractivePlayground from "@components/organisms/EnssdkExampleInteractivePlayground";
import HostedInstanceSdkVersionWarning from "@components/molecules/HostedInstanceSdkVersionWarning.astro";

Expand All @@ -26,4 +27,7 @@ StackBlitz is having problems with embedded WebContainer projects as of **May 19

<EnssdkExampleInteractivePlayground client:load height="700" />

[Back to enssdk overview](/docs/integrate/integration-options/enssdk)
<a class="group w-fit flex flex-row justify-start items-center gap-2 mt-4" href="/docs/integrate/integration-options/enssdk">
<Icon name="left-arrow" class="h-5 w-5 text-[var(--sl-color-accent)] group-hover:text-[var(--sl-color-white)] transition-colors duration-200" />
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Same light-mode icon visibility concern as in the enskit example — --sl-color-white resolves to a near-white surface colour, making the icon invisible on hover against the light page background.

Suggested change
<Icon name="left-arrow" class="h-5 w-5 text-[var(--sl-color-accent)] group-hover:text-[var(--sl-color-white)] transition-colors duration-200" />
<Icon name="left-arrow" class="h-5 w-5 text-[var(--sl-color-accent)] group-hover:text-[var(--sl-color-accent-high)] transition-colors duration-200" />

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

  • In our current setup, --sl-color-white is a near black color, so the visibility is not an issue.
  • Additionally, that color matches the hover styles of the text-body links that we want to mimic there

<p class="not-content m-0 underline underline-offset-4 group-hover:underline-offset-2 transition-all duration-200">Back to enssdk overview</p>
</a>
62 changes: 41 additions & 21 deletions docs/ensnode.io/src/styles/starlight.css
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
/* Docked sidebar: narrow peek strip on desktop; expands on hover or keyboard focus within nav */
@media (min-width: 50rem) {
.page[data-sidebar-docked] {
--sl-sidebar-docked-peek: 1rem;
--sl-sidebar-docked-peek: 4rem;
/* Match Starlight splash / no-sidebar content width (default with sidebar is 45rem). */
--sl-content-width: 67.5rem;
}
Expand All @@ -94,7 +94,6 @@
.page[data-sidebar-docked] nav.sidebar {
position: fixed;
inset-block: var(--sl-nav-height) 0;
inset-inline-start: 0;
Comment thread
vercel[bot] marked this conversation as resolved.
z-index: var(--sl-z-index-menu);
width: var(--sl-sidebar-docked-peek);
overflow: hidden;
Expand All @@ -116,24 +115,24 @@
border-inline-end: none;
}

.page[data-sidebar-docked] nav.sidebar::after {
content: "›";
position: absolute;
inset-block: 0;
inset-inline-end: 0;
width: var(--sl-sidebar-docked-peek);
display: flex;
align-items: center;
justify-content: center;
color: var(--sl-color-gray-3);
font-size: 1.125rem;
line-height: 1;
pointer-events: none;
/* Docked + collapsed: show only the top-level topic icons */
.page[data-sidebar-docked] nav.sidebar:not(:hover):not(:focus-within)
.sidebar-content
> :not(.starlight-sidebar-topics) {
display: none;
}

.page[data-sidebar-docked]
nav.sidebar:not(:hover):not(:focus-within)
.starlight-sidebar-topics-icon
+ div {
display: none;
}

.page[data-sidebar-docked] nav.sidebar:hover::after,
.page[data-sidebar-docked] nav.sidebar:focus-within::after {
opacity: 0;
/* Docked + collapsed: Highlight only the icon of the current topic */
.page[data-sidebar-docked] nav.sidebar:not(:hover):not(:focus-within)
a.starlight-sidebar-topics-current {
background-color: transparent !important;
}
}

Expand Down Expand Up @@ -308,13 +307,29 @@ a[rel="prev"]:hover {
background-color 0.2s ease-in-out;
}

/* Only apply hover effects to non-selected items */
#starlight__sidebar a:not([aria-current="page"]):hover {
/* Only apply hover effects to:
* * non-selected items
* * not open expandable items (counterpart of non-selected for normal items)
*/
#starlight__sidebar a:not([aria-current="page"]):hover,
#starlight__sidebar details:not([open]):hover {
background-color: rgba(128, 128, 128, 0.1);
transform: translateX(2px);
border-radius: 6px;
}

/** Additional styling required for the
* expandable items in the sidebar
*/
#starlight__sidebar details:not([open]) {
transition: all 0.2s ease-in-out;
color: var(--sl-color-gray-2);
&:hover,
&:hover span {
color: var(--sl-color-white);
}
}
Comment thread
Y3drk marked this conversation as resolved.

a.starlight-sidebar-topics-current {
background-color: rgb(0, 128, 188) !important;
color: white !important;
Expand All @@ -332,13 +347,18 @@ a.starlight-sidebar-topics-current .starlight-sidebar-topics-icon {
box-shadow 0.2s ease-in-out;
}

/* Make sure that all non-top-level sidebar items are not enlarged and non-bold */
/* Make sure that all non-top-level sidebar items are:
* * not enlarged
* * not bolded
* * the same color as the rest of the sidebar text
*/
ul.top-level details details > summary .group-label span {
@media (min-width: 50rem) {
font-size: var(--sl-text-sm);
}

font-weight: normal;
color: var(--sl-color-gray-2);
}

/* Make sure that social icons in the sidebar do not move on hover */
Expand Down
Loading