-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyle.css
More file actions
240 lines (206 loc) · 6.37 KB
/
Copy pathstyle.css
File metadata and controls
240 lines (206 loc) · 6.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
/* table of contents: chevron next to the active (deepest) section */
toc-item > a {
position: relative;
padding-left: 1rem !important;
}
toc-item[data-active-deepest] > a::before {
content: "";
position: absolute;
left: 0;
top: 50%;
width: 0.75rem;
height: 0.75rem;
transform: translateY(-50%);
background-color: currentColor;
-webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='9 18 15 12 9 6'/></svg>") no-repeat center / contain;
mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='9 18 15 12 9 6'/></svg>") no-repeat center / contain;
pointer-events: none;
}
/* topbar logo: render smaller than its natural width */
#navbar a[href="/"] img,
#navbar a[href="/"] svg,
#sidebar a[href="/"] img,
#sidebar a[href="/"] svg {
max-width: 14rem;
height: auto;
}
/* topbar pill buttons: search, Ask AI, secondary CTA (Get support) */
#search-bar-entry,
#assistant-entry,
li.navbar-link > :is(a, button) {
background-color: rgb(249 250 251) !important; /* gray-50 */
box-shadow: inset 0 0 0 1px rgb(243 244 246) !important; /* gray-100 ring */
border: none !important;
border-radius: 9999px !important;
height: 2.25rem !important;
padding: 0 1rem !important;
&:hover {
background-color: rgb(243 244 246) !important; /* gray-100 */
box-shadow: inset 0 0 0 1px rgb(229 231 235) !important; /* gray-200 ring */
}
.dark & {
background-color: rgba(255, 255, 255, 0.04) !important;
box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08) !important;
&:hover {
background-color: rgba(255, 255, 255, 0.08) !important;
box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15) !important;
}
}
}
/* product switcher: matches the navbar bg with a subtle outline + primary-tinted icons */
[data-component-part="products-selector-trigger"] {
background-color: rgb(var(--background-light)) !important;
box-shadow: inset 0 0 0 1px rgb(229 231 235) !important; /* gray-200 outline */
border: none !important;
border-radius: 0.75rem !important;
height: 2.25rem !important;
padding: 0 0.75rem !important;
transition: background-color 0.15s ease-out, box-shadow 0.15s ease-out !important;
&:hover {
box-shadow: inset 0 0 0 1px rgb(209 213 219) !important; /* gray-300 */
}
.dark & {
background-color: rgb(var(--background-dark)) !important;
box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.10) !important;
&:hover {
box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18) !important;
}
}
}
.nav-dropdown-products-selector-item-icon {
background-color: rgb(var(--primary)) !important;
color: #ffffff !important;
border-radius: 0.375rem !important;
aspect-ratio: 1;
svg {
background-color: #ffffff !important;
}
}
/* trigger leading icon: draw a primary-colored chip behind the icon via ::before,
then layer the icon above with white stroke */
[data-component-part="products-selector-trigger"] {
position: relative;
--icon-left-offset: 0.05rem;
&::before {
content: "";
position: absolute;
top: 50%;
left: calc(0.5rem - var(--icon-left-offset));
transform: translateY(-50%);
width: 1.5rem;
height: 1.5rem;
border-radius: 0.5rem;
background: rgb(var(--primary));
pointer-events: none;
}
svg:not(:last-child) {
position: relative;
z-index: 1;
filter: brightness(0) invert(1);
margin-right: 0.25rem;
margin-left: calc(-1 * var(--icon-left-offset));
}
}
/* hide the topbar search/assistant entries when the homepage entry is shown */
#search-bar-entry,
#assistant-entry {
transition: opacity 0.15s ease-out;
body:has(#custom-homepage-assistant-entry) & {
opacity: 0;
pointer-events: none;
}
}
/* primary CTA in the topbar: style the inner clickable, not the <li> wrapper */
#topbar-cta-button {
background: transparent !important;
box-shadow: none !important;
padding: 0 !important;
height: auto !important;
&,
*,
> * {
border-radius: 9999px !important;
}
> :is(a, button, div, span) {
background-color: rgb(var(--primary)) !important;
color: #ffffff !important;
height: 2.25rem !important;
padding: 0 1rem !important;
display: inline-flex !important;
align-items: center !important;
gap: 0.375rem !important;
box-shadow: none !important;
border: none !important;
overflow: hidden !important;
transition: background-color 0.15s ease-out !important;
&:hover {
background-color: rgb(var(--primary-dark)) !important;
}
}
*,
> * * {
color: #ffffff !important;
background-color: transparent !important;
}
}
/* tighten spacing between the topbar CTA buttons */
ul:is(:has(> #topbar-cta-button), :has(> li.navbar-link)) {
gap: 0.25rem !important;
> li + li {
margin-left: 0.125rem !important;
}
}
/* custom styling for the suggested articles section on the homepage */
.columns.suggested-articles {
gap: 1.5rem 2rem;
.card {
border: none;
border-radius: 0;
margin: 0;
[data-component-part="card-content-container"] {
display: flex;
flex-direction: column;
gap: 1rem;
padding: 0;
[data-component-part="card-icon"] {
display: grid;
place-items: center;
width: 100%;
height: auto;
aspect-ratio: 2;
border-radius: 1rem;
transition: background-color 0.15s ease-out;
background-color: rgb(var(--primary));
color: #ffffff !important;
svg {
scale: 1.5;
background-color: #ffffff;
}
.group:hover & {
filter: brightness(0.95);
}
.dark & {
.group:hover & {
filter: brightness(1.1);
}
}
}
[data-component-part="card-icon"] + div {
display: contents;
}
:is(
[data-component-part="card-title"],
[data-component-part="card-content"],
[data-component-part="card-cta"]
) {
margin: 0;
}
[data-component-part="card-content"] {
text-wrap: pretty;
}
[data-component-part="card-cta"] button {
font-size: inherit;
}
}
}
}