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

283 lines
5.3 KiB
CSS
Raw Normal View History

2024-04-17 11:20:27 -04:00
@import 'code-examples.css';
@import 'code-highlighter.css';
@import 'copy-code.css';
@import 'outline.css';
@import 'search.css';
2024-06-14 18:57:52 -04:00
@import 'cera_typeface.css';
2024-04-17 11:20:27 -04:00
2024-06-13 23:06:24 -04:00
:root {
--wa-brand-orange: #f36944;
2024-06-14 18:57:52 -04:00
--wa-brand-grey: #30323b;
2024-06-13 23:06:24 -04:00
}
html.wa-theme-default-dark .only-light,
html:not(.wa-theme-default-dark) .only-dark {
display: none;
}
wa-page {
--wa-flow-spacing: var(--wa-space-xl);
}
2024-04-17 11:20:27 -04:00
/* Header */
wa-page::part(header) {
background-color: var(--wa-color-surface-default);
2024-05-21 17:57:38 -04:00
border-bottom: var(--wa-border-style) var(--wa-panel-border-width) var(--wa-color-neutral-border-quiet);
2024-04-17 11:20:27 -04:00
}
wa-page > header {
flex: 1 1 auto;
display: flex;
align-items: center;
2024-06-13 23:06:24 -04:00
justify-content: space-between;
2024-06-14 18:57:52 -04:00
height: 4rem;
2024-06-13 23:06:24 -04:00
padding-inline: var(--wa-space-xl);
a[href='/'] {
color: var(--wa-color-text-normal);
line-height: 1;
}
2024-04-17 11:20:27 -04:00
2024-06-14 19:12:21 -04:00
wa-button[data-toggle-nav] {
--label-color: currentColor;
2024-06-17 14:15:32 -04:00
margin-inline-start: -0.875rem;
margin-inline-end: 0;
2024-06-14 19:12:21 -04:00
&::part(base) {
padding: 0;
2024-06-17 14:15:32 -04:00
padding-inline: 0.875rem;
2024-06-14 19:12:21 -04:00
}
}
2024-04-17 11:20:27 -04:00
svg {
width: auto;
2024-06-13 23:06:24 -04:00
height: 1.75rem;
}
#docs-branding,
#docs-toolbar {
display: flex;
align-items: center;
gap: var(--wa-space-xs);
}
#version-number {
color: var(--wa-color-text-quiet);
font-size: var(--wa-font-size-xs);
line-height: 1;
margin-block-start: var(--wa-space-2xs);
}
#version-number + wa-badge {
--background-color: var(--wa-color-warning-fill-quiet);
--content-color: var(--wa-color-warning-on-quiet);
font-size: var(--wa-font-size-2xs);
text-transform: uppercase;
}
wa-button#search-trigger {
--background-color: var(--wa-form-control-background-color);
--border-color: var(--wa-form-control-resting-color);
}
#search-trigger kbd {
font-size: var(--wa-font-size-2xs);
line-height: var(--wa-form-control-value-line-height);
2024-04-17 11:20:27 -04:00
}
}
#sidebar,
#outline {
h2 {
2024-06-13 20:28:34 -04:00
font-size: var(--wa-font-size-m);
margin-block-end: var(--wa-space-m);
}
h2:not(:first-of-type) {
margin-block-start: var(--wa-space-xl);
}
ul {
border-inline-start: var(--wa-border-width-s) solid var(--wa-color-surface-border);
font-size: var(--wa-font-size-s);
line-height: var(--wa-line-height-condensed);
margin: 0;
padding-inline-start: var(--wa-space-m);
}
ul ul {
margin-block-start: var(--wa-space-m);
}
li {
list-style: none;
margin-block-end: var(--wa-space-m);
}
li a {
color: var(--wa-color-text-normal);
text-decoration: none;
}
li a:hover {
text-decoration: underline;
2024-04-17 11:20:27 -04:00
}
}
2024-06-17 16:34:27 -04:00
#sidebar-close-button {
display: none;
}
@media screen and (max-width: 768px) {
#sidebar-close-button {
display: inline-block;
position: absolute;
top: 1rem;
right: 1rem;
}
}
2024-04-17 11:20:27 -04:00
#sidebar nav {
padding-bottom: 1rem;
}
2024-06-13 20:28:34 -04:00
wa-page::part(menu) {
scrollbar-width: thin;
}
2024-04-17 11:20:27 -04:00
/* Main content */
wa-page > main {
max-width: 80ch;
2024-06-20 11:56:49 -04:00
padding: var(--wa-space-xl);
2024-04-17 11:20:27 -04:00
margin-inline: auto;
}
2024-06-20 10:51:07 -04:00
.component-info {
margin-block-end: var(--wa-flow-spacing);
}
2024-04-17 11:20:27 -04:00
/* Current link */
#sidebar,
#outline {
.current {
font-weight: var(--wa-font-weight-bold);
2024-04-17 11:20:27 -04:00
text-decoration-style: solid;
}
}
/* Anchor headings */
.anchor-heading a {
visibility: hidden;
text-decoration: none;
}
@media (hover: hover) {
.anchor-heading:hover a {
visibility: visible;
padding: 0 0.125em;
}
}
/* Callouts */
.callout {
display: flex;
gap: 1rem;
border: var(--wa-border-style) var(--wa-border-width-s);
2024-05-29 18:02:01 -04:00
border-radius: var(--wa-border-radius-m);
2024-04-17 11:20:27 -04:00
padding: 1rem;
margin-block-end: var(--wa-flow-spacing);
:first-child {
margin-block-start: 0;
}
:last-child {
margin-block-end: 0;
}
}
.callout-icon {
flex: 0 0 auto;
font-size: 1.5rem;
}
.callout-content {
flex: 1 1 auto;
}
.callout-info {
2024-05-21 17:57:38 -04:00
background-color: var(--wa-color-brand-fill-quiet);
border-color: var(--wa-color-brand-border-quiet);
2024-04-17 11:20:27 -04:00
.callout-icon {
2024-05-21 17:57:38 -04:00
color: var(--wa-color-brand-on-normal);
2024-04-17 11:20:27 -04:00
}
code {
2024-05-21 17:57:38 -04:00
background-color: var(--wa-color-brand-fill-normal);
2024-04-17 11:20:27 -04:00
}
}
.callout-warning {
2024-05-21 17:57:38 -04:00
background-color: var(--wa-color-warning-fill-quiet);
border-color: var(--wa-color-warning-border-quiet);
2024-04-17 11:20:27 -04:00
.callout-icon {
2024-05-21 17:57:38 -04:00
color: var(--wa-color-warning-on-normal);
2024-04-17 11:20:27 -04:00
}
code {
2024-05-21 17:57:38 -04:00
background-color: var(--wa-color-warning-fill-normal);
2024-04-17 11:20:27 -04:00
}
}
2024-06-06 16:55:01 -04:00
/* Swatches */
.swatch {
2024-06-07 15:42:27 -04:00
background-color: transparent;
2024-06-06 16:55:01 -04:00
border-color: var(--wa-color-neutral-border-normal);
border-style: var(--wa-border-style);
border-width: var(--wa-border-width-s);
border-radius: var(--wa-border-radius-s);
2024-06-07 15:42:27 -04:00
box-sizing: border-box;
2024-06-06 16:55:01 -04:00
line-height: 2.5;
height: 2.5em;
padding-inline: var(--wa-space-xs);
}
2024-06-17 12:27:10 -04:00
/* Utilities */
.two-columns {
columns: 2;
gap: 1rem;
}
.component-table td > * + * {
margin-block-start: var(--wa-space-s);
}
2024-06-20 15:56:06 -04:00
.table-scroll {
overflow-x: auto;
}
Initial SSR implementation (#157) * continued ssr work * continued ssr work * prettier * all components now rendering * everything finally works * fix type issues * working on breadcrumb * working on breadcrumb * radio group * convert all tests to ssr * prettier * test suite finally passing * add layout stuff * add changelog * fix TS issue * fix tests * fixing deploy stuff * get QR code displaying * fix tests * fix tests * prettier * condense hydration stuff * prettier * comment out range test * fixing issues * use base fixtures * fixing examples * dont vendor * fix import of hydration support * adding notes * add notesg * add ssr loader * fix build * prettier * add notes * add notes * prettier * fixing bundled stuff * remove cdn * remove cdn * prettier * fiixng tests * prettier * split jobs?? * prettier * fix build stuff * add reset mouse and await aTimeout * prettier * fix improper tests * prettier * bail on first * fix linting * only test form with client * redundancy on ssr-loader?? * maybe this will work * prettier * try callout now * fix form.test.ts * fix form.test.ts * prettier * fix forms * fix forms * try again * prettier * add some awaits * prettier * comment out broken SSR tests * prettier * comment out broken SSR tests * prettier * dont skip in CI * upgrade playwright to beta * prettier * try some trickery * try some trickery * await updateComplete * try to fix form.test.ts * import hydrateable elements 1 time * prettier * fix input defaultValue issues * fix form controls to behave like their native counterpartS * add changelog entry * prettier * fix unexpected behavior with range / button
2024-09-11 10:25:42 -04:00
/** mobile */
@media screen and (max-width: 768px) {
wa-page .only-desktop {
display: none;
}
}
/** desktop */
@media screen and not (max-width: 768px) {
wa-page [data-toggle-nav],
wa-page .only-mobile {
display: none;
}
/* Navigation sidebar */
wa-page::part(navigation) {
border-right: var(--wa-border-style) var(--wa-panel-border-width) var(--wa-color-neutral-border-quiet);
}
wa-page > #sidebar {
overflow: auto;
max-height: 100%;
min-width: 300px;
padding: var(--wa-space-xl);
max-width: 300px;
}
wa-page > main {
padding: var(--wa-space-3xl);
}
}