:root { --docs-background-color: var(--wa-color-surface-default); --docs-content-max-width: 860px; --docs-sidebar-width: 320px; --docs-sidebar-transition-speed: 250ms; --docs-content-toc-max-width: 260px; --docs-content-padding: 2rem; --docs-content-vertical-spacing: 2rem; --docs-search-overlay-background: rgb(0 0 0 / 0.2); --docs-skip-to-main-width: 200px; } /* Light theme */ :root { color-scheme: normal; --docs-overlay-color: hsl(240 3.8% 46.1% / 33%); --docs-shadow-x-small: 0 1px 2px hsl(240 3.8% 46.1% / 12%); --docs-shadow-small: 0 1px 2px hsl(240 3.8% 46.1% / 24%); --docs-shadow-medium: 0 2px 4px hsl(240 3.8% 46.1% / 24%); --docs-shadow-large: 0 2px 8px hsl(240 3.8% 46.1% / 24%); --docs-shadow-x-large: 0 4px 16px hsl(240 3.8% 46.1% / 24%); } /* Utils */ html.wa-theme-dark .only-light, html:not(.wa-theme-dark) .only-dark { display: none !important; } .visually-hidden:not(:focus-within) { position: absolute !important; width: 1px !important; height: 1px !important; clip: rect(0 0 0 0) !important; clip-path: inset(50%) !important; border: none !important; overflow: hidden !important; white-space: nowrap !important; padding: 0 !important; } .nowrap { white-space: nowrap; } @media screen and (max-width: 900px) { :root { --docs-content-padding: 1rem; } } /* Bare styles */ *, *:before, *:after { box-sizing: inherit; } /* Show custom elements only after they're registered */ :not(:defined), :not(:defined) * { opacity: 0; } :defined { opacity: 1; transition: 0.1s opacity; } html { height: 100%; box-sizing: border-box; line-height: var(--wa-font-line-height-regular); padding: 0; margin: 0; } body { height: 100%; padding: 0; margin: 0; overflow-x: hidden; -moz-osx-font-smoothing: grayscale; -webkit-font-smoothing: antialiased; } /* Common elements */ h1, h2, h3, h4, h5, h6 { margin: 3rem 0 1.5rem 0; } h1:first-of-type { margin-top: 1rem; } h2 { font-size: 1.875rem; border-bottom: var(--wa-border-style) var(--wa-border-width-thin) var(--wa-color-surface-outline); } p { margin-block-end: 1.5em; } .badges img { border-radius: var(--wa-corners-1x); } .callout img, details img { width: 100%; margin-left: 0; margin-right: 0; } details pre { border: solid var(--wa-border-width-thin) var(--wa-color-surface-outline); } code { background-color: rgba(0 0 0 / 0.025); background-blend-mode: darken; padding: 0.125em 0.25em; } /* Block quotes */ blockquote { position: relative; font-family: var(--wa-font-family-longform); font-size: var(--wa-font-size-l); font-style: italic; color: var(--wa-color-text-normal); background-color: var(--wa-color-surface-lowered); border-radius: var(--wa-corners-1x); border-left: solid var(--wa-border-width-thin) var(--wa-color-surface-outline); padding: var(--wa-space-xl); margin: 0 0 var(--wa-space-xl) 0; } blockquote > :first-child { margin-top: 0; } blockquote > :last-child { margin-bottom: 0; } /* Lists */ ul, ol { padding: 0; margin: 0 0 var(--docs-content-vertical-spacing) var(--wa-space-2xl); } ul { list-style: disc; } li { padding: 0; margin: 0 0 var(--wa-space-2xs) 0; } li ul, li ol { margin-top: var(--wa-space-2xs); } ul ul:last-child, ul ol:last-child, ol ul:last-child, ol ol:last-child { margin-bottom: 0; } /* Color matching logos */ svg.wordmark { color: var(--wa-color-brand-text-on-surface); } /* Anchor headings */ .anchor-heading { position: relative; color: inherit; text-decoration: none; } .anchor-heading a { text-decoration: none; color: inherit; } .anchor-heading a::after { content: '#'; color: color-mix(in oklab, var(--wa-color-text-link) 100%, var(--wa-color-tint-hover)); margin-inline: 0.5rem; opacity: 0; transition: 100ms opacity; } .anchor-heading:hover a::after, .anchor-heading:focus-within a::after { opacity: 1; } /* External links */ .external-link__icon { width: 0.75em; height: 0.75em; vertical-align: 0; margin-left: 0.25em; margin-right: 0.125em; } /* Tables */ table { max-width: 100%; border: none; border-collapse: collapse; color: inherit; margin-bottom: var(--docs-content-vertical-spacing); } table tr { border-bottom: solid var(--wa-border-width-thin) var(--wa-color-surface-outline); } table th { font-weight: var(--wa-font-weight-medium); text-align: left; } table td, table th { line-height: var(--wa-font-line-height-regular); padding: 1rem 1rem; } table th p:first-child, table td p:first-child { margin-top: 0; } table th p:last-child, table td p:last-child { margin-bottom: 0; } .table-scroll { max-width: 100%; overflow-x: auto; } .table-scroll code { white-space: nowrap; } th.table-name, th.table-event-detail { min-width: 15ch; } th.table-description { min-width: 50ch !important; max-width: 70ch; } /* Code blocks */ pre { position: relative; background-color: var(--wa-color-surface-lowered); font-family: var(--wa-font-family-code); color: var(--wa-color-text-normal); border-radius: var(--wa-corners-1x); padding: 1rem; white-space: pre; } pre:not(:last-child) { margin-bottom: 1.5rem; } pre > code { display: block; background: none !important; border-radius: 0; hyphens: none; tab-size: 2; white-space: pre; padding: 1rem; margin: -1rem; overflow: auto; } pre .token.comment { color: var(--wa-color-neutral-40); } pre .token.prolog, pre .token.doctype, pre .token.cdata, pre .token.operator, pre .token.punctuation { color: var(--wa-color-neutral-40); } .namespace { opacity: 0.7; } pre .token.property, pre .token.keyword, pre .token.tag, pre .token.url { color: var(--wa-color-blue-40); } pre .token.symbol, pre .token.deleted { color: var(--wa-color-red-40); } pre .token.boolean, pre .token.constant, pre .token.selector, pre .token.attr-name, pre .token.string, pre .token.char, pre .token.builtin, pre .token.inserted { color: var(--wa-color-green-40); } pre .token.atrule, pre .token.attr-value, pre .token.number, pre .token.variable { color: #5c47ae; /* purple-40 */ } pre .token.function, pre .token.class-name, pre .token.regex { color: #c86d2c; /* orange-40 */ } pre .token.important { color: var(--wa-color-red-40); } pre .token.important, pre .token.bold { font-weight: bold; } pre .token.italic { font-style: italic; } /* Copy code button */ .copy-code-button { position: absolute; top: 0; right: 0; white-space: normal; color: var(--wa-color-neutral-text-on-vivid); transition: 150ms opacity, 150ms scale; } .copy-code-button::part(button) { background-color: var(--wa-color-neutral-fill-vivid); border-radius: 0 var(--wa-corners-1x) 0 var(--wa-corners-1x); padding: 0.75rem; } .copy-code-button::part(button):hover { background-color: color-mix(in oklab, var(--wa-color-neutral-fill-vivid), var(--wa-color-tint-hover)); } .copy-code-button::part(button):active { background-color: color-mix(in oklab, var(--wa-color-neutral-fill-vivid), var(--wa-color-tint-active)); } pre .copy-code-button { opacity: 0; scale: 0.75; } pre:hover .copy-code-button, .copy-code-button:focus-within { opacity: 1; scale: 1; } /* Callouts */ .callout { margin-bottom: var(--docs-content-vertical-spacing); } .callout > :first-child { margin-top: 0; } .callout > :last-child { margin-bottom: 0; } .callout a { color: inherit; } .callout p { margin-top: 0; } /* Aside */ .content aside { float: right; min-width: 300px; max-width: 50%; background: var(--wa-color-surface-lowered); border-radius: var(--wa-corners-1x); padding: var(--wa-space-m); margin-left: var(--wa-space-m); } .content aside > :first-child { margin-top: 0; } .content aside > :last-child { margin-bottom: 0; } @media screen and (max-width: 600px) { .content aside { float: none; width: calc(100% + (var(--docs-content-padding) * 2)); max-width: none; margin: var(--docs-content-vertical-spacing) calc(-1 * var(--docs-content-padding)); } } /* Details */ .content details { background-color: var(--wa-color-surface-lowered); border-radius: var(--wa-corners-1x); padding: var(--wa-space-m); margin: 0 0 var(--docs-content-vertical-spacing) 0; } .content details summary { font-weight: var(--wa-font-weight-medium); border-radius: var(--wa-corners-1x); padding: var(--wa-space-m); margin: calc(-1 * var(--wa-space-m)); cursor: pointer; user-select: none; } .content details summary span { padding-left: var(--wa-space-xs); } .content details[open] summary { border-bottom-left-radius: 0; border-bottom-right-radius: 0; margin-bottom: 1rem; } .content details[open] summary:focus-visible { border-radius: var(--wa-corners-1x); } .content details > :last-child { margin-bottom: 0; } .content details > :nth-child(2) { margin-top: 0; } .content details + details { margin-top: calc(-1 * var(--docs-content-vertical-spacing) + (2 * var(--wa-border-width-thin))); } /* Sidebar */ #sidebar { position: fixed; flex: 0; top: 0; left: 0; bottom: 0; z-index: 20; width: var(--docs-sidebar-width); background-color: var(--docs-background-color); border-right: solid var(--wa-border-width-thin) var(--wa-color-surface-outline); border-radius: 0; padding: 2rem; margin: 0; overflow: auto; scrollbar-width: thin; transition: var(--docs-sidebar-transition-speed) translate ease-in-out; } #sidebar::-webkit-scrollbar { width: 4px; } #sidebar::-webkit-scrollbar-thumb { background: transparent; border-radius: 9999px; } #sidebar:hover::-webkit-scrollbar-thumb { background: var(--wa-color-neutral-60); } #sidebar:hover::-webkit-scrollbar-track { background: var(--wa-color-neutral-95); } #sidebar > header { margin-bottom: 1.5rem; } #sidebar > header h1 { margin: 0; } #sidebar > header a { display: block; } #sidebar nav a { text-decoration: none; } #sidebar nav h2 { font-size: var(--wa-font-size-m); font-weight: var(--wa-font-weight-medium); border-bottom: solid var(--wa-border-width-thin) var(--wa-color-surface-outline); margin: var(--wa-space-xl) 0 var(--wa-space-xs) 0; } #sidebar ul { padding: 0; margin: 0; } #sidebar ul li { list-style: none; padding: 0; margin: 0.125rem 0.5rem; } #sidebar ul ul ul { margin-left: 0.75rem; } #sidebar ul li a { line-height: 1.33; color: inherit; display: inline-block; padding: 0; } #sidebar ul li a:not(.active-link):hover { color: var(--wa-color-text-link); } #sidebar nav .active-link { color: var(--wa-color-text-link); border-bottom: dashed 1px var(--wa-color-text-link); } #sidebar > header img { display: block; width: 100%; height: auto; margin: 0 auto; } @media screen and (max-width: 900px) { #sidebar { translate: -100%; } .sidebar-open #sidebar { translate: 0; } } .sidebar-version { font-size: var(--wa-font-size-s); color: var(--wa-color-text-quiet); text-align: right; margin-top: -0.5rem; margin-right: 1rem; margin-bottom: -0.5rem; } .sidebar-buttons { display: flex; justify-content: space-between; } /* Main content */ main { position: relative; padding: var(--docs-content-vertical-spacing) var(--docs-content-padding) calc(var(--docs-content-vertical-spacing) * 2) var(--docs-content-padding); margin-left: var(--docs-sidebar-width); } .sidebar-open .content { margin-left: 0; } .content__body > :last-child { margin-bottom: 0; } @media screen and (max-width: 900px) { main { margin-left: 0; } } /* Component layouts */ .content { display: grid; grid-template-columns: 100%; gap: 2rem; position: relative; max-width: var(--docs-content-max-width); margin: 0 auto; } .content--with-toc { /* There's a 2rem gap, so we need to remove it from the column */ grid-template-columns: calc(75% - 2rem) min(25%, var(--docs-content-toc-max-width)); max-width: calc(var(--docs-content-max-width) + var(--docs-content-toc-max-width)); } .content__body { order: 1; width: 100%; } .content:not(.content--with-toc) .content__toc { display: none; } .content__toc { order: 2; display: flex; flex-direction: column; margin-top: 0; } .content__toc ul { position: sticky; top: 5rem; max-height: calc(100vh - 6rem); font-size: var(--wa-font-size-s); line-height: 1.33; border-left: var(--wa-border-style) var(--wa-border-width-thin) var(--wa-color-surface-outline); list-style: none; padding: 1rem 0; margin: 0; padding-left: 1rem; overflow-y: auto; } .content__toc li { padding: 0 0 0 0.5rem; margin: 0; } .content__toc li[data-level='3'] { margin-left: 1rem; } /* We don't use them, but just in case */ .content__toc li[data-level='4'], .content__toc li[data-level='5'], .content__toc li[data-level='6'] { margin-left: 2rem; } .content__toc li:not(:last-of-type) { margin-bottom: 0.6rem; } .content__toc a { color: var(--wa-color-text-normal); text-decoration: none; } .content__toc a:hover { color: var(--wa-color-text-link); } .content__toc a.active { color: var(--wa-color-brand-text-on-surface); border-bottom: dashed 1px var(--wa-color-brand-text-on-surface); } .content__toc .top a { font-weight: var(--wa-font-weight-medium); color: var(--wa-color-text-quiet); } @media screen and (max-width: 1024px) { .content { grid-template-columns: 100%; gap: 0; } .content__toc { position: relative; order: 1; } .content__toc ul { display: flex; justify-content: start; gap: 1rem 1.5rem; position: static; border: none; border-bottom: solid 1px var(--wa-color-surface-outline); border-radius: 0; padding: 1rem 1.5rem 1rem 0.5rem; /* extra right padding to hide the fade effect */ margin-top: 1rem; overflow-x: auto; } .content__toc ul::after { content: ''; position: absolute; top: 0; bottom: 1rem; /* don't cover the scrollbar */ right: 0; width: 2rem; background: linear-gradient(90deg, rgba(0 0 0 / 0) 0%, var(--wa-color-surface-default) 100%); } .content__toc li { white-space: nowrap; } .content__toc li:not(:last-of-type) { margin-bottom: 0; } .content__toc [data-level]:not([data-level='2']) { display: none; } .content__body { order: 2; } } /* Menu toggle */ #menu-toggle { display: none; position: fixed; z-index: 30; top: 0.25rem; left: 0.25rem; height: auto; width: auto; color: var(--wa-color-neutral-fill-vivid-alt); border: none; border-radius: 50%; background: var(--wa-color-surface-default); padding: 0.5rem; margin: 0; cursor: pointer; transition: 250ms rotate ease; } @media screen and (max-width: 900px) { #menu-toggle { display: flex; } } #menu-toggle svg { width: 1.25rem; height: 1.25rem; } html.sidebar-open #menu-toggle { rotate: 180deg; } /* Skip to main content */ #skip-to-main { position: fixed; top: 0.25rem; left: calc(50% - var(--docs-skip-to-main-width) / 2); z-index: 100; width: var(--docs-skip-to-main-width); text-align: center; text-decoration: none; border-radius: 9999px; background: var(--wa-color-surface-default); color: var(--wa-color-text-normal); padding: 0.5rem; } /* Print styles */ @media print { a:not(.anchor-heading)[href]::after { content: ' (' attr(href) ')'; } details, pre { border: solid var(--wa-border-width-thin) var(--wa-color-surface-outline); } details summary { list-style: none; } details summary span { padding-left: 0; } details summary::marker, details summary::-webkit-details-marker { display: none; } .component-page__navigation, .copy-code-button, .code-preview__buttons, .code-preview__resizer { display: none !important; } .flavor-html .code-preview__source--html, .flavor-react .code-preview__source--react { display: block !important; } .flavor-html .code-preview__source--html > pre, .flavor-react .code-preview__source--react > pre { border: none; } .code-preview__source-group { border-bottom: solid 1px var(--wa-border-width-thin); border-bottom-left-radius: var(--wa-corners-1x); border-bottom-right-radius: var(--wa-corners-1x); } #sidebar { display: none; } #content { margin-left: 0; } #menu-toggle, #icon-toolbar, .external-link__icon { display: none; } } /* Splash */ .splash { display: flex; padding-top: 2rem; } .splash-start { min-width: 440px; } .splash li img { width: 1em; height: 1em; vertical-align: -2px; } .splash-end { display: flex; align-items: flex-end; width: auto; padding-left: 1rem; } .splash-image { width: 100%; height: auto; } .splash .wordmark { max-width: 22rem; } .splash-start h1:first-of-type { font-size: var(--wa-font-size-l); font-weight: var(--wa-font-weight-normal); margin: 0 0 0.5rem 0; } @media screen and (max-width: 1280px) { .splash { display: block; } .splash-start { min-width: 0; padding-bottom: 1rem; } .splash-end { padding: 0; } .splash-image { display: block; max-width: 400px; } /* Shields */ .splash + p { margin-top: 2rem; } } /* Component headers */ .component-header h1 { margin-bottom: 0; } .component-header__tag { margin-top: -0.5rem; margin-bottom: 0.5rem; } .component-header__tag code { background: none; color: var(--wa-color-text-quiet); font-size: var(--wa-font-size-l); padding: 0; margin: 0; } .component-header__info { margin-bottom: var(--wa-space-2xl); } .component-summary { font-size: var(--wa-font-size-l); line-height: 1.6; margin: 2rem 0; } /* Repo buttons */ .sidebar-buttons { display: flex; gap: 0.125rem; justify-content: space-between; } .sidebar-buttons .repo-button { flex: 1 1 auto; } .repo-button--github wa-icon { color: var(--wa-color-text-normal); } .repo-button--github:hover wa-icon { color: var(--wa-color-text-inverse); } .repo-button--star wa-icon { color: var(--wa-color-yellow-70); } .repo-button--star:hover wa-icon { color: var(--wa-color-yellow-80); } .repo-button--twitter wa-icon { color: var(--wa-color-blue-60); } .repo-button--twitter:hover wa-icon { color: var(--wa-color-blue-70); } @media screen and (max-width: 400px) { :not(.sidebar-buttons) > .repo-button { width: 100%; margin-bottom: 1rem; } } body[data-page^='/tokens/'] .table-wrapper td:first-child, body[data-page^='/tokens/'] .table-wrapper td:first-child code { white-space: nowrap; } /* Border demos */ .border-demo { height: 60px; border-left: solid 1px var(--wa-color-brand-fill-vivid); } .corner-demo { width: 3rem; height: 3rem; background: var(--wa-color-brand-fill-vivid); } /* Transition demo */ .transition-demo { position: relative; background: var(--wa-color-neutral-fill-muted); width: 8rem; height: 2rem; } .transition-demo:after { content: ''; position: absolute; background-color: var(--wa-color-brand-fill-vivid); top: 0; left: 0; width: 0; height: 100%; transition-duration: inherit; transition-property: width; } .transition-demo:hover:after { width: 100%; } /* Spacing demo */ .spacing-demo { background: var(--wa-color-brand-fill-vivid); } /* Shadow demo */ .shadow-demo { background: transparent; border-radius: 3px; width: 4rem; height: 4rem; margin: 1rem; } /* Color palettes */ .color-palette { display: grid; grid-template-columns: 200px repeat(11, 1fr); gap: var(--wa-space-m) 1px; margin: var(--wa-space-2xl) 0; } .color-palette__name { font-weight: var(--wa-font-weight-medium); grid-template-columns: repeat(11, 1fr); } .color-palette__name code { background: none; font-size: var(--wa-font-size-s); } .color-palette__example { font-size: var(--wa-font-size-s); text-align: center; } .color-palette__swatch { height: 3rem; border-radius: var(--wa-corners-half); } .color-palette__swatch--border { box-shadow: inset 0 0 0 1px var(--wa-color-surface-outline); } @media screen and (max-width: 1200px) { .color-palette { grid-template-columns: repeat(6, 1fr); } .color-palette__name { grid-column-start: span 6; } }