mirror of
https://github.com/shoelace-style/webawesome.git
synced 2026-01-12 12:09:26 +00:00
* move print styles * begin native styles split * unsplit button styles 😓 * unsplit callout; remove .wa-callout * merge forms * remove unused * remove unused * unsplit checkbox * remove old astro config * remove overflow * unsplit slider * fix tooltip position in RTL * unsplit radio * move required light DOM styles to <wa-page> * remove unused file * remove unused import * remove * goodbye * fix examples * unsplit dialog * unsplit select * remove select * unsplit input * unsplit details * update * update comment * update textarea * combine native docs; improvements * update * reorg and fix headings * fix details summary padding; fixes #684 * update * fix native details summary padding; fixes #684 * #684 * remove passthrough style nonsense * it's CSS not JS * fix details in sidebar * add spacing in native buttons for icons * whitespace * update docs * remove button group util * remove shadow folder, add component folder * layerize * default border radius * remove color contrast script from dist * add term * layerize themes + color folders * reorder * remove radio button; #504 * remove visual tests * remove visual tests * remove unused stylesheet * make search smarter * add radio styles * Fix filled textareas * re-introduce visual tests (with adjustments) * fix button appearances * fix textarea focus styles * re-introduce appearance classes * remove 'native styles' note from component pages * fix checked radio styles * touch up callout styles * remove errant `.wa-tag` * scope appearance classes to relevant elements * more visual test cases * fix details borders * minor visual tests reorg * add `--box-shadow` to buttons * fix Awesome theme * use same layer for all themes (allows unset properties to inherit from Default theme) * fix box-shadow in wa-textarea * set button box shadow to `initial` * fix Active theme * fix Brutalist theme * fix Glossy theme * fix Matter theme (mostly) * fix Playful theme * fix Premium theme * fix Shoelac theme * fix Tailspin theme * fix custom radio button styles * fix links to native styles doc --------- Co-authored-by: lindsaym-fa <dev@lindsaym.design>
673 lines
12 KiB
CSS
673 lines
12 KiB
CSS
@import 'code-examples.css';
|
|
@import 'code-highlighter.css';
|
|
@import 'copy-code.css';
|
|
@import 'outline.css';
|
|
@import 'search.css';
|
|
@import 'cera-typeface.css';
|
|
@import 'theme-icons.css';
|
|
|
|
:root {
|
|
--wa-brand-orange: #f36944;
|
|
--wa-brand-grey: #30323b;
|
|
}
|
|
|
|
.wa-dark .only-light,
|
|
.only-dark:not(.wa-dark, .wa-dark *) {
|
|
display: none;
|
|
}
|
|
|
|
wa-page {
|
|
--wa-flow-spacing: var(--wa-space-xl);
|
|
}
|
|
|
|
/* Header */
|
|
wa-page::part(header) {
|
|
background-color: var(--wa-color-surface-default);
|
|
border-bottom: var(--wa-border-style) var(--wa-panel-border-width) var(--wa-color-surface-border);
|
|
}
|
|
|
|
wa-page::part(body) {
|
|
padding-top: 0px;
|
|
}
|
|
|
|
wa-page::part(header-actions) {
|
|
align-self: center;
|
|
}
|
|
|
|
wa-page > header {
|
|
padding-inline: var(--wa-space-xl);
|
|
|
|
a[href='/'] {
|
|
color: var(--wa-color-text-normal);
|
|
line-height: 1;
|
|
}
|
|
|
|
wa-button[data-toggle-nav] {
|
|
--text-color: currentColor;
|
|
font-size: 1rem;
|
|
margin-inline-start: -0.875rem;
|
|
margin-inline-end: 0;
|
|
|
|
&::part(base) {
|
|
padding: 0;
|
|
padding-inline: 0.875rem;
|
|
}
|
|
}
|
|
|
|
svg {
|
|
width: auto;
|
|
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 {
|
|
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-border-color);
|
|
}
|
|
#search-trigger kbd {
|
|
font-size: var(--wa-font-size-2xs);
|
|
line-height: var(--wa-form-control-value-line-height);
|
|
}
|
|
}
|
|
|
|
#sidebar,
|
|
#outline {
|
|
h2 {
|
|
font-size: var(--wa-font-size-m);
|
|
margin: 0;
|
|
}
|
|
|
|
h2:not(:first-child) {
|
|
margin-block-start: var(--wa-space-xs);
|
|
}
|
|
|
|
wa-details {
|
|
--spacing: var(--wa-space-xs);
|
|
|
|
&::part(base) {
|
|
border: none;
|
|
background: none;
|
|
padding: 0;
|
|
}
|
|
}
|
|
|
|
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);
|
|
}
|
|
|
|
ul:empty {
|
|
display: none;
|
|
}
|
|
|
|
li {
|
|
list-style: none;
|
|
|
|
+ li {
|
|
margin-block-start: var(--wa-space-m);
|
|
}
|
|
}
|
|
|
|
li a {
|
|
color: var(--wa-color-text-normal);
|
|
text-decoration: none;
|
|
|
|
&:hover {
|
|
text-decoration: underline;
|
|
}
|
|
}
|
|
|
|
li wa-badge::part(base) {
|
|
font-size: var(--wa-font-size-2xs);
|
|
font-weight: var(--wa-font-weight-bold);
|
|
}
|
|
|
|
li wa-icon {
|
|
color: var(--wa-color-text-quiet);
|
|
vertical-align: middle;
|
|
|
|
&[name='flask'] {
|
|
margin-inline: 0.125em;
|
|
}
|
|
}
|
|
}
|
|
|
|
#outline-standard h2 {
|
|
margin-block-end: var(--wa-space-m);
|
|
}
|
|
|
|
/* Pro badges */
|
|
wa-badge.pro {
|
|
background-color: var(--wa-brand-orange);
|
|
border-color: var(--wa-brand-orange);
|
|
}
|
|
|
|
#sidebar {
|
|
h2 {
|
|
color: var(--wa-color-text-quiet);
|
|
|
|
a {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.4em;
|
|
color: var(--wa-color-text-normal);
|
|
text-decoration: none;
|
|
|
|
wa-icon {
|
|
margin-block-end: -0.15em;
|
|
font-size: var(--wa-font-size-s);
|
|
font-weight: var(--wa-font-weight-action);
|
|
color: var(--wa-color-gray-70);
|
|
}
|
|
|
|
&:hover {
|
|
color: var(--wa-color-brand-on-normal);
|
|
|
|
wa-icon {
|
|
color: var(--wa-color-brand-on-quiet);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
wa-icon-button.delete {
|
|
vertical-align: -0.2em;
|
|
margin-inline-start: var(--wa-space-xs);
|
|
|
|
&:not(li:hover > *, :focus) {
|
|
opacity: 0;
|
|
}
|
|
}
|
|
|
|
wa-details {
|
|
--show-duration: 0;
|
|
--hide-duration: 0;
|
|
}
|
|
}
|
|
|
|
wa-icon-button.delete {
|
|
&:hover {
|
|
color: var(--wa-color-danger-on-quiet);
|
|
}
|
|
|
|
&::part(base):hover {
|
|
background: var(--wa-color-danger-fill-quiet);
|
|
}
|
|
|
|
&:not(:hover, :focus) {
|
|
opacity: 0.5;
|
|
}
|
|
}
|
|
|
|
#sidebar-close-button {
|
|
display: none;
|
|
}
|
|
|
|
@media screen and (max-width: 768px) {
|
|
#sidebar-close-button {
|
|
display: inline-block;
|
|
position: absolute;
|
|
top: 1rem;
|
|
right: 1rem;
|
|
}
|
|
}
|
|
|
|
#sidebar nav {
|
|
padding-bottom: 1rem;
|
|
}
|
|
|
|
wa-page::part(menu) {
|
|
scrollbar-width: thin;
|
|
}
|
|
|
|
wa-page[view='mobile'] :is([slot='navigation-header'], [slot='navigation']) {
|
|
padding: 0;
|
|
|
|
& wa-details::part(icon) {
|
|
padding-inline: var(--wa-space-xs); /* aligns details icons with drawer close icon */
|
|
}
|
|
}
|
|
|
|
[slot='navigation-header'] wa-menu {
|
|
font-family: var(--wa-font-family-body);
|
|
font-size: var(--wa-font-size-m);
|
|
font-weight: var(--wa-font-weight-normal);
|
|
}
|
|
|
|
/* Main content */
|
|
wa-page > main {
|
|
max-width: 80ch;
|
|
padding: var(--wa-space-xl);
|
|
margin-inline: auto;
|
|
}
|
|
|
|
h1.title {
|
|
wa-badge {
|
|
vertical-align: middle;
|
|
font-size: 1.5rem;
|
|
}
|
|
}
|
|
|
|
.block-info {
|
|
display: flex;
|
|
gap: var(--wa-space-xs);
|
|
flex-wrap: wrap;
|
|
align-items: center;
|
|
margin-block-end: var(--wa-flow-spacing);
|
|
|
|
code {
|
|
line-height: var(--wa-line-height-condensed);
|
|
}
|
|
}
|
|
|
|
/* Current link */
|
|
#sidebar,
|
|
#outline {
|
|
.current {
|
|
font-weight: var(--wa-font-weight-bold);
|
|
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;
|
|
}
|
|
}
|
|
|
|
@media print {
|
|
/* Show URLs for printed links */
|
|
a:not(.anchor-heading)[href]::after {
|
|
content: ' (' attr(href) ')';
|
|
}
|
|
}
|
|
|
|
/* Callouts */
|
|
.callout {
|
|
display: flex;
|
|
gap: 1rem;
|
|
border: var(--wa-border-style) var(--wa-border-width-s);
|
|
border-radius: var(--wa-border-radius-l);
|
|
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 {
|
|
background-color: var(--wa-color-brand-fill-quiet);
|
|
border-color: var(--wa-color-brand-border-quiet);
|
|
|
|
.callout-icon {
|
|
color: var(--wa-color-brand-on-normal);
|
|
}
|
|
|
|
code {
|
|
background-color: var(--wa-color-brand-fill-normal);
|
|
}
|
|
}
|
|
|
|
.callout-warning {
|
|
background-color: var(--wa-color-warning-fill-quiet);
|
|
border-color: var(--wa-color-warning-border-quiet);
|
|
|
|
.callout-icon {
|
|
color: var(--wa-color-warning-on-normal);
|
|
}
|
|
|
|
code {
|
|
background-color: var(--wa-color-warning-fill-normal);
|
|
}
|
|
}
|
|
|
|
/* Index Pages */
|
|
wa-page > main:has(> .index-grid) {
|
|
max-width: 120ch;
|
|
margin-inline: auto;
|
|
}
|
|
|
|
.index-summary {
|
|
max-inline-size: 80ch;
|
|
}
|
|
|
|
.index-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(4, 1fr);
|
|
gap: var(--wa-space-2xl);
|
|
margin-block-end: var(--wa-space-3xl);
|
|
|
|
@media screen and (max-width: 1470px) {
|
|
grid-template-columns: repeat(3, 1fr);
|
|
}
|
|
|
|
@media screen and (max-width: 960px) {
|
|
grid-template-columns: repeat(2, 1fr);
|
|
}
|
|
|
|
@media screen and (max-width: 500px) {
|
|
grid-template-columns: repeat(1, 1fr);
|
|
}
|
|
|
|
a {
|
|
border-radius: var(--wa-border-radius-l);
|
|
text-decoration: none;
|
|
}
|
|
|
|
wa-card {
|
|
--spacing: var(--wa-space-m);
|
|
|
|
[slot='header'] {
|
|
display: flex;
|
|
}
|
|
|
|
&::part(header) {
|
|
background-color: var(--header-background, var(--wa-color-neutral-fill-quiet));
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
min-block-size: calc(6rem + var(--spacing));
|
|
}
|
|
}
|
|
}
|
|
|
|
wa-card .page-name {
|
|
font-size: var(--wa-font-size-s);
|
|
font-weight: var(--wa-font-weight-action);
|
|
}
|
|
|
|
.index-category {
|
|
grid-column: 1 / -1;
|
|
margin-block-end: 0;
|
|
margin-block-start: var(--wa-space-2xl);
|
|
}
|
|
|
|
/* Swatches */
|
|
.swatch {
|
|
position: relative;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
background-color: transparent;
|
|
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-m);
|
|
box-sizing: border-box;
|
|
min-height: 2.5em;
|
|
padding: var(--wa-space-xs);
|
|
font-weight: var(--wa-font-weight-semibold);
|
|
line-height: var(--wa-line-height-condensed);
|
|
|
|
&.color {
|
|
border-color: transparent;
|
|
transition: background var(--wa-transition-slow);
|
|
background: linear-gradient(var(--color-2, transparent) 0% 100%) no-repeat border-box var(--color,);
|
|
background-position: var(--color-2-position, bottom);
|
|
background-size: var(--color-2-width, 100%) var(--color-2-height, 50%);
|
|
|
|
&.contrast-fail {
|
|
outline: 1px dashed var(--wa-color-red);
|
|
outline-offset: calc(-1 * var(--wa-space-2xs));
|
|
}
|
|
}
|
|
|
|
> wa-copy-button {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
display: block;
|
|
--background-color-hover: transparent;
|
|
font-family: var(--wa-font-family-code);
|
|
|
|
&::part(button) {
|
|
display: block;
|
|
height: 100%;
|
|
width: 100%;
|
|
}
|
|
|
|
&::part(button):hover {
|
|
cursor: copy;
|
|
}
|
|
|
|
&::part(copy-icon),
|
|
&::part(success-icon),
|
|
&::part(error-icon) {
|
|
opacity: 0 !important;
|
|
}
|
|
}
|
|
}
|
|
|
|
table.colors {
|
|
thead {
|
|
th {
|
|
text-align: center;
|
|
padding-block: 0;
|
|
}
|
|
}
|
|
|
|
tbody {
|
|
tr {
|
|
border: none;
|
|
&:hover {
|
|
background: transparent;
|
|
}
|
|
}
|
|
|
|
th {
|
|
width: 0;
|
|
vertical-align: middle;
|
|
text-align: right;
|
|
}
|
|
|
|
td {
|
|
padding-inline: var(--wa-space-3xs);
|
|
padding-block: var(--wa-space-s);
|
|
}
|
|
}
|
|
|
|
.core-column {
|
|
padding-inline-end: var(--wa-space-xl);
|
|
}
|
|
}
|
|
|
|
.value-up,
|
|
.value-down {
|
|
position: relative;
|
|
|
|
&::after {
|
|
content: ' ' var(--icon);
|
|
position: absolute;
|
|
margin-inline-start: 3em;
|
|
scale: 1 0.6;
|
|
color: color-mix(in oklch, oklch(from var(--icon-color) none c h) 0%, oklch(from currentColor l none none));
|
|
font-size: 90%;
|
|
}
|
|
}
|
|
|
|
.value-down {
|
|
--icon: '▼';
|
|
--icon-color: var(--wa-color-danger-fill-quiet);
|
|
|
|
&::after {
|
|
margin-block-end: -0.2em;
|
|
}
|
|
}
|
|
|
|
.value-up {
|
|
--icon: '▲';
|
|
--icon-color: var(--wa-color-success-fill-quiet);
|
|
}
|
|
|
|
.icon-modifier {
|
|
position: relative;
|
|
display: inline-flex;
|
|
|
|
.modifier {
|
|
position: absolute;
|
|
bottom: -0.1em;
|
|
right: -0.3em;
|
|
font-size: 60%;
|
|
|
|
&::part(svg) {
|
|
stroke: var(--background-color, var(--wa-color-surface-default));
|
|
stroke-width: 100px;
|
|
paint-order: stroke;
|
|
overflow: visible;
|
|
stroke-linecap: round;
|
|
stroke-linejoin: round;
|
|
}
|
|
}
|
|
}
|
|
|
|
/* Layout Examples */
|
|
.layout-example-boundary {
|
|
border: var(--wa-border-width-s) dashed var(--wa-color-neutral-border-normal);
|
|
border-radius: var(--wa-border-radius-l);
|
|
padding: var(--wa-space-s);
|
|
}
|
|
|
|
.layout-example-block {
|
|
background-color: var(--wa-color-indigo-60);
|
|
border-radius: var(--wa-border-radius-m);
|
|
min-block-size: 4rem;
|
|
min-inline-size: 4rem;
|
|
}
|
|
|
|
.layout-example-mixed-sizing .layout-example-block:nth-child(3n) {
|
|
min-inline-size: 6rem;
|
|
}
|
|
.layout-example-mixed-sizing .layout-example-block:nth-child(3n + 2) {
|
|
min-inline-size: 8rem;
|
|
}
|
|
|
|
/* Utilities */
|
|
.two-columns {
|
|
columns: 2;
|
|
gap: 1rem;
|
|
}
|
|
|
|
/* Component API tables */
|
|
wa-scroller:has(.component-table) {
|
|
margin-block-end: var(--wa-space-xl);
|
|
}
|
|
|
|
.component-table {
|
|
.table-name {
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.table-arguments,
|
|
.table-description {
|
|
min-width: 40ch;
|
|
}
|
|
|
|
.table-reflect {
|
|
text-align: center;
|
|
}
|
|
|
|
code {
|
|
white-space: inherit;
|
|
}
|
|
}
|
|
|
|
.component-help {
|
|
display: flex;
|
|
width: 100%;
|
|
gap: var(--wa-space-m);
|
|
flex-wrap: wrap;
|
|
align-items: center;
|
|
justify-content: start;
|
|
margin-block-start: var(--wa-space-xl);
|
|
|
|
strong {
|
|
font-size: var(--wa-font-size-s);
|
|
font-weight: var(--wa-font-weight-semibold);
|
|
}
|
|
}
|
|
|
|
/** desktop */
|
|
@media screen and not (max-width: 768px) {
|
|
/* Navigation sidebar */
|
|
wa-page::part(navigation) {
|
|
border-right: var(--wa-border-style) var(--wa-panel-border-width) var(--wa-color-surface-border);
|
|
}
|
|
|
|
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);
|
|
}
|
|
}
|
|
|
|
.page-wide {
|
|
wa-page > main {
|
|
max-width: 140ch;
|
|
|
|
.max-line-length {
|
|
max-width: 80ch;
|
|
}
|
|
}
|
|
}
|
|
|
|
.layout-theme {
|
|
iframe {
|
|
width: 100%;
|
|
min-height: 16lh;
|
|
height: 65vh;
|
|
max-height: 21lh;
|
|
}
|
|
}
|