Files
webawesome/docs/assets/styles/docs.css

1275 lines
24 KiB
CSS
Raw Normal View History

2023-06-06 08:22:18 -04:00
:root {
2023-08-31 12:06:32 -04:00
--docs-background-color: var(--wa-color-surface-raised);
2023-06-06 08:22:18 -04:00
--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 */
2023-08-31 12:06:32 -04:00
html.wa-theme-dark .only-light,
html:not(.wa-theme-dark) .only-dark {
2023-06-06 08:22:18 -04:00
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;
}
2020-07-15 17:30:37 -04:00
}
2023-06-06 08:22:18 -04:00
/* Bare styles */
2021-02-26 09:09:13 -05:00
*,
*:before,
*:after {
2020-07-15 17:30:37 -04:00
box-sizing: inherit;
}
2023-06-06 08:22:18 -04:00
a:focus,
button:focus {
outline: none;
}
a:focus-visible,
button:focus-visible {
2023-08-31 12:06:32 -04:00
outline: var(--wa-focus-ring);
outline-offset: var(--wa-focus-ring-offset);
2023-06-06 08:22:18 -04:00
}
::selection {
2023-08-31 12:06:32 -04:00
background-color: var(--wa-color-selection-background);
color: var(--wa-color-selection-text);
2023-06-06 08:22:18 -04:00
}
2023-02-22 14:18:36 -05:00
/* Show custom elements only after they're registered */
:not(:defined),
:not(:defined) * {
opacity: 0;
}
:defined {
opacity: 1;
transition: 0.1s opacity;
}
2023-06-06 08:22:18 -04:00
html {
height: 100%;
box-sizing: border-box;
2023-08-31 12:06:32 -04:00
line-height: var(--wa-font-line-height-regular);
2023-06-06 08:22:18 -04:00
padding: 0;
margin: 0;
}
2020-07-15 17:30:37 -04:00
body {
2023-06-06 08:22:18 -04:00
height: 100%;
2023-08-31 12:06:32 -04:00
font: 16px var(--wa-font-family-body);
font-weight: var(--wa-font-weight-normal);
2023-06-06 08:22:18 -04:00
background-color: var(--docs-background-color);
2023-08-31 12:06:32 -04:00
line-height: var(--wa-font-line-height-regular);
color: var(--wa-color-text-normal);
2023-06-06 08:22:18 -04:00
padding: 0;
margin: 0;
overflow-x: hidden;
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
}
/* Common elements */
h1,
h2,
h3,
h4,
h5,
h6 {
2023-08-31 12:06:32 -04:00
font-family: var(--wa-font-family-body);
font-weight: var(--wa-font-weight-medium);
2023-06-06 08:22:18 -04:00
margin: 3rem 0 1.5rem 0;
}
h1:first-of-type {
margin-top: 1rem;
}
h1 {
2023-08-31 12:06:32 -04:00
font-size: var(--wa-font-size-2xl);
2023-06-06 08:22:18 -04:00
}
h2 {
font-size: 1.875rem;
2023-08-31 12:06:32 -04:00
border-bottom: solid var(--wa-border-width-thin) var(--wa-color-surface-outline);
2023-06-06 08:22:18 -04:00
}
h3 {
font-size: 1.625rem;
}
h4 {
font-size: 1.375rem;
}
h5 {
font-size: 1.125rem;
}
h6 {
font-size: 0.875rem;
}
p {
margin-block-end: 1.5em;
}
img {
max-width: 100%;
2023-07-26 15:20:51 -04:00
}
.badges img {
2023-08-31 12:06:32 -04:00
border-radius: var(--wa-corners-1x);
2023-06-06 08:22:18 -04:00
}
.callout img,
details img {
width: 100%;
margin-left: 0;
margin-right: 0;
}
details pre {
2023-08-31 12:06:32 -04:00
border: solid var(--wa-border-width-thin) var(--wa-color-surface-outline);
2020-07-15 17:30:37 -04:00
}
a {
2023-08-31 12:06:32 -04:00
color: var(--wa-color-text-link);
2020-07-15 17:30:37 -04:00
}
2021-08-18 09:52:51 -04:00
a:hover {
2023-08-31 12:06:32 -04:00
color: color-mix(in oklch, var(--wa-color-text-link) 100%, black 12%);
2023-06-06 08:22:18 -04:00
}
abbr[title] {
text-decoration: none;
2023-08-31 12:06:32 -04:00
border-bottom: dashed 1px var(--wa-color-text-link);
2023-06-06 08:22:18 -04:00
cursor: help;
}
em {
font-style: italic;
2021-08-18 09:52:51 -04:00
}
2020-07-16 07:06:08 -04:00
strong {
2023-08-31 12:06:32 -04:00
font-weight: var(--wa-font-weight-heavy);
2020-07-16 07:06:08 -04:00
}
2023-06-06 08:22:18 -04:00
code {
2023-08-31 12:06:32 -04:00
font-family: var(--wa-font-family-code);
2023-06-06 08:22:18 -04:00
font-size: 0.9125em;
background-color: rgba(0 0 0 / 0.025);
background-blend-mode: darken;
2023-08-31 12:06:32 -04:00
border-radius: var(--wa-corners-1x);
2023-06-06 08:22:18 -04:00
padding: 0.125em 0.25em;
2020-07-15 17:30:37 -04:00
}
2023-06-06 08:22:18 -04:00
kbd {
2023-08-31 12:06:32 -04:00
background: var(--wa-color-neutral-container-fill-muted);
border: solid 1px var(--wa-color-neutral-container-outline-muted);
box-shadow: inset 0 1px 0 1px var(--wa-color-tint-white), 0 1px 0 0 var(--wa-color-tint-black);
font-family: var(--wa-font-family-code);
font-size: 0.9125em;
2023-08-31 12:06:32 -04:00
border-radius: var(--wa-corners-1x);
color: var(--wa-color-neutral-text-on-muted);
2023-06-06 08:22:18 -04:00
padding: 0.125em 0.4em;
2020-07-15 17:30:37 -04:00
}
2023-06-06 08:22:18 -04:00
ins {
2023-08-31 12:06:32 -04:00
background-color: var(--wa-color-success-container-fill-muted);
color: var(--wa-color-success-text-on-muted);
border-radius: var(--wa-corners-1x);
2023-06-06 08:22:18 -04:00
text-decoration: none;
padding: 0.125em 0.25em;
2020-07-15 17:30:37 -04:00
}
2023-06-06 08:22:18 -04:00
s {
2023-08-31 12:06:32 -04:00
background-color: var(--wa-color-danger-container-fill-muted);
color: var(--wa-color-danger-text-on-muted);
border-radius: var(--wa-corners-1x);
2023-06-06 08:22:18 -04:00
text-decoration: none;
padding: 0.125em 0.25em;
2020-07-15 17:30:37 -04:00
}
2023-06-06 08:22:18 -04:00
mark {
2023-08-31 12:06:32 -04:00
background-color: var(--wa-color-warning-container-fill-muted);
color: inherit;
border-radius: var(--wa-corners-1x);
2023-06-06 08:22:18 -04:00
padding: 0.125em 0.25em;
2021-08-25 17:36:46 -04:00
}
2023-06-06 08:22:18 -04:00
hr {
border: none;
2023-08-31 12:06:32 -04:00
border-bottom: solid var(--wa-border-width-thin) var(--wa-color-surface-outline);
2023-06-06 08:22:18 -04:00
margin: calc(var(--docs-content-vertical-spacing) * 2) 0;
2021-08-25 17:36:46 -04:00
}
2023-06-12 11:36:08 -04:00
/* Block quotes */
2023-06-06 08:22:18 -04:00
blockquote {
position: relative;
2023-08-31 12:06:32 -04:00
font-family: var(--wa-font-family-longform);
font-size: var(--wa-font-size-l);
2023-06-06 08:22:18 -04:00
font-style: italic;
2023-08-31 12:06:32 -04:00
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;
2023-06-06 08:22:18 -04:00
}
blockquote > :first-child {
margin-top: 0;
}
2023-06-06 08:22:18 -04:00
blockquote > :last-child {
margin-bottom: 0;
}
2023-06-06 08:22:18 -04:00
/* Lists */
ul,
ol {
padding: 0;
2023-08-31 12:06:32 -04:00
margin: 0 0 var(--docs-content-vertical-spacing) var(--wa-space-2xl);
2020-07-15 17:30:37 -04:00
}
2023-06-06 08:22:18 -04:00
ul {
list-style: disc;
2020-07-15 17:30:37 -04:00
}
2023-06-06 08:22:18 -04:00
li {
2020-08-07 08:37:46 -04:00
padding: 0;
2023-08-31 12:06:32 -04:00
margin: 0 0 var(--wa-space-2xs) 0;
2023-06-06 08:22:18 -04:00
}
li ul,
li ol {
2023-08-31 12:06:32 -04:00
margin-top: var(--wa-space-2xs);
2023-06-06 08:22:18 -04:00
}
ul ul:last-child,
ul ol:last-child,
ol ul:last-child,
ol ol:last-child {
margin-bottom: 0;
2020-08-07 08:37:46 -04:00
}
2023-08-31 12:06:32 -04:00
/* Color matching logos */
svg.wordmark {
color: var(--wa-color-brand-text-on-surface);
}
2023-06-06 08:22:18 -04:00
/* Anchor headings */
.anchor-heading {
position: relative;
2020-07-15 17:30:37 -04:00
color: inherit;
text-decoration: none;
}
2023-06-06 08:22:18 -04:00
.anchor-heading a {
text-decoration: none;
color: inherit;
2020-07-15 17:30:37 -04:00
}
2023-06-06 08:22:18 -04:00
.anchor-heading a::after {
content: '#';
2023-08-31 12:06:32 -04:00
color: color-mix(in oklch, var(--wa-color-text-link) 100%, black 12%);
2023-06-06 08:22:18 -04:00
margin-inline: 0.5rem;
opacity: 0;
transition: 100ms opacity;
2020-07-15 17:30:37 -04:00
}
2023-06-06 08:22:18 -04:00
.anchor-heading:hover a::after,
.anchor-heading:focus-within a::after {
opacity: 1;
2020-07-15 17:30:37 -04:00
}
2023-06-06 08:22:18 -04:00
/* External links */
.external-link__icon {
width: 0.75em;
height: 0.75em;
vertical-align: 0;
margin-left: 0.25em;
margin-right: 0.125em;
2020-07-15 17:30:37 -04:00
}
2023-06-06 08:22:18 -04:00
/* Tables */
table {
max-width: 100%;
border: none;
border-collapse: collapse;
color: inherit;
margin-bottom: var(--docs-content-vertical-spacing);
2020-07-15 17:30:37 -04:00
}
2023-06-06 08:22:18 -04:00
table tr {
2023-08-31 12:06:32 -04:00
border-bottom: solid var(--wa-border-width-thin) var(--wa-color-surface-outline);
2023-06-06 08:22:18 -04:00
}
table th {
2023-08-31 12:06:32 -04:00
font-weight: var(--wa-font-weight-medium);
2023-06-06 08:22:18 -04:00
text-align: left;
}
table td,
table th {
2023-08-31 12:06:32 -04:00
line-height: var(--wa-font-line-height-regular);
2023-06-06 08:22:18 -04:00
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;
}
2023-08-10 11:29:25 -04:00
.table-scroll code {
white-space: nowrap;
}
2023-06-06 08:22:18 -04:00
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;
2023-08-31 12:06:32 -04:00
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);
2023-06-06 08:22:18 -04:00
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 {
2023-08-31 12:06:32 -04:00
color: var(--wa-color-neutral-40);
2023-06-06 08:22:18 -04:00
}
pre .token.prolog,
pre .token.doctype,
pre .token.cdata,
pre .token.operator,
pre .token.punctuation {
2023-08-31 12:06:32 -04:00
color: var(--wa-color-neutral-40);
2023-06-06 08:22:18 -04:00
}
.namespace {
opacity: 0.7;
}
pre .token.property,
pre .token.keyword,
pre .token.tag,
pre .token.url {
2023-08-31 12:06:32 -04:00
color: var(--wa-color-blue-40);
2023-06-06 08:22:18 -04:00
}
pre .token.symbol,
pre .token.deleted {
2023-08-31 12:06:32 -04:00
color: var(--wa-color-red-40);
2023-06-06 08:22:18 -04:00
}
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 {
2023-08-31 12:06:32 -04:00
color: var(--wa-color-green-40);
2023-06-06 08:22:18 -04:00
}
pre .token.atrule,
pre .token.attr-value,
pre .token.number,
pre .token.variable {
2023-08-31 12:06:32 -04:00
color: #5c47ae; /* purple-40 */
2023-06-06 08:22:18 -04:00
}
pre .token.function,
pre .token.class-name,
pre .token.regex {
2023-08-31 12:06:32 -04:00
color: #c86d2c; /* orange-40 */
2023-06-06 08:22:18 -04:00
}
pre .token.important {
2023-08-31 12:06:32 -04:00
color: var(--wa-color-red-40);
2023-06-06 08:22:18 -04:00
}
pre .token.important,
pre .token.bold {
font-weight: bold;
}
pre .token.italic {
font-style: italic;
}
/* Copy code button */
.copy-code-button {
position: absolute;
2023-08-22 17:01:00 -04:00
top: 0;
right: 0;
white-space: normal;
2023-08-31 12:06:32 -04:00
color: var(--wa-color-neutral-text-on-vivid);
2023-08-22 17:01:00 -04:00
transition: 150ms opacity, 150ms scale;
}
.copy-code-button::part(button) {
2023-08-31 12:06:32 -04:00
background-color: var(--wa-color-neutral-element-fill-vivid);
border-radius: 0 var(--wa-corners-1x) 0 var(--wa-corners-1x);
2023-08-22 17:01:00 -04:00
padding: 0.75rem;
2020-07-16 07:05:22 -04:00
}
2023-08-22 17:01:00 -04:00
.copy-code-button::part(button):hover {
2023-08-31 12:06:32 -04:00
background-color: color-mix(in oklch, var(--wa-color-neutral-element-fill-vivid), black 4%);
2023-08-22 17:01:00 -04:00
}
.copy-code-button::part(button):active {
2023-08-31 12:06:32 -04:00
background-color: color-mix(in oklch, var(--wa-color-neutral-element-fill-vivid), black 8%);
2020-07-16 07:05:22 -04:00
}
2023-06-06 08:22:18 -04:00
pre .copy-code-button {
opacity: 0;
2023-08-22 17:01:00 -04:00
scale: 0.75;
2023-06-06 08:22:18 -04:00
}
pre:hover .copy-code-button,
2023-08-22 17:10:01 -04:00
.copy-code-button:focus-within {
2023-06-06 08:22:18 -04:00
opacity: 1;
scale: 1;
}
/* Callouts */
.callout {
position: relative;
2023-08-31 12:06:32 -04:00
background-color: var(--wa-color-neutral-container-fill-muted);
border-left: solid 4px var(--wa-color-neutral-container-outline-muted);
border-radius: var(--wa-corners-1x);
color: var(--wa-color-neutral-text-on-muted);
padding: var(--wa-space-xl) var(--wa-space-xl) var(--wa-space-xl) var(--wa-space-2xl);
2023-06-06 08:22:18 -04:00
margin-bottom: var(--docs-content-vertical-spacing);
}
.callout > :first-child {
margin-top: 0;
}
.callout > :last-child {
margin-bottom: 0;
}
.callout--tip {
2023-08-31 12:06:32 -04:00
background-color: var(--wa-color-brand-container-fill-muted);
border-left-color: var(--wa-color-brand-element-outline-muted);
color: var(--wa-color-brand-text-on-muted);
2023-06-06 08:22:18 -04:00
}
.callout::before {
content: '';
position: absolute;
top: calc(50% - 0.8rem);
left: calc(-0.8rem - 2px);
width: 1.6rem;
height: 1.6rem;
2020-07-16 07:05:22 -04:00
display: flex;
2023-06-06 08:22:18 -04:00
align-items: center;
justify-content: center;
2023-08-31 12:06:32 -04:00
font-family: var(--wa-font-family-longform);
font-weight: var(--wa-font-weight-heavy);
2023-06-06 08:22:18 -04:00
clip-path: circle(50% at 50% 50%);
2020-07-16 07:05:22 -04:00
}
2023-06-06 08:22:18 -04:00
.callout--tip::before {
content: 'i';
font-style: italic;
2023-08-31 12:06:32 -04:00
background-color: var(--wa-color-brand-element-outline-muted);
color: var(--wa-color-brand-text-on-muted);
2020-07-16 07:05:22 -04:00
}
2023-06-06 08:22:18 -04:00
.callout--warning {
2023-08-31 12:06:32 -04:00
background-color: var(--wa-color-warning-container-fill-muted);
border-left-color: var(--wa-color-warning-element-outline-muted);
color: var(--wa-color-warning-text-on-muted);
2020-07-16 07:05:22 -04:00
}
2023-06-06 08:22:18 -04:00
.callout--warning::before {
content: '!';
2023-08-31 12:06:32 -04:00
background-color: var(--wa-color-warning-element-outline-muted);
color: var(--wa-color-warning-text-on-muted);
2021-09-07 11:52:58 -04:00
}
2023-06-06 08:22:18 -04:00
.callout--danger {
2023-08-31 12:06:32 -04:00
background-color: var(--wa-color-danger-container-fill-muted);
border-left-color: var(--wa-color-danger-element-outline-muted);
color: var(--wa-color-danger-text-on-muted);
2023-06-06 08:22:18 -04:00
}
2020-07-16 07:05:22 -04:00
2023-06-06 08:22:18 -04:00
.callout--danger::before {
content: '‼';
2023-08-31 12:06:32 -04:00
background-color: var(--wa-color-danger-element-outline-muted);
color: var(--wa-color-danger-text-on-muted);
2023-06-06 08:22:18 -04:00
}
2020-07-16 07:05:22 -04:00
2023-06-06 08:22:18 -04:00
.callout + .callout {
margin-top: calc(-0.5 * var(--docs-content-vertical-spacing));
}
2020-07-16 07:05:22 -04:00
2023-06-06 08:22:18 -04:00
.callout a {
color: inherit;
}
2020-08-10 07:34:16 -04:00
2023-06-06 08:22:18 -04:00
/* Aside */
.content aside {
float: right;
min-width: 300px;
max-width: 50%;
2023-08-31 12:06:32 -04:00
background: var(--wa-color-surface-lowered);
border-radius: var(--wa-corners-1x);
padding: var(--wa-space-m);
margin-left: var(--wa-space-m);
2023-06-06 08:22:18 -04:00
}
.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));
2020-08-10 07:34:16 -04:00
}
2020-07-16 07:05:22 -04:00
}
2023-06-06 08:22:18 -04:00
/* Details */
.content details {
2023-08-31 12:06:32 -04:00
background-color: var(--wa-color-surface-lowered);
border-radius: var(--wa-corners-1x);
padding: var(--wa-space-m);
2023-06-06 08:22:18 -04:00
margin: 0 0 var(--docs-content-vertical-spacing) 0;
}
.content details summary {
2023-08-31 12:06:32 -04:00
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));
2023-06-06 08:22:18 -04:00
cursor: pointer;
user-select: none;
}
.content details summary span {
2023-08-31 12:06:32 -04:00
padding-left: var(--wa-space-xs);
2023-06-06 08:22:18 -04:00
}
.content details[open] summary {
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
margin-bottom: 1rem;
}
.content details[open] summary:focus-visible {
2023-08-31 12:06:32 -04:00
border-radius: var(--wa-corners-1x);
2023-06-06 08:22:18 -04:00
}
.content details > :last-child {
margin-bottom: 0;
}
.content details > :nth-child(2) {
margin-top: 0;
}
.content details + details {
2023-08-31 12:06:32 -04:00
margin-top: calc(-1 * var(--docs-content-vertical-spacing) + (2 * var(--wa-border-width-thin)));
2023-06-06 08:22:18 -04:00
}
/* 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);
2023-08-31 12:06:32 -04:00
border-right: solid var(--wa-border-width-thin) var(--wa-color-surface-outline);
2023-06-06 08:22:18 -04:00
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 {
2023-08-31 12:06:32 -04:00
background: var(--wa-color-neutral-60);
2023-06-06 08:22:18 -04:00
}
#sidebar:hover::-webkit-scrollbar-track {
2023-08-31 12:06:32 -04:00
background: var(--wa-color-neutral-95);
2023-06-06 08:22:18 -04:00
}
#sidebar > header {
margin-bottom: 1.5rem;
}
#sidebar > header h1 {
margin: 0;
}
#sidebar > header a {
display: block;
2020-07-15 17:30:37 -04:00
}
2023-06-06 08:22:18 -04:00
#sidebar nav a {
text-decoration: none;
2020-07-15 17:30:37 -04:00
}
2023-06-06 08:22:18 -04:00
#sidebar nav h2 {
2023-08-31 12:06:32 -04:00
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;
}
2023-06-06 08:22:18 -04:00
#sidebar ul {
padding: 0;
margin: 0;
2020-07-16 07:44:01 -04:00
}
2023-06-06 08:22:18 -04:00
#sidebar ul li {
list-style: none;
padding: 0;
margin: 0.125rem 0.5rem;
2020-07-16 07:44:01 -04:00
}
2023-06-06 08:22:18 -04:00
#sidebar ul ul ul {
margin-left: 0.75rem;
2020-07-16 07:44:01 -04:00
}
2023-06-06 08:22:18 -04:00
#sidebar ul li a {
line-height: 1.33;
color: inherit;
display: inline-block;
padding: 0;
2020-07-15 17:30:37 -04:00
}
2023-06-06 08:22:18 -04:00
#sidebar ul li a:not(.active-link):hover {
2023-08-31 12:06:32 -04:00
color: var(--wa-color-text-link);
2020-12-23 15:56:58 -05:00
}
2023-06-06 08:22:18 -04:00
#sidebar nav .active-link {
2023-08-31 12:06:32 -04:00
color: var(--wa-color-text-link);
border-bottom: dashed 1px var(--wa-color-text-link);
2020-07-15 17:30:37 -04:00
}
2023-06-06 08:22:18 -04:00
#sidebar > header img {
display: block;
width: 100%;
height: auto;
margin: 0 auto;
2021-08-20 07:56:18 -04:00
}
2023-06-06 08:22:18 -04:00
@media screen and (max-width: 900px) {
#sidebar {
translate: -100%;
}
.sidebar-open #sidebar {
translate: 0;
}
2020-07-15 17:30:37 -04:00
}
2023-06-06 08:22:18 -04:00
.sidebar-version {
2023-08-31 12:06:32 -04:00
font-size: var(--wa-font-size-s);
color: var(--wa-color-text-quiet);
2023-06-06 08:22:18 -04:00
text-align: right;
margin-top: -0.5rem;
margin-right: 1rem;
margin-bottom: -0.5rem;
2020-07-15 17:30:37 -04:00
}
2023-06-06 08:22:18 -04:00
.sidebar-buttons {
display: flex;
justify-content: space-between;
2020-07-15 17:30:37 -04:00
}
2023-06-06 08:22:18 -04:00
/* 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);
2020-07-15 17:30:37 -04:00
}
2023-06-06 08:22:18 -04:00
.sidebar-open .content {
margin-left: 0;
2020-07-15 17:30:37 -04:00
}
2023-06-06 08:22:18 -04:00
.content__body > :last-child {
margin-bottom: 0;
2020-07-15 17:30:37 -04:00
}
2023-06-06 08:22:18 -04:00
@media screen and (max-width: 900px) {
main {
margin-left: 0;
}
2020-07-15 17:30:37 -04:00
}
2023-06-06 08:22:18 -04:00
/* Component layouts */
.content {
display: grid;
grid-template-columns: 100%;
gap: 2rem;
position: relative;
max-width: var(--docs-content-max-width);
margin: 0 auto;
2020-07-15 17:30:37 -04:00
}
2023-06-06 08:22:18 -04:00
.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));
2020-07-15 17:30:37 -04:00
}
2023-06-06 08:22:18 -04:00
.content__body {
order: 1;
width: 100%;
2020-07-15 17:30:37 -04:00
}
2023-06-06 08:22:18 -04:00
.content:not(.content--with-toc) .content__toc {
display: none;
2020-08-07 15:39:39 -04:00
}
2023-06-06 08:22:18 -04:00
.content__toc {
order: 2;
display: flex;
flex-direction: column;
margin-top: 0;
2020-07-15 17:30:37 -04:00
}
2023-06-06 08:22:18 -04:00
.content__toc ul {
position: sticky;
top: 5rem;
max-height: calc(100vh - 6rem);
2023-08-31 12:06:32 -04:00
font-size: var(--wa-font-size-s);
2023-06-06 08:22:18 -04:00
line-height: 1.33;
2023-08-31 12:06:32 -04:00
border-left: var(--wa-border-style) var(--wa-border-width-thin) var(--wa-color-surface-outline);
2023-06-06 08:22:18 -04:00
list-style: none;
padding: 1rem 0;
margin: 0;
padding-left: 1rem;
overflow-y: auto;
2020-07-15 17:30:37 -04:00
}
2023-06-06 08:22:18 -04:00
.content__toc li {
padding: 0 0 0 0.5rem;
margin: 0;
2020-07-15 17:30:37 -04:00
}
2023-06-06 08:22:18 -04:00
.content__toc li[data-level='3'] {
margin-left: 1rem;
2020-07-15 17:30:37 -04:00
}
2023-06-06 08:22:18 -04:00
/* 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;
2020-07-15 17:30:37 -04:00
}
2023-06-06 08:22:18 -04:00
.content__toc li:not(:last-of-type) {
margin-bottom: 0.6rem;
2020-07-15 17:30:37 -04:00
}
2023-06-06 08:22:18 -04:00
.content__toc a {
2023-08-31 12:06:32 -04:00
color: var(--wa-color-text-normal);
2023-06-06 08:22:18 -04:00
text-decoration: none;
2020-07-15 17:30:37 -04:00
}
2023-06-06 08:22:18 -04:00
.content__toc a:hover {
2023-08-31 12:06:32 -04:00
color: var(--wa-color-text-link);
2020-07-15 17:30:37 -04:00
}
2023-06-06 08:22:18 -04:00
.content__toc a.active {
2023-08-31 12:06:32 -04:00
color: var(--wa-color-brand-text-on-surface);
border-bottom: dashed 1px var(--wa-color-brand-text-on-surface);
2020-07-15 17:30:37 -04:00
}
2023-06-06 08:22:18 -04:00
.content__toc .top a {
2023-08-31 12:06:32 -04:00
font-weight: var(--wa-font-weight-medium);
color: var(--wa-color-text-quiet);
2020-07-15 17:30:37 -04:00
}
2023-06-06 08:22:18 -04:00
@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;
2023-08-31 12:06:32 -04:00
border-bottom: solid 1px var(--wa-color-surface-outline);
2023-06-06 08:22:18 -04:00
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;
2023-08-31 12:06:32 -04:00
background: linear-gradient(90deg, rgba(0 0 0 / 0) 0%, var(--wa-color-surface-default) 100%);
2023-06-06 08:22:18 -04:00
}
.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;
}
2020-07-15 17:30:37 -04:00
}
2023-06-06 08:22:18 -04:00
/* Menu toggle */
#menu-toggle {
display: none;
position: fixed;
z-index: 30;
top: 0.25rem;
left: 0.25rem;
height: auto;
width: auto;
2023-08-31 12:06:32 -04:00
color: var(--wa-color-neutral-container-fill-vivid);
2023-06-06 08:22:18 -04:00
border: none;
border-radius: 50%;
2023-08-31 12:06:32 -04:00
background: var(--wa-color-surface-default);
2023-06-06 08:22:18 -04:00
padding: 0.5rem;
margin: 0;
cursor: pointer;
2023-08-31 12:06:32 -04:00
transition: 250ms rotate ease;
2020-07-15 17:30:37 -04:00
}
2023-06-06 08:22:18 -04:00
@media screen and (max-width: 900px) {
#menu-toggle {
display: flex;
}
2020-07-15 17:30:37 -04:00
}
2023-06-06 08:22:18 -04:00
#menu-toggle svg {
width: 1.25rem;
height: 1.25rem;
}
2023-06-06 08:22:18 -04:00
html.sidebar-open #menu-toggle {
rotate: 180deg;
2020-07-15 17:30:37 -04:00
}
2023-06-06 08:22:18 -04:00
/* 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;
2023-08-31 12:06:32 -04:00
background: var(--wa-color-surface-default);
color: var(--wa-color-text-normal);
padding: 0.5rem;
}
2023-08-11 10:30:40 -04:00
2023-06-06 08:22:18 -04:00
/* Print styles */
@media print {
a:not(.anchor-heading)[href]::after {
content: ' (' attr(href) ')';
}
details,
pre,
.callout {
2023-08-31 12:06:32 -04:00
border: solid var(--wa-border-width-thin) var(--wa-color-surface-outline);
2023-06-06 08:22:18 -04:00
}
details summary {
list-style: none;
}
details summary span {
padding-left: 0;
}
details summary::marker,
details summary::-webkit-details-marker {
display: none;
}
.callout::before {
2023-08-31 12:06:32 -04:00
border: solid var(--wa-border-width-thin) var(--wa-color-surface-outline);
2023-06-06 08:22:18 -04:00
}
.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 {
2023-08-31 12:06:32 -04:00
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);
2023-06-06 08:22:18 -04:00
}
#sidebar {
display: none;
}
#content {
margin-left: 0;
}
#menu-toggle,
#icon-toolbar,
.external-link__icon {
display: none;
}
2020-07-15 17:30:37 -04:00
}
2023-06-06 08:22:18 -04:00
/* Splash */
.splash {
display: flex;
padding-top: 2rem;
2020-07-15 17:30:37 -04:00
}
2023-06-06 08:22:18 -04:00
.splash-start {
2023-08-31 12:06:32 -04:00
min-width: 440px;
2020-07-15 17:30:37 -04:00
}
2023-06-28 15:27:21 -04:00
.splash li img {
width: 1em;
height: 1em;
vertical-align: -2px;
}
2023-06-06 08:22:18 -04:00
.splash-end {
display: flex;
align-items: flex-end;
width: auto;
padding-left: 1rem;
2020-07-15 17:30:37 -04:00
}
2023-06-06 08:22:18 -04:00
.splash-image {
width: 100%;
height: auto;
2020-07-15 17:30:37 -04:00
}
2023-08-31 12:06:32 -04:00
.splash .wordmark {
2023-06-06 08:22:18 -04:00
max-width: 22rem;
}
2023-06-06 08:22:18 -04:00
.splash-start h1:first-of-type {
2023-08-31 12:06:32 -04:00
font-size: var(--wa-font-size-l);
font-weight: var(--wa-font-weight-normal);
2023-06-06 08:22:18 -04:00
margin: 0 0 0.5rem 0;
2022-07-15 09:35:59 -04:00
}
2023-06-06 08:22:18 -04:00
@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;
2022-07-15 09:35:59 -04:00
}
}
2023-06-06 08:22:18 -04:00
/* Component headers */
.component-header h1 {
margin-bottom: 0;
}
.component-header__tag {
margin-top: -0.5rem;
margin-bottom: 0.5rem;
Enrich components `@summary` with description from docs (#962) * keep header styles with repositioned description text * `animated-image` move description to component * code style * `avatar` add summary from docs * `badge` add summary from docs * `breadcrumb` add summary from docs * `button` add summary from docs * lead sentence is now part of the header * `button-group` add summary from docs * `card` add summary from docs * `checkbox` add summary from docs * `color-picker` add summary from docs * `details` add summary from docs * `dialog` add summary from docs * `divider` add summary from docs * `drawer` add summary from docs * `dropdown` add summary from docs * `format-bytes` add summary from docs * `format-date` add summary from docs * `format-number` add summary from docs * `icon` add summary from docs * `icon-button` add summary from docs * `image-comparer` add summary from docs * `include` add summary from docs * `input` add summary from docs * `menu` add summary from docs * `menu-item` add summary from docs * `menu-label` add summary from docs * `popup` add summary from docs * `progressbar` add summary from docs * `progress-ring` add summary from docs * `radio` add summary from docs * `radio-button` add summary from docs * `range` add summary from docs * `rating` add summary from docs * `relative-time` add summary from docs * `select` add summary from docs * `skeleton` add summary from docs * `spinner` add summary from docs * `split-panel` add summary from docs * `switch` add summary from docs * `tab-group` add summary from docs * `tag` add summary from docs * `textarea` add summary from docs * `tooltip` add summary from docs * `visually-hidden` add summary from docs * `animation` add summary from docs * `breadcrumb-item` add summary from docs * `mutation-observer` add summary from docs * `radio-group` add summary from docs * `resize-observer` add summary from docs * `tab` add summary from docs * `tab-panel` add summary from docs * `tree` add summary from docs * `tree-item` add summary from docs * remove `title` for further usage of `Sl` classnames in docs * revert: use markdown parser for component summary
2022-10-21 15:56:35 +02:00
}
2023-06-06 08:22:18 -04:00
.component-header__tag code {
2020-07-15 17:30:37 -04:00
background: none;
2023-08-31 12:06:32 -04:00
color: var(--wa-color-text-quiet);
font-size: var(--wa-font-size-l);
2020-07-15 17:30:37 -04:00
padding: 0;
margin: 0;
}
.component-header__info {
2023-08-31 12:06:32 -04:00
margin-bottom: var(--wa-space-2xl);
2023-06-06 08:22:18 -04:00
}
.component-summary {
2023-08-31 12:06:32 -04:00
font-size: var(--wa-font-size-l);
2023-06-06 08:22:18 -04:00
line-height: 1.6;
margin: 2rem 0;
2020-07-15 17:30:37 -04:00
}
/* Repo buttons */
2023-06-28 15:27:21 -04:00
.sidebar-buttons {
display: flex;
gap: 0.125rem;
justify-content: space-between;
}
.sidebar-buttons .repo-button {
flex: 1 1 auto;
2020-07-15 17:30:37 -04:00
}
2021-08-18 09:52:51 -04:00
.repo-button--github sl-icon {
2023-08-31 12:06:32 -04:00
color: var(--wa-color-neutral-40);
2020-07-15 17:30:37 -04:00
}
2023-06-28 15:27:21 -04:00
.repo-button--star sl-icon {
2023-08-31 12:06:32 -04:00
color: var(--wa-color-yellow-80);
2023-06-28 15:27:21 -04:00
}
2021-08-18 09:52:51 -04:00
.repo-button--twitter sl-icon {
2023-08-31 12:06:32 -04:00
color: var(--wa-color-blue-70);
2020-07-15 17:30:37 -04:00
}
2021-08-31 07:41:53 -04:00
@media screen and (max-width: 400px) {
2021-09-02 10:57:59 -04:00
:not(.sidebar-buttons) > .repo-button {
2021-08-31 07:41:53 -04:00
width: 100%;
margin-bottom: 1rem;
}
}
2021-08-30 16:38:53 -04:00
body[data-page^='/tokens/'] .table-wrapper td:first-child,
body[data-page^='/tokens/'] .table-wrapper td:first-child code {
2020-07-15 17:30:37 -04:00
white-space: nowrap;
}
2023-08-31 12:06:32 -04:00
/* Border demos */
.border-demo {
height: 60px;
border-left: solid 1px var(--wa-color-brand-element-fill-vivid);
}
.corner-demo {
width: 3rem;
height: 3rem;
2023-08-31 12:06:32 -04:00
background: var(--wa-color-brand-element-fill-vivid);
}
/* Transition demo */
.transition-demo {
position: relative;
2023-08-31 12:06:32 -04:00
background: var(--wa-color-neutral-container-fill-muted);
width: 8rem;
height: 2rem;
}
.transition-demo:after {
content: '';
position: absolute;
2023-08-31 12:06:32 -04:00
background-color: var(--wa-color-brand-element-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 {
2023-08-31 12:06:32 -04:00
background: var(--wa-color-brand-element-fill-vivid);
}
2023-08-31 12:06:32 -04:00
/* Shadow demo */
.shadow-demo {
background: transparent;
border-radius: 3px;
width: 4rem;
height: 4rem;
2021-10-01 09:03:29 -04:00
margin: 1rem;
}
/* Color palettes */
.color-palette {
display: grid;
grid-template-columns: 200px repeat(11, 1fr);
2023-08-31 12:06:32 -04:00
gap: var(--wa-space-m) 1px;
margin: var(--wa-space-2xl) 0;
}
.color-palette__name {
2023-08-31 12:06:32 -04:00
font-weight: var(--wa-font-weight-medium);
grid-template-columns: repeat(11, 1fr);
}
.color-palette__name code {
background: none;
2023-08-31 12:06:32 -04:00
font-size: var(--wa-font-size-s);
}
.color-palette__example {
2023-08-31 12:06:32 -04:00
font-size: var(--wa-font-size-s);
text-align: center;
}
.color-palette__swatch {
height: 3rem;
2023-08-31 12:06:32 -04:00
border-radius: var(--wa-corners-half);
}
2021-08-05 17:42:12 -04:00
.color-palette__swatch--border {
2023-08-31 12:06:32 -04:00
box-shadow: inset 0 0 0 1px var(--wa-color-surface-outline);
2021-08-05 17:42:12 -04:00
}
@media screen and (max-width: 1200px) {
.color-palette {
grid-template-columns: repeat(6, 1fr);
}
.color-palette__name {
grid-column-start: span 6;
}
}