mirror of
https://github.com/mintlify/docs.git
synced 2026-09-14 13:35:46 +08:00
e7874fb66a
* theme icon animation * added motion reduction handling * stroke change to 1.5px --------- Co-authored-by: fay <fayrouzdakrouri@gmai.com>
647 lines
16 KiB
CSS
647 lines
16 KiB
CSS
html[data-current-path$="/assistant/widget"] [data-assistant-playground-layout] {
|
|
--assistant-playground-frame: #f8f8f8;
|
|
--assistant-playground-surface: #fcfcfc;
|
|
--assistant-playground-text-strong: #171717;
|
|
--assistant-playground-text-default: #6f6f6f;
|
|
--assistant-playground-text-weak: #8f8f8f;
|
|
--assistant-playground-stroke: rgba(0, 0, 0, 0.07);
|
|
--assistant-playground-switch: #147d6f;
|
|
width: min(100%, 720px);
|
|
margin: 1.5rem auto;
|
|
font-family: var(--font-inter), Inter, ui-sans-serif, system-ui, sans-serif;
|
|
}
|
|
|
|
html.dark[data-current-path$="/assistant/widget"]
|
|
[data-assistant-playground-layout] {
|
|
--assistant-playground-frame: #1c1c1c;
|
|
--assistant-playground-surface: #242424;
|
|
--assistant-playground-text-strong: #f5f5f5;
|
|
--assistant-playground-text-default: #b8b8b8;
|
|
--assistant-playground-text-weak: #8f8f8f;
|
|
--assistant-playground-stroke: rgba(255, 255, 255, 0.12);
|
|
}
|
|
|
|
html[data-current-path$="/assistant/widget"] .assistant-playground-frame {
|
|
position: relative;
|
|
height: 720px;
|
|
overflow: hidden;
|
|
border-radius: 8px;
|
|
background: var(--assistant-playground-frame);
|
|
box-shadow: 0 0 0 1px var(--assistant-playground-stroke);
|
|
}
|
|
|
|
html[data-current-path$="/assistant/widget"] .assistant-playground-toolbar {
|
|
position: absolute;
|
|
z-index: 4;
|
|
top: 10px;
|
|
left: 10px;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
}
|
|
|
|
html[data-current-path$="/assistant/widget"]
|
|
.assistant-playground-toolbar__button {
|
|
display: inline-flex;
|
|
height: 28px;
|
|
align-items: center;
|
|
justify-content: center;
|
|
overflow: hidden;
|
|
border: 0;
|
|
border-radius: 6px;
|
|
background: var(--assistant-playground-surface);
|
|
color: var(--assistant-playground-text-strong);
|
|
box-shadow:
|
|
0 4px 2px rgba(0, 0, 0, 0.04),
|
|
0 1px 1px rgba(0, 0, 0, 0.08),
|
|
0 1px 1px rgba(0, 0, 0, 0.04),
|
|
0 0 0 1px var(--assistant-playground-stroke);
|
|
cursor: pointer;
|
|
}
|
|
|
|
html[data-current-path$="/assistant/widget"]
|
|
.assistant-playground-toolbar__button:hover {
|
|
background: color-mix(
|
|
in srgb,
|
|
var(--assistant-playground-surface),
|
|
var(--assistant-playground-text-strong) 4%
|
|
);
|
|
}
|
|
|
|
html[data-current-path$="/assistant/widget"]
|
|
.assistant-playground-toolbar__button:focus-visible,
|
|
html[data-current-path$="/assistant/widget"]
|
|
.assistant-playground-field__control:focus-visible,
|
|
html[data-current-path$="/assistant/widget"]
|
|
.assistant-playground-accent[data-keyboard-focus="true"],
|
|
html[data-current-path$="/assistant/widget"]
|
|
.assistant-playground-switch:has(
|
|
.assistant-playground-switch__input:focus-visible
|
|
),
|
|
html[data-current-path$="/assistant/widget"]
|
|
.assistant-playground-code__tabs
|
|
button:focus-visible {
|
|
outline: 2px solid #006adc;
|
|
outline-offset: 2px;
|
|
}
|
|
|
|
html[data-current-path$="/assistant/widget"]
|
|
.assistant-playground-toolbar__button--labeled {
|
|
gap: 2px;
|
|
padding: 4px 8px;
|
|
font-size: 13px;
|
|
font-weight: 500;
|
|
line-height: 20px;
|
|
letter-spacing: -0.013px;
|
|
}
|
|
|
|
html[data-current-path$="/assistant/widget"]
|
|
.assistant-playground-toolbar__button--labeled
|
|
> span {
|
|
padding-inline: 4px;
|
|
}
|
|
|
|
html[data-current-path$="/assistant/widget"]
|
|
.assistant-playground-toolbar__button--icon {
|
|
width: 28px;
|
|
padding: 6px;
|
|
}
|
|
|
|
html[data-current-path$="/assistant/widget"]
|
|
.assistant-playground-toolbar__button
|
|
svg {
|
|
width: 16px;
|
|
height: 16px;
|
|
color: var(--assistant-playground-text-default);
|
|
opacity: 1;
|
|
}
|
|
|
|
html[data-current-path$="/assistant/widget"] .theme-icon__ring-wrap,
|
|
html[data-current-path$="/assistant/widget"] .theme-icon__fill-wrap {
|
|
transform-origin: 0 0;
|
|
transition-property: transform;
|
|
transition-duration: 0.5s;
|
|
transition-timing-function: cubic-bezier(0.45, 0.05, 0.25, 1);
|
|
}
|
|
|
|
html[data-current-path$="/assistant/widget"]
|
|
.theme-icon--dark
|
|
.theme-icon__ring-wrap {
|
|
transform: rotate(180deg);
|
|
}
|
|
|
|
html[data-current-path$="/assistant/widget"]
|
|
.theme-icon--dark
|
|
.theme-icon__fill-wrap {
|
|
transform: scaleX(-1);
|
|
}
|
|
|
|
html[data-current-path$="/assistant/widget"] .assistant-playground-preview {
|
|
position: absolute;
|
|
inset: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
|
|
html[data-current-path$="/assistant/widget"]
|
|
.assistant-playground-preview
|
|
> div:has(> iframe[title="Live Assistant Widget preview"]) {
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
|
|
html[data-current-path$="/assistant/widget"]
|
|
.assistant-playground-preview
|
|
iframe[title="Live Assistant Widget preview"] {
|
|
display: block;
|
|
width: 100%;
|
|
height: 100% !important;
|
|
aspect-ratio: auto !important;
|
|
border: 0;
|
|
background: var(--assistant-playground-frame);
|
|
color-scheme: light dark;
|
|
}
|
|
|
|
html.dark[data-current-path$="/assistant/widget"]
|
|
.assistant-playground-preview
|
|
iframe[title="Live Assistant Widget preview"] {
|
|
color-scheme: dark;
|
|
}
|
|
|
|
html[data-current-path$="/assistant/widget"]
|
|
.assistant-playground-preview__status {
|
|
position: absolute;
|
|
inset: 0;
|
|
z-index: 2;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 8px;
|
|
padding: 20px;
|
|
color: var(--assistant-playground-text-default);
|
|
font-size: 12px;
|
|
line-height: 18px;
|
|
text-align: center;
|
|
pointer-events: none;
|
|
}
|
|
|
|
html[data-current-path$="/assistant/widget"]
|
|
.assistant-playground-preview__spinner {
|
|
width: 16px;
|
|
height: 16px;
|
|
flex: 0 0 auto;
|
|
border: 1.5px solid #d4d4d4;
|
|
border-top-color: var(--assistant-playground-text-default);
|
|
border-radius: 50%;
|
|
animation: assistant-playground-spin 700ms linear infinite;
|
|
}
|
|
|
|
@keyframes assistant-playground-spin {
|
|
to {
|
|
transform: rotate(360deg);
|
|
}
|
|
}
|
|
|
|
@media (prefers-reduced-motion: reduce) {
|
|
html[data-current-path$="/assistant/widget"] .assistant-playground-frame {
|
|
transition: none;
|
|
}
|
|
|
|
html[data-current-path$="/assistant/widget"]
|
|
.assistant-playground-preview__spinner {
|
|
animation: none;
|
|
}
|
|
|
|
html[data-current-path$="/assistant/widget"] .theme-icon__ring-wrap,
|
|
html[data-current-path$="/assistant/widget"] .theme-icon__fill-wrap {
|
|
transition: none;
|
|
}
|
|
}
|
|
|
|
html[data-current-path$="/assistant/widget"] .assistant-playground-customizer {
|
|
position: absolute;
|
|
z-index: 3;
|
|
top: 50px;
|
|
left: 10px;
|
|
width: min(307px, calc(100% - 20px));
|
|
overflow: visible;
|
|
padding: 6px;
|
|
border-radius: 6px;
|
|
background: var(--assistant-playground-surface);
|
|
color: var(--assistant-playground-text-strong);
|
|
box-shadow:
|
|
0 4px 2px rgba(0, 0, 0, 0.04),
|
|
0 1px 1px rgba(0, 0, 0, 0.08),
|
|
0 1px 1px rgba(0, 0, 0, 0.04),
|
|
0 0 0 1px var(--assistant-playground-stroke);
|
|
}
|
|
|
|
html[data-current-path$="/assistant/widget"]
|
|
.assistant-playground-customizer[hidden] {
|
|
display: none;
|
|
}
|
|
|
|
html[data-current-path$="/assistant/widget"]
|
|
.assistant-playground-customizer__section {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 1px;
|
|
}
|
|
|
|
html[data-current-path$="/assistant/widget"]
|
|
.assistant-playground-customizer__heading {
|
|
display: flex;
|
|
min-height: 28px;
|
|
align-items: center;
|
|
padding: 4px 8px;
|
|
color: var(--assistant-playground-text-weak);
|
|
font-size: 13px;
|
|
font-weight: 400;
|
|
line-height: 20px;
|
|
letter-spacing: -0.013px;
|
|
}
|
|
|
|
html[data-current-path$="/assistant/widget"] .assistant-playground-field {
|
|
display: flex;
|
|
min-height: 40px;
|
|
align-items: center;
|
|
gap: 20px;
|
|
padding: 6px 8px;
|
|
font-size: 14px;
|
|
font-weight: 400;
|
|
line-height: 20px;
|
|
letter-spacing: -0.014px;
|
|
}
|
|
|
|
html[data-current-path$="/assistant/widget"]
|
|
.assistant-playground-field__label {
|
|
width: 91px;
|
|
flex: 0 0 91px;
|
|
color: var(--assistant-playground-text-strong);
|
|
}
|
|
|
|
html[data-current-path$="/assistant/widget"] .assistant-playground-select,
|
|
html[data-current-path$="/assistant/widget"] .assistant-playground-accent {
|
|
width: 168px;
|
|
min-width: 0;
|
|
flex: 1 1 auto;
|
|
}
|
|
|
|
html[data-current-path$="/assistant/widget"]
|
|
.assistant-playground-field__control,
|
|
html[data-current-path$="/assistant/widget"] .assistant-playground-accent {
|
|
height: 28px;
|
|
border: 0;
|
|
border-radius: 6px;
|
|
background: var(--assistant-playground-surface);
|
|
color: var(--assistant-playground-text-default);
|
|
box-shadow:
|
|
0 1px 1px rgba(0, 0, 0, 0.1),
|
|
0 0 0 1px var(--assistant-playground-stroke);
|
|
font: inherit;
|
|
}
|
|
|
|
html[data-current-path$="/assistant/widget"] .assistant-playground-select {
|
|
position: relative;
|
|
}
|
|
|
|
html[data-current-path$="/assistant/widget"]
|
|
.assistant-playground-select[data-open="true"] {
|
|
z-index: 6;
|
|
}
|
|
|
|
html[data-current-path$="/assistant/widget"]
|
|
.assistant-playground-field__control {
|
|
display: flex;
|
|
width: 100%;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: 8px;
|
|
padding: 4px 9px;
|
|
text-align: left;
|
|
cursor: pointer;
|
|
}
|
|
|
|
html[data-current-path$="/assistant/widget"]
|
|
.assistant-playground-select__chevron {
|
|
display: block;
|
|
width: 16px;
|
|
height: 16px;
|
|
flex: 0 0 16px;
|
|
color: var(--assistant-playground-text-default);
|
|
opacity: 1;
|
|
}
|
|
|
|
html[data-current-path$="/assistant/widget"]
|
|
.assistant-playground-select__end {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
}
|
|
|
|
html[data-current-path$="/assistant/widget"]
|
|
.assistant-playground-select__detail {
|
|
color: var(--assistant-playground-text-weak);
|
|
font-size: 12px;
|
|
font-variant-numeric: tabular-nums;
|
|
line-height: 16px;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
html[data-current-path$="/assistant/widget"]
|
|
.assistant-playground-select__options {
|
|
position: absolute;
|
|
z-index: 7;
|
|
top: calc(100% + 4px);
|
|
left: 0;
|
|
display: flex;
|
|
width: 100%;
|
|
flex-direction: column;
|
|
gap: 1px;
|
|
padding: 3px;
|
|
border-radius: 6px;
|
|
background: var(--assistant-playground-surface);
|
|
box-shadow:
|
|
0 8px 24px rgba(0, 0, 0, 0.12),
|
|
0 1px 2px rgba(0, 0, 0, 0.08),
|
|
0 0 0 1px var(--assistant-playground-stroke);
|
|
}
|
|
|
|
html[data-current-path$="/assistant/widget"]
|
|
.assistant-playground-select__options
|
|
button {
|
|
display: flex;
|
|
width: 100%;
|
|
min-height: 28px;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: 12px;
|
|
padding: 4px 7px;
|
|
border: 0;
|
|
border-radius: 4px;
|
|
background: transparent;
|
|
color: var(--assistant-playground-text-default);
|
|
font: inherit;
|
|
text-align: left;
|
|
cursor: pointer;
|
|
}
|
|
|
|
html[data-current-path$="/assistant/widget"]
|
|
.assistant-playground-select__options
|
|
button:hover,
|
|
html[data-current-path$="/assistant/widget"]
|
|
.assistant-playground-select__options
|
|
button[data-active="true"] {
|
|
background: color-mix(
|
|
in srgb,
|
|
var(--assistant-playground-surface),
|
|
var(--assistant-playground-text-strong) 6%
|
|
);
|
|
color: var(--assistant-playground-text-strong);
|
|
}
|
|
|
|
html[data-current-path$="/assistant/widget"] .assistant-playground-accent {
|
|
position: relative;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
padding: 4px 8px;
|
|
}
|
|
|
|
html[data-current-path$="/assistant/widget"]
|
|
.assistant-playground-accent__input {
|
|
position: absolute;
|
|
inset: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
cursor: pointer;
|
|
opacity: 0;
|
|
}
|
|
|
|
html[data-current-path$="/assistant/widget"]
|
|
.assistant-playground-accent__swatch {
|
|
width: 14px;
|
|
height: 14px;
|
|
flex: 0 0 14px;
|
|
border-radius: 2px;
|
|
box-shadow:
|
|
0 0 0 1px var(--assistant-playground-surface),
|
|
0 0 0 2px rgba(0, 0, 0, 0.1);
|
|
}
|
|
|
|
html[data-current-path$="/assistant/widget"]
|
|
.assistant-playground-customizer__divider {
|
|
display: flex;
|
|
height: 12px;
|
|
align-items: center;
|
|
margin-inline: -6px;
|
|
color: var(--assistant-playground-stroke);
|
|
}
|
|
|
|
html[data-current-path$="/assistant/widget"]
|
|
.assistant-playground-customizer__divider
|
|
svg {
|
|
display: block;
|
|
width: 100%;
|
|
height: 1px;
|
|
flex: 0 0 auto;
|
|
overflow: visible;
|
|
}
|
|
|
|
html[data-current-path$="/assistant/widget"] .assistant-playground-hook {
|
|
display: flex;
|
|
min-height: 74px;
|
|
align-items: flex-start;
|
|
gap: 28px;
|
|
padding: 6px 8px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
html[data-current-path$="/assistant/widget"]
|
|
.assistant-playground-hook__copy {
|
|
display: flex;
|
|
min-width: 0;
|
|
flex: 1 1 auto;
|
|
flex-direction: column;
|
|
gap: 2px;
|
|
font-size: 14px;
|
|
font-weight: 400;
|
|
line-height: 20px;
|
|
letter-spacing: -0.014px;
|
|
}
|
|
|
|
html[data-current-path$="/assistant/widget"]
|
|
.assistant-playground-hook__label {
|
|
color: var(--assistant-playground-text-strong);
|
|
}
|
|
|
|
html[data-current-path$="/assistant/widget"]
|
|
.assistant-playground-hook__description {
|
|
color: var(--assistant-playground-text-default);
|
|
}
|
|
|
|
html[data-current-path$="/assistant/widget"] .assistant-playground-switch {
|
|
position: relative;
|
|
display: flex;
|
|
width: 26px;
|
|
height: 18px;
|
|
flex: 0 0 26px;
|
|
justify-content: flex-start;
|
|
overflow: hidden;
|
|
padding: 1px;
|
|
border-radius: 3px;
|
|
background: #d7d7d7;
|
|
box-shadow:
|
|
inset 0 1px 1px rgba(0, 0, 0, 0.1),
|
|
inset 0 2px 4px rgba(0, 0, 0, 0.08),
|
|
inset 0 0.2px 0 0.5px rgba(0, 0, 0, 0.08);
|
|
transition: background 120ms ease;
|
|
}
|
|
|
|
html[data-current-path$="/assistant/widget"]
|
|
.assistant-playground-switch[data-checked="true"] {
|
|
justify-content: flex-end;
|
|
background: var(--assistant-playground-switch);
|
|
}
|
|
|
|
html[data-current-path$="/assistant/widget"]
|
|
.assistant-playground-switch__input {
|
|
position: absolute;
|
|
width: 1px;
|
|
height: 1px;
|
|
overflow: hidden;
|
|
clip: rect(0 0 0 0);
|
|
clip-path: inset(50%);
|
|
white-space: nowrap;
|
|
}
|
|
|
|
html[data-current-path$="/assistant/widget"]
|
|
.assistant-playground-switch__knob {
|
|
width: 12px;
|
|
height: 16px;
|
|
border-radius: 2px;
|
|
background: #fcfcfc;
|
|
box-shadow:
|
|
0 0 0 0.5px rgba(0, 0, 0, 0.05),
|
|
0 2px 2px rgba(0, 0, 0, 0.04),
|
|
0 1px 1px rgba(0, 0, 0, 0.12);
|
|
}
|
|
|
|
html[data-current-path$="/assistant/widget"] .assistant-playground-code {
|
|
margin-top: 24px;
|
|
}
|
|
|
|
html[data-current-path$="/assistant/widget"]
|
|
.assistant-playground-code__header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: 16px;
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
html[data-current-path$="/assistant/widget"]
|
|
.assistant-playground-code__title {
|
|
color: var(--assistant-playground-text-strong);
|
|
font-size: 14px;
|
|
font-weight: 500;
|
|
line-height: 20px;
|
|
}
|
|
|
|
html[data-current-path$="/assistant/widget"]
|
|
.assistant-playground-code__description {
|
|
margin-top: 2px;
|
|
color: var(--assistant-playground-text-default);
|
|
font-size: 14px;
|
|
line-height: 20px;
|
|
}
|
|
|
|
html[data-current-path$="/assistant/widget"]
|
|
.assistant-playground-code__tabs {
|
|
display: inline-flex;
|
|
gap: 2px;
|
|
padding: 3px;
|
|
border-radius: 8px;
|
|
background: var(--assistant-playground-frame);
|
|
box-shadow: 0 0 0 1px var(--assistant-playground-stroke);
|
|
}
|
|
|
|
html[data-current-path$="/assistant/widget"]
|
|
.assistant-playground-code__tabs
|
|
button {
|
|
min-height: 28px;
|
|
padding: 4px 10px;
|
|
border: 0;
|
|
border-radius: 6px;
|
|
background: transparent;
|
|
color: var(--assistant-playground-text-default);
|
|
font-size: 13px;
|
|
font-weight: 500;
|
|
line-height: 20px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
html[data-current-path$="/assistant/widget"]
|
|
.assistant-playground-code__tabs
|
|
button[data-active="true"] {
|
|
background: var(--assistant-playground-surface);
|
|
color: var(--assistant-playground-text-strong);
|
|
box-shadow:
|
|
0 1px 1px rgba(0, 0, 0, 0.08),
|
|
0 0 0 1px var(--assistant-playground-stroke);
|
|
}
|
|
|
|
html[data-current-path$="/assistant/widget"] .assistant-playground-children {
|
|
margin-top: 32px;
|
|
}
|
|
|
|
@media (max-width: 540px) {
|
|
html[data-current-path$="/assistant/widget"]
|
|
.assistant-playground-frame[data-customize-open="true"]
|
|
.assistant-playground-preview {
|
|
visibility: hidden;
|
|
}
|
|
|
|
html[data-current-path$="/assistant/widget"]
|
|
.assistant-playground-customizer {
|
|
max-height: 475px;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
html[data-current-path$="/assistant/widget"]
|
|
.assistant-playground-code__header {
|
|
align-items: flex-start;
|
|
flex-direction: column;
|
|
}
|
|
}
|
|
|
|
/* The widget playground embeds /assistant/widget-preview in its preview
|
|
iframe. The suffix match keeps localized paths covered. Hide every piece of
|
|
docs chrome so only the widget renders. */
|
|
html[data-current-path$="/assistant/widget-preview"] #navbar,
|
|
html[data-current-path$="/assistant/widget-preview"] #navbar-transition,
|
|
html[data-current-path$="/assistant/widget-preview"] #mobile-nav,
|
|
html[data-current-path$="/assistant/widget-preview"] #banner,
|
|
html[data-current-path$="/assistant/widget-preview"] #sidebar,
|
|
html[data-current-path$="/assistant/widget-preview"] #footer,
|
|
html[data-current-path$="/assistant/widget-preview"] #assistant-entry,
|
|
html[data-current-path$="/assistant/widget-preview"] #assistant-entry-mobile,
|
|
html[data-current-path$="/assistant/widget-preview"] [aria-label="Preview Widget"],
|
|
html[data-current-path$="/assistant/widget-preview"] [aria-label="Preview Widget Menu"] {
|
|
display: none !important;
|
|
}
|
|
|
|
html[data-current-path$="/assistant/widget-preview"],
|
|
html[data-current-path$="/assistant/widget-preview"] body {
|
|
width: 100%;
|
|
height: 100%;
|
|
margin: 0;
|
|
overflow: hidden !important;
|
|
background: #f8f8f8 !important;
|
|
}
|
|
|
|
html.dark[data-current-path$="/assistant/widget-preview"],
|
|
html.dark[data-current-path$="/assistant/widget-preview"] body {
|
|
background: #1c1c1c !important;
|
|
}
|