Skip to content

Commit a1752ff

Browse files
authored
style: align sidebar padding and polish header/sidebar typography (#29172)
1 parent 9f01c43 commit a1752ff

File tree

3 files changed

+19
-11
lines changed

3 files changed

+19
-11
lines changed

src/components/overrides/Header.astro

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import AgentDirective from "../AgentDirective.astro";
2424
<a
2525
id="header-login-button"
2626
href="https://dash.cloudflare.com/"
27-
class="header-login"
27+
class="header-login btn-soft"
2828
>
2929
Log in
3030
</a>
@@ -68,15 +68,25 @@ import AgentDirective from "../AgentDirective.astro";
6868
align-items: center;
6969
justify-content: center;
7070
height: 2.25rem;
71-
padding: 0 1.25rem;
71+
padding: 0 0.875rem;
7272
border-radius: 0.5rem;
73+
border: 1px solid transparent;
7374
font-size: 0.875rem;
7475
font-weight: 500;
7576
line-height: 1;
7677
white-space: nowrap;
7778
text-decoration: none;
78-
color: var(--color-header-btn-text);
79-
background-color: var(--color-header-btn-bg);
79+
transition: color 150ms, background-color 150ms, border-color 150ms;
80+
}
81+
82+
.header-login {
83+
background-color: var(--color-header-fill);
84+
color: var(--color-header-text);
85+
}
86+
87+
.header-login:hover {
88+
background-color: var(--color-header-line);
89+
color: var(--color-header-hover-text);
8090
}
8191

8292
:global(.site-title) {

src/components/overrides/Sidebar.astro

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,11 @@ const [product, module] = Astro.url.pathname.split("/").filter(Boolean);
1010
<div
1111
class="sticky top-0 z-[1] flex flex-col gap-2 bg-[var(--sl-color-black)] py-3.5 min-[50rem]:bg-[var(--sl-color-bg-sidebar)]"
1212
>
13-
<div class="sidebar-product-title px-1">
14-
<a href={"/" + product + "/"} class="flex items-center gap-2 no-underline">
13+
<div class="sidebar-product-title">
14+
<a href={"/" + product + "/"} class="flex items-center gap-1 no-underline">
1515
<AstroIcon name={product} size="32px" class="text-cl1-brand-orange" />
16-
<span class="text-xl text-black">
17-
<strong>
18-
{lookupProductTitle(product, module)}
19-
</strong>
16+
<span class="text-xl font-semibold text-black">
17+
{lookupProductTitle(product, module)}
2018
</span>
2119
</a>
2220
</div>

src/styles/sidebar.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
.sidebar-content {
66
gap: 2px;
7-
padding: 0 0.75rem 1rem;
7+
padding: 0rem 1.5rem 1.5rem 1.5rem;
88
}
99

1010
/* ── Light theme ── */

0 commit comments

Comments
 (0)