Skip to content

Commit 4345b0e

Browse files
committed
Refine sponsor hover and update CTA styling
1 parent c1bd048 commit 4345b0e

2 files changed

Lines changed: 37 additions & 16 deletions

File tree

theme/css/chrome.css

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,24 @@ a > .hljs {
5656
.menu-bar-link-request-update:visited {
5757
display: inline-flex;
5858
align-items: center;
59-
border-radius: 6px;
60-
padding: 6px 10px;
61-
color: #ffffff;
62-
background: #d12f1f;
59+
border: 1px solid color-mix(in srgb, var(--links) 45%, transparent);
60+
border-radius: 999px;
61+
padding: 5px 11px;
62+
color: var(--menu-bar-link-color-hover);
63+
background:
64+
linear-gradient(135deg,
65+
color-mix(in srgb, var(--links) 20%, transparent),
66+
color-mix(in srgb, var(--sidebar-active) 16%, transparent));
6367
font-weight: 700;
68+
box-shadow: inset 0 0 0 1px color-mix(in srgb, #ffffff 10%, transparent);
6469
}
6570
.menu-bar-link-request-update:hover {
66-
color: #ffffff;
67-
background: #f04b36;
71+
color: var(--menu-bar-link-color-hover);
72+
border-color: color-mix(in srgb, var(--links) 70%, transparent);
73+
background:
74+
linear-gradient(135deg,
75+
color-mix(in srgb, var(--links) 30%, transparent),
76+
color-mix(in srgb, var(--sidebar-active) 24%, transparent));
6877
}
6978
#menu-bar.sticky,
7079
#menu-bar-hover-placeholder:hover + #menu-bar,
@@ -296,15 +305,21 @@ body.sidebar-visible #menu-bar {
296305
#menubar-collapse-popup .menu-bar-link-request-update:visited {
297306
margin: 6px 8px;
298307
padding: 8px 12px;
299-
color: #ffffff;
300-
background: #d12f1f;
308+
color: var(--fg);
309+
background:
310+
linear-gradient(135deg,
311+
color-mix(in srgb, var(--links) 18%, var(--bg)),
312+
color-mix(in srgb, var(--sidebar-active) 14%, var(--bg)));
301313
}
302314
#menubar-collapse-popup .menu-bar-link:hover {
303315
background-color: var(--theme-hover);
304316
}
305317
#menubar-collapse-popup .menu-bar-link-request-update:hover {
306-
color: #ffffff;
307-
background: #f04b36;
318+
color: var(--menu-bar-link-color-hover);
319+
background:
320+
linear-gradient(135deg,
321+
color-mix(in srgb, var(--links) 28%, var(--bg)),
322+
color-mix(in srgb, var(--sidebar-active) 22%, var(--bg)));
308323
}
309324

310325
/* Languages Menu Popup */

theme/pagetoc.css

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@
144144
padding: 4px;
145145
grid-area: sponsor-image;
146146
align-self: start;
147+
transition-duration: 0s;
147148
}
148149
.sidesponsor:hover {
149150
display: grid !important;
@@ -177,7 +178,9 @@
177178
font-size: 1.55rem;
178179
line-height: 1.15;
179180
overflow-wrap: anywhere;
180-
animation: sponsorTextReveal .3s ease .12s both;
181+
visibility: hidden;
182+
opacity: 0;
183+
animation: sponsorTextReveal .12s ease .18s forwards;
181184
}
182185
.sidesponsor .sponsor-description{
183186
display: block;
@@ -205,9 +208,8 @@
205208
visibility: visible;
206209
overflow: auto;
207210
overscroll-behavior: contain;
208-
transition:
209-
opacity .18s ease .14s,
210-
visibility 0s linear 0s;
211+
animation: sponsorTextReveal .12s ease .18s forwards;
212+
transition: none;
211213
}
212214
.sidesponsor .sponsor-cta{
213215
margin-top: auto;
@@ -234,14 +236,18 @@
234236
font-size: 1.2rem;
235237
font-weight: 800;
236238
line-height: 1.1;
237-
animation: sponsorTextReveal .3s ease .12s both;
239+
visibility: hidden;
240+
opacity: 0;
241+
animation: sponsorTextReveal .12s ease .18s forwards;
238242
}
239243
@keyframes sponsorTextReveal {
240-
0%, 45% {
244+
0% {
241245
opacity: 0;
246+
visibility: hidden;
242247
}
243248
100% {
244249
opacity: 1;
250+
visibility: visible;
245251
}
246252
}
247253
.sidesponsor-bsa {

0 commit comments

Comments
 (0)