Repository navigation
Expand file tree
/
Copy pathsds-components.css
More file actions
242 lines (233 loc) · 12.2 KB
/
Copy pathsds-components.css
File metadata and controls
242 lines (233 loc) · 12.2 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
241
242
/* SDS for Mintlify: restyles Mintlify components (callouts, cards, badges, tabs, code blocks, accordions,
API fields) to the SDS look. Part of sds-mintlify-kit. Tokens only.
Selector stability legend:
[documented] = element selector or data-component-part listed in Mintlify custom-scripts docs
[observed] = data attribute present in the DOM but not documented
[tailwind] = relies on beating a Tailwind utility class; may break on Mintlify updates
#body-content is a documented ID and is used to win specificity over utilities. */
/* ---------- Callouts -> SDS Notification (Notification.scss) ---------- */
/* [documented] .callout, [data-callout-type], [data-component-part="callout-icon"|"callout-content"] */
#body-content .callout {
--sds-n-bg: var(--sds-clr-lilac-01);
--sds-n-border: var(--sds-clr-lilac-06);
--sds-n-icon: var(--sds-clr-lilac-09);
--sds-n-action: var(--sds-clr-lilac-11);
background-color: var(--sds-n-bg);
border: 1px solid var(--sds-n-border);
border-radius: 0.5rem;
padding: 0.75rem;
gap: 0.75rem;
color: var(--sds-clr-gray-11);
font-size: 0.875rem;
line-height: 1.25rem;
}
#body-content .callout[data-callout-type="note"] {
--sds-n-bg: var(--sds-clr-gray-01);
--sds-n-border: var(--sds-clr-gray-06);
--sds-n-icon: var(--sds-clr-gray-09);
--sds-n-action: var(--sds-clr-gray-12);
}
#body-content .callout[data-callout-type="tip"],
#body-content .callout[data-callout-type="check"] {
--sds-n-bg: var(--sds-clr-green-01);
--sds-n-border: var(--sds-clr-green-06);
--sds-n-icon: var(--sds-clr-green-09);
--sds-n-action: var(--sds-clr-green-11);
}
#body-content .callout[data-callout-type="warning"] {
--sds-n-bg: var(--sds-clr-amber-01);
--sds-n-border: var(--sds-clr-amber-06);
--sds-n-icon: var(--sds-clr-amber-09);
--sds-n-action: var(--sds-clr-amber-11);
}
#body-content .callout[data-callout-type="danger"] {
--sds-n-bg: var(--sds-clr-red-01);
--sds-n-border: var(--sds-clr-red-06);
--sds-n-icon: var(--sds-clr-red-09);
--sds-n-action: var(--sds-clr-red-11);
}
#body-content .callout [data-component-part="callout-icon"] { margin-top: 0.125rem; width: 1rem; }
#body-content .callout [data-component-part="callout-icon"] svg { color: var(--sds-n-icon); width: 1rem; height: 1rem; }
#body-content .callout [data-component-part="callout-content"],
#body-content .callout [data-component-part="callout-content"] p,
#body-content .callout [data-component-part="callout-content"] li {
color: var(--sds-clr-gray-11);
font-size: 0.875rem;
line-height: 1.25rem;
}
#body-content .callout [data-component-part="callout-content"] strong { color: var(--sds-clr-gray-12); font-weight: var(--sds-fw-medium); }
#body-content .callout [data-component-part="callout-content"] a {
color: var(--sds-n-action);
font-weight: var(--sds-fw-medium);
text-decoration: none;
border-bottom: 0;
}
#body-content .callout [data-component-part="callout-content"] a:hover { text-decoration: underline; }
/* ---------- Card -> SDS Card (Card.scss) ---------- */
/* [documented] .card, card-content-container, card-icon, card-title, card-content.
SDS Card is borderless (gray-01 surface); on a gray-01 page it needs the gray-06 hairline that
SDS Notification/Badge use, otherwise it disappears. Hover uses !important because Mintlify
sets hover:border-primary! [tailwind]. */
#body-content .card {
background-color: var(--sds-clr-gray-01);
border: 1px solid var(--sds-clr-gray-06);
border-radius: 0.5rem;
box-shadow: none;
transition: border-color var(--sds-anim-transition-default);
}
#body-content .card:hover { border-color: var(--sds-clr-gray-08) !important; }
#body-content .card [data-component-part="card-content-container"] { padding: 1.5rem; }
#body-content .card [data-component-part="card-icon"] { width: 1.25rem; height: 1.25rem; }
#body-content .card [data-component-part="card-icon"] svg {
width: 1.25rem; height: 1.25rem;
color: var(--sds-clr-gray-12); /* inline SVG icons (icon={<svg/>}) use currentColor */
}
#body-content .card [data-component-part="card-icon"] svg[style*="mask-image"] {
background-color: var(--sds-clr-gray-12); /* Mintlify's library icons are mask-image boxes colored by background */
}
#body-content .card [data-component-part="card-title"] {
font-size: 1rem;
line-height: 1.5rem;
font-weight: var(--sds-fw-medium);
color: var(--sds-clr-gray-12);
margin-top: 0.75rem;
}
#body-content .card [data-component-part="card-content"],
#body-content .card [data-component-part="card-content"] p {
font-size: 0.875rem;
line-height: 1.25rem;
color: var(--sds-clr-gray-11);
margin-top: 0.25rem;
}
#body-content .card [data-component-part="card-cta"] { color: var(--sds-clr-lilac-11); font-weight: var(--sds-fw-medium); font-size: 0.875rem; }
/* ---------- Badge -> SDS Badge md (Badge.scss) ---------- */
/* [observed] span[data-badge][data-color]; Mintlify colors mapped to SDS variants */
#body-content [data-badge] {
--sds-b-text: var(--sds-clr-gray-12);
--sds-b-bg: var(--sds-clr-gray-01);
--sds-b-border: var(--sds-clr-gray-06);
display: inline-flex;
align-items: center;
gap: 0.125rem;
font-family: var(--sds-ff-base);
font-size: 0.875rem;
line-height: 1.25rem;
font-weight: var(--sds-fw-medium);
letter-spacing: 0;
padding: 0.125rem 0.5rem;
border-radius: 6.25rem;
border: 1px solid var(--sds-b-border);
background-color: var(--sds-b-bg);
color: var(--sds-b-text);
}
#body-content [data-badge][data-color="blue"],
#body-content [data-badge][data-color="purple"] {
--sds-b-text: var(--sds-clr-lilac-11); --sds-b-bg: var(--sds-clr-lilac-02); --sds-b-border: var(--sds-clr-lilac-06);
}
#body-content [data-badge][data-color="green"] {
--sds-b-text: var(--sds-clr-green-11); --sds-b-bg: var(--sds-clr-green-02); --sds-b-border: var(--sds-clr-green-06);
}
#body-content [data-badge][data-color="red"] {
--sds-b-text: var(--sds-clr-red-11); --sds-b-bg: var(--sds-clr-red-02); --sds-b-border: var(--sds-clr-red-06);
}
#body-content [data-badge][data-color="yellow"],
#body-content [data-badge][data-color="orange"],
#body-content [data-badge][data-color="amber"] {
--sds-b-text: var(--sds-clr-amber-11); --sds-b-bg: var(--sds-clr-amber-02); --sds-b-border: var(--sds-clr-amber-06);
}
#body-content [data-badge][data-color="gray"],
#body-content [data-badge][data-color="grey"] {
--sds-b-text: var(--sds-clr-gray-11); --sds-b-bg: var(--sds-clr-gray-03); --sds-b-border: var(--sds-clr-gray-06);
}
/* ---------- Tabs ---------- */
/* [documented] .tabs, tabs-list, tab-button; [observed] data-active */
#body-content .tabs [data-component-part="tabs-list"] { border-bottom-color: var(--sds-clr-gray-06); gap: 1.5rem; }
#body-content .tabs [data-component-part="tab-button"] {
font-size: var(--sds-fs-secondary);
font-weight: var(--sds-fw-medium);
color: var(--sds-clr-gray-11);
border-bottom: 2px solid transparent;
padding-top: 0.5rem; padding-bottom: 0.625rem;
}
#body-content .tabs [data-component-part="tab-button"]:hover { color: var(--sds-clr-gray-12); border-bottom-color: var(--sds-clr-gray-06); }
#body-content .tabs [data-component-part="tab-button"][data-active="true"] { color: var(--sds-clr-gray-12); border-bottom-color: var(--sds-clr-lilac-09); }
/* ---------- CodeGroup / code blocks ---------- */
/* [documented] .code-group, code-group-tab-bar, code-block-root; tab buttons are [role=tab] [tailwind] */
#body-content .code-group {
border-radius: 0.5rem;
border-color: var(--sds-clr-gray-06);
background-color: var(--sds-clr-gray-02);
}
#body-content .code-group [role="tab"] { font-family: var(--sds-ff-base); font-size: 0.75rem; font-weight: var(--sds-fw-medium); color: var(--sds-clr-gray-11); }
#body-content .code-group [role="tab"][data-active],
#body-content .code-group [role="tab"][aria-selected="true"] { color: var(--sds-clr-gray-12); }
#body-content .code-group [role="tab"] .bg-primary { background-color: var(--sds-clr-lilac-09); }
/* One radius for the whole code block. Mintlify rounds the outer frame (.code-block, rounded-2xl = 16px) and the
inner fill separately; rounding only the inner fill leaves its corners inset inside the outer outline. */
#body-content .code-block,
#body-content .code-group {
border-radius: 0.5rem;
border-color: var(--sds-clr-gray-06);
overflow: hidden;
}
#body-content .code-block [data-component-part="code-block-root"],
#body-content .code-group [data-component-part="code-block-root"] { border-radius: inherit; }
#body-content .code-group .code-block { border: 0; border-radius: 0; }
/* Code groups round the inner fill with a layered !important that reads --rounded-xl (14px), so set the variable. */
#body-content .code-group { --rounded-xl: 0.5rem; }
/* github-dark ships a blue-gray #24292E, applied by Mintlify as html.dark .code-block-background { ... !important }.
Match the SDS dark surface; the extra #body-content specificity wins between two unlayered !important rules. */
html.dark #body-content .code-block-background { background-color: var(--sds-clr-gray-02) !important; }
/* The fade behind the copy button reads --fade-color-dark from an inline style (the theme's #24292E).
An author !important on the variable beats the inline value, so the fade matches the SDS surface. */
#body-content [data-fade-overlay] { --fade-color-dark: var(--sds-clr-gray-02) !important; }
/* ---------- Accordion ---------- */
/* [documented] .accordion, .accordion-group, accordion-button, accordion-title, accordion-caret-right */
#body-content .accordion,
#body-content .accordion-group { border-radius: 0.5rem; border-color: var(--sds-clr-gray-06); background-color: var(--sds-clr-gray-01); }
#body-content .accordion [data-component-part="accordion-button"] { padding: 0.875rem 1rem; }
#body-content .accordion [data-component-part="accordion-button"]:hover { background-color: var(--sds-clr-gray-02); }
#body-content .accordion [data-component-part="accordion-title"],
#body-content .accordion [data-component-part="accordion-title"] strong {
color: var(--sds-clr-gray-12);
font-size: var(--sds-fs-secondary);
font-weight: var(--sds-fw-medium);
}
#body-content .accordion [data-component-part="accordion-caret-right"] svg { color: var(--sds-clr-gray-09); }
/* ---------- Expandable ---------- */
/* [documented] .expandable, expandable-button, expandable-content */
#body-content details.expandable { border-radius: 0.5rem; border-color: var(--sds-clr-gray-06); }
#body-content [data-component-part="expandable-button"] { color: var(--sds-clr-gray-11); font-size: var(--sds-fs-secondary); font-weight: var(--sds-fw-medium); }
#body-content [data-component-part="expandable-button"]:hover { color: var(--sds-clr-gray-12); background-color: var(--sds-clr-gray-02); }
#body-content [data-component-part="expandable-content"] { border-top-color: var(--sds-clr-gray-04); }
/* ---------- ResponseField / ParamField ---------- */
/* [observed] .primitive-param-field, field-name, field-meta, field-info-pill, field-required-pill */
#body-content .primitive-param-field { border-bottom-color: var(--sds-clr-gray-04); }
#body-content [data-component-part="field-name"] { color: var(--sds-clr-gray-12); font-family: var(--sds-ff-monospace); font-weight: var(--sds-fw-medium); }
#body-content [data-component-part="field-info-pill"],
#body-content [data-component-part="field-required-pill"] {
font-family: var(--sds-ff-base);
font-size: 0.75rem;
line-height: 1.125rem;
font-weight: var(--sds-fw-medium);
padding: 0.125rem 0.375rem;
border-radius: 6.25rem;
border: 1px solid var(--sds-clr-gray-06);
background-color: var(--sds-clr-gray-03);
color: var(--sds-clr-gray-11);
}
#body-content [data-component-part="field-required-pill"] {
border-color: var(--sds-clr-lilac-06);
background-color: var(--sds-clr-lilac-02);
color: var(--sds-clr-lilac-11);
}
/* ---------- Code size + callout links (follow-up) ---------- */
/* Inconsolata runs ~17% narrower than paperMono; 15px keeps line length close to the old 14px. */
#body-content pre code,
#body-content pre { font-size: 0.9375rem; }
/* Mintlify sets [&_a]:text-current! inside a Tailwind cascade layer, and a layered !important beats any
unlayered rule. text-fill-color paints the link text without touching color, so it sidesteps that rule. */
#body-content .callout [data-component-part="callout-content"] a {
-webkit-text-fill-color: var(--sds-n-action);
text-decoration-color: var(--sds-n-action);
}