/* CSS component styles here */
/* alpha */
:root {
--yattho-actionListContent-paddingBlock: var(--yattho-control-medium-paddingBlock, 6px);
}
/* ActionList */
/*
*/
.ActionListWrap {
list-style: none;
}
.ActionListWrap--inset {
padding: var(--base-size-8, 8px);
}
/* list dividers */
.ActionListWrap--divided .ActionListItem-label::before {
position: absolute;
top: calc(-1 * var(--yattho-actionListContent-paddingBlock));
display: block;
width: 100%;
height: 1px;
content: '';
background: var(--color-action-list-item-inline-divider);
}
/* if descriptionWrap--inline exists, move pseudo divider to wrapper */
.ActionListWrap--divided .ActionListItem-descriptionWrap--inline::before {
position: absolute;
top: calc(-1 * var(--yattho-actionListContent-paddingBlock));
display: block;
width: 100%;
height: var(--yattho-borderWidth-thin, 1px);
content: '';
background: var(--color-action-list-item-inline-divider);
}
/* unset the default label pseudo */
.ActionListWrap--divided .ActionListItem-descriptionWrap--inline .ActionListItem-label::before {
content: unset;
}
/* hide divider if item is active */
.ActionListWrap--divided .ActionListItem--navActive .ActionListItem-label::before,
.ActionListWrap--divided .ActionListItem--navActive + .ActionListItem .ActionListItem-label::before {
visibility: hidden;
}
/* hide if item is first of type with label::before, or is the first item after a sectionDivider */
.ActionListItem:first-of-type .ActionListItem-label::before,
.ActionList-sectionDivider + .ActionListItem .ActionListItem-label::before {
visibility: hidden;
}
/* hide if item is first of type with label::before, or is the first item after a sectionDivider */
.ActionListItem:first-of-type .ActionListItem-descriptionWrap--inline::before,
.ActionList-sectionDivider + .ActionListItem .ActionListItem-descriptionWrap--inline::before {
visibility: hidden;
}
/* ActionList::Item */
.ActionListItem {
position: relative;
list-style: none;
background-color: transparent;
border-radius: var(--yattho-borderRadius-medium, 6px);
/* state */
}
.ActionListItem:hover,
.ActionListItem:active {
cursor: pointer;
}
/* hide dividers */
@media (hover: hover) {
.ActionListItem:hover .ActionListItem-label::before,
.ActionListItem:hover + .ActionListItem .ActionListItem-label::before {
visibility: hidden;
}
.ActionListItem:hover .ActionListItem-descriptionWrap--inline::before,
.ActionListItem:hover + .ActionListItem .ActionListItem-descriptionWrap--inline::before {
visibility: hidden;
}
}
/* Make sure that the first visible item isn't a divider */
.ActionListItem[hidden] + .ActionList-sectionDivider {
display: none;
}
/* collapse styles here */
/* first child */
.ActionListItem.ActionListItem--hasSubItem > .ActionListContent {
z-index: 1;
}
@media (hover: hover) {
.ActionListItem.ActionListItem--hasSubItem > .ActionListContent:hover {
background-color: var(--color-action-list-item-default-hover-bg);
}
}
.ActionListItem.ActionListItem--hasSubItem > .ActionListContent:active {
background-color: var(--color-action-list-item-default-active-bg);
}
/* only hover li without list as children */
@media (hover: hover) {
.ActionListItem:not(.ActionListItem--hasSubItem):hover, .ActionListItem.ActionListItem--hasSubItem > .ActionListContent:hover {
cursor: pointer;
background-color: var(--color-action-list-item-default-hover-bg);
}
.ActionListItem:not(.ActionListItem--hasSubItem):hover:not(.ActionListItem--navActive, :focus-visible), .ActionListItem.ActionListItem--hasSubItem > .ActionListContent:hover:not(.ActionListItem--navActive, :focus-visible) {
/* Support for "Windows high contrast mode" */
outline: solid var(--yattho-borderWidth-thin, 1px) transparent;
outline-offset: calc(-1 * var(--yattho-borderWidth-thin, 1px));
box-shadow: var(--yattho-borderInset-thin, 1px) var(--color-action-list-item-default-active-border);
}
}
.ActionListItem:not(.ActionListItem--hasSubItem):active, .ActionListItem.ActionListItem--hasSubItem > .ActionListContent:active {
background: var(--color-action-list-item-default-active-bg);
}
.ActionListItem:not(.ActionListItem--hasSubItem):active:not(.ActionListItem--navActive), .ActionListItem.ActionListItem--hasSubItem > .ActionListContent:active:not(.ActionListItem--navActive) {
/* Support for "Windows high contrast mode" https:sarahmhigley.com/writing/whcm-quick-tips/ */
outline: solid var(--yattho-borderWidth-thin, 1px) transparent;
outline-offset: calc(-1 * var(--yattho-borderWidth-thin, 1px));
box-shadow: var(--yattho-borderInset-thin, 1px) var(--color-action-list-item-default-active-border);
}
.ActionListItem:not(.ActionListItem--hasSubItem):active .ActionListItem-label::before,
.ActionListItem.ActionListItem--hasSubItem > .ActionListContent:active .ActionListItem-label::before,
.ActionListItem:not(.ActionListItem--hasSubItem):active + .ActionListItem .ActionListItem-label::before,
.ActionListItem.ActionListItem--hasSubItem > .ActionListContent:active + .ActionListItem .ActionListItem-label::before {
visibility: hidden;
}
/*
* checkbox item [aria-checked]
* listbox [aria-selected]
*/
/* multiselect checkmark */
.ActionListItem[aria-checked='true'] .ActionListItem-multiSelectCheckmark, .ActionListItem[aria-selected='true'] .ActionListItem-multiSelectCheckmark {
visibility: visible;
opacity: 1;
transition: visibility 0 linear 0, opacity 50ms;
}
/* singleselect checkmark */
.ActionListItem[aria-checked='true'] .ActionListItem-singleSelectCheckmark, .ActionListItem[aria-selected='true'] .ActionListItem-singleSelectCheckmark {
visibility: visible;
}
@media screen and (prefers-reduced-motion: no-preference) {
.ActionListItem[aria-checked='true'] .ActionListItem-singleSelectCheckmark, .ActionListItem[aria-selected='true'] .ActionListItem-singleSelectCheckmark {
animation: checkmarkIn 200ms cubic-bezier(0.11, 0, 0.5, 0) forwards;
}
}
/* checkbox */
.ActionListItem[aria-checked='true'] .ActionListItem-multiSelectIcon .ActionListItem-multiSelectIconRect, .ActionListItem[aria-selected='true'] .ActionListItem-multiSelectIcon .ActionListItem-multiSelectIconRect {
fill: var(--color-accent-fg);
stroke: var(--color-accent-fg);
stroke-width: var(--yattho-borderWidth-thin, 1px);
}
.ActionListItem[aria-checked='true'] .ActionListItem-multiSelectIcon .ActionListItem-multiSelectCheckmark, .ActionListItem[aria-selected='true'] .ActionListItem-multiSelectIcon .ActionListItem-multiSelectCheckmark {
fill: var(--color-fg-on-emphasis);
}
/* multiselect checkmark */
.ActionListItem[aria-checked='false'] .ActionListItem-multiSelectCheckmark, .ActionListItem[aria-selected='false'] .ActionListItem-multiSelectCheckmark {
visibility: hidden;
opacity: 0;
transition: visibility 0 linear 50ms, opacity 50ms;
}
/* singleselect checkmark */
.ActionListItem[aria-checked='false'] .ActionListItem-singleSelectCheckmark, .ActionListItem[aria-selected='false'] .ActionListItem-singleSelectCheckmark {
visibility: hidden;
transition: visibility 0s linear 200ms;
clip-path: inset(16px 0 0 0);
}
@media screen and (prefers-reduced-motion: no-preference) {
.ActionListItem[aria-checked='false'] .ActionListItem-singleSelectCheckmark, .ActionListItem[aria-selected='false'] .ActionListItem-singleSelectCheckmark {
animation: checkmarkOut 200ms cubic-bezier(0.11, 0, 0.5, 0) forwards;
}
}
/* checkbox */
.ActionListItem[aria-checked='false'] .ActionListItem-multiSelectIcon .ActionListItem-multiSelectIconRect, .ActionListItem[aria-selected='false'] .ActionListItem-multiSelectIcon .ActionListItem-multiSelectIconRect {
fill: var(--color-canvas-default);
stroke: var(--color-border-default);
stroke-width: var(--yattho-borderWidth-thin, 1px);
}
.ActionListItem[aria-checked='false'] .ActionListItem-multiSelectIconRect, .ActionListItem[aria-selected='false'] .ActionListItem-multiSelectIconRect {
fill: var(--color-canvas-default);
border: var(--yattho-borderWidth-thin, 1px) solid var(--color-border-default);
}
.ActionListItem {
@keyframes checkmarkIn {
from {
clip-path: inset(16px 0 0 0);
}
to {
clip-path: inset(0 0 0 0);
}
}
@keyframes checkmarkOut {
from {
clip-path: inset(0 0 0 0);
}
to {
clip-path: inset(16px 0 0 0);
}
}
/* Autocomplete [aria-selected] items */
}
.ActionListItem[aria-selected='true'] {
font-weight: var(--base-text-weight-normal, 400);
background: var(--color-action-list-item-default-selected-bg);
}
@media (hover: hover) {
.ActionListItem[aria-selected='true']:hover {
background-color: var(--color-action-list-item-default-hover-bg);
}
}
.ActionListItem[aria-selected='true']::before,
.ActionListItem[aria-selected='true'] + .ActionListItem::before {
visibility: hidden;
}
/* blue accent line */
.ActionListItem[aria-selected='true']::after {
position: absolute;
top: calc(50% - 12px);
left: calc(-1 * var(--base-size-4, 4px));
width: var(--base-size-4, 4px);
height: var(--base-size-24, 24px);
content: '';
background: var(--color-accent-fg);
border-radius: var(--yattho-borderRadius-medium, 6px);
}
/* active state [aria-current] */
.ActionListItem.ActionListItem--navActive:not(.ActionListItem--subItem) .ActionListItem-label {
font-weight: var(--base-text-weight-semibold, 600);
}
.ActionListItem.ActionListItem--navActive:not(.ActionListItem--danger) {
background: var(--color-action-list-item-default-selected-bg);
}
@media (hover: hover) {
.ActionListItem.ActionListItem--navActive:not(.ActionListItem--danger):hover {
background-color: var(--color-action-list-item-default-hover-bg);
}
}
.ActionListItem.ActionListItem--navActive:not(.ActionListItem--danger)::before,
.ActionListItem.ActionListItem--navActive:not(.ActionListItem--danger) + .ActionListItem::before {
visibility: hidden;
}
/* blue accent line */
.ActionListItem.ActionListItem--navActive:not(.ActionListItem--danger)::after {
position: absolute;
top: calc(50% - 12px);
left: calc(-1 * var(--base-size-8, 8px));
width: var(--base-size-4, 4px);
height: var(--base-size-24, 24px);
content: '';
background: var(--color-accent-fg);
border-radius: var(--yattho-borderRadius-medium, 6px);
}
/* disabled */
.ActionListItem[aria-disabled='true'] .ActionListContent .ActionListItem-label,
.ActionListItem[aria-disabled='true'] .ActionListContent .ActionListItem-description {
color: var(--color-yattho-fg-disabled);
}
.ActionListItem[aria-disabled='true'] .ActionListContent .ActionListItem-visual {
fill: var(--color-yattho-fg-disabled);
}
@media (hover: hover) {
.ActionListItem[aria-disabled='true']:hover {
cursor: not-allowed;
background-color: transparent;
}
}
/* variants */
/* danger */
.ActionListItem.ActionListItem--danger .ActionListItem-label {
color: var(--color-danger-fg);
}
.ActionListItem.ActionListItem--danger .ActionListItem-visual {
color: var(--color-danger-fg);
}
@media (hover: hover) {
.ActionListItem.ActionListItem--danger:hover {
background: var(--color-action-list-item-danger-hover-bg);
}
.ActionListItem.ActionListItem--danger:hover .ActionListItem-label {
color: var(--color-action-list-item-danger-hover-text);
}
}
.ActionListItem.ActionListItem--danger .ActionListContent:active {
background: var(--color-action-list-item-danger-active-bg);
}
/* button or a href */
.ActionListContent {
position: relative;
display: grid;
width: 100%;
padding-block: var(--yattho-actionListContent-paddingBlock);
padding-inline: var(--yattho-control-medium-paddingInline-condensed, 8px);
color: var(--color-fg-default);
text-align: left;
-webkit-user-select: none;
user-select: none;
background-color: transparent;
border: none;
border-radius: var(--yattho-borderRadius-medium, 6px);
transition: background 33.333ms linear;
touch-action: manipulation;
-webkit-tap-highlight-color: transparent;
grid-template-rows: min-content;
grid-template-areas: 'leadingAction leadingVisual label trailingVisual trailingAction';
grid-template-columns: min-content min-content minmax(0, auto) min-content min-content;
align-items: start;
/* column-gap persists with empty grid-areas, margin applies only when children exist */
}
.ActionListContent > :not(:last-child) {
margin-right: var(--yattho-control-medium-gap, 8px);
}
/* state */
.ActionListContent:hover {
text-decoration: none;
}
/* disabled */
.ActionListContent[aria-disabled='true'] .ActionListItem-label,
.ActionListContent[aria-disabled='true'] .ActionListItem-description {
color: var(--color-yattho-fg-disabled);
}
.ActionListContent[aria-disabled='true'] .ActionListItem-visual {
fill: var(--color-yattho-fg-disabled);
}
@media (hover: hover) {
.ActionListContent[aria-disabled='true']:hover {
cursor: not-allowed;
background-color: transparent;
}
}
/* collapsible item [aria-expanded] */
/* nesting (single level)
target items inside expanded subgroups */
@media screen and (prefers-reduced-motion: no-preference) {
.ActionListContent[aria-expanded] + .ActionList--subGroup {
transition: opacity 160ms cubic-bezier(0.25, 1, 0.5, 1), transform 160ms cubic-bezier(0.25, 1, 0.5, 1);
}
}
.ActionListContent[aria-expanded] + .ActionList--subGroup .ActionListContent {
padding-left: var(--base-size-24, 24px);
}
/* has 16px leading visual */
.ActionListContent.ActionListContent--visual16[aria-expanded] + .ActionList--subGroup .ActionListContent {
padding-left: var(--base-size-32, 32px);
}
/* has 20px leading visual */
.ActionListContent.ActionListContent--visual20[aria-expanded] + .ActionList--subGroup .ActionListContent {
padding-left: var(--base-size-36, 36px);
}
/* has 24px leading visual */
.ActionListContent.ActionListContent--visual24[aria-expanded] + .ActionList--subGroup .ActionListContent {
padding-left: var(--base-size-40, 40px);
}
.ActionListContent[aria-expanded='true'] .ActionListItem-collapseIcon {
transition: transform 120ms linear;
transform: scaleY(-1);
}
.ActionListContent[aria-expanded='true'] + .ActionList--subGroup {
height: auto;
overflow: visible;
visibility: visible;
opacity: 1;
transform: translateY(0);
}
.ActionListContent.ActionListContent--hasActiveSubItem[aria-expanded='true'] > .ActionListItem-label {
font-weight: var(--base-text-weight-semibold, 600);
}
.ActionListContent[aria-expanded='false'] .ActionListItem-collapseIcon {
transition: transform 120ms linear;
transform: scaleY(1);
}
.ActionListContent[aria-expanded='false'] + .ActionList--subGroup {
height: 0;
overflow: hidden;
visibility: hidden;
opacity: 0;
transform: translateY(calc(-1 * var(--base-size-16, 16px)));
}
/* show active indicator on parent collapse if child is active */
.ActionListContent.ActionListContent--hasActiveSubItem[aria-expanded='false'] {
background: var(--color-action-list-item-default-selected-bg);
}
.ActionListContent.ActionListContent--hasActiveSubItem[aria-expanded='false'] .ActionListItem-label {
font-weight: var(--base-text-weight-semibold, 600);
}
.ActionListContent.ActionListContent--hasActiveSubItem[aria-expanded='false']::before,
.ActionListContent.ActionListContent--hasActiveSubItem[aria-expanded='false'] + .ActionListItem::before {
visibility: hidden;
}
/* blue accent line */
.ActionListContent.ActionListContent--hasActiveSubItem[aria-expanded='false']::after {
position: absolute;
top: calc(50% - 12px);
left: calc(-1 * var(--base-size-8, 8px));
width: var(--base-size-4, 4px);
height: var(--base-size-24, 24px);
content: '';
background: var(--color-accent-fg);
border-radius: var(--yattho-borderRadius-medium, 6px);
}
/* sizes */
.ActionListContent.ActionListContent--sizeLarge {
--yattho-actionListContent-paddingBlock: var(--yattho-control-large-paddingBlock, calc((2.5rem - 1.25rem) / 2));
}
.ActionListContent.ActionListContent--sizeXLarge {
--yattho-actionListContent-paddingBlock: var(--yattho-control-xlarge-paddingBlock, calc((3rem - 1.25rem) / 2));
}
/* On pointer:coarse (mobile), all list items are large */
@media (pointer: coarse) {
.ActionListContent {
--yattho-actionListContent-paddingBlock: var(--yattho-control-large-paddingBlock, calc((2.5rem - 1.25rem) / 2));
}
}
/* if leading/trailing visual, align with first line of content */
.ActionListContent.ActionListContent--blockDescription .ActionListItem-visual {
place-self: start;
}
/* place children on grid */
.ActionListItem-action--leading {
grid-area: leadingAction;
}
.ActionListItem-visual--leading {
grid-area: leadingVisual;
}
.ActionListItem-visual--trailing {
grid-area: trailingVisual;
}
.ActionListItem-action--trailing {
grid-area: trailingAction;
}
/* wrapper span
default block */
.ActionListItem-descriptionWrap {
grid-area: label;
display: flex;
flex-direction: column;
gap: var(--base-size-4, 4px);
}
.ActionListItem-descriptionWrap .ActionListItem-label {
font-weight: var(--base-text-weight-semibold, 600);
}
/* inline */
.ActionListItem-descriptionWrap--inline {
position: relative;
flex-direction: row;
align-items: baseline;
gap: var(--base-size-8, 8px);
}
/* description */
.ActionListItem-description {
font-size: var(--yattho-text-body-size-small, 12px);
font-weight: var(--base-text-weight-normal, 400);
line-height: var(--yattho-text-body-lineHeight-small, calc(20 / 12));
color: var(--color-fg-muted);
}
/* helper for grid alignment with multi-line content
span wrapping svg or text */
.ActionListItem-visual,
.ActionListItem-action {
display: flex;
min-height: var(--yattho-control-medium-lineBoxHeight, 20px);
color: var(--color-fg-muted);
pointer-events: none;
fill: var(--color-fg-muted);
align-items: center;
}
/* text */
.ActionListItem-label {
position: relative;
font-size: var(--yattho-text-body-size-medium, 14px);
font-weight: var(--base-text-weight-normal, 400);
line-height: var(--yattho-text-body-lineHeight-medium, calc(20 / 14));
color: var(--color-fg-default);
grid-area: label;
}
.ActionListItem-label--truncate {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
/* nested lists (only supports 1 level currently)
target ActionListItem--subItem for padding-left to maintain :active :after state */
.ActionListItem--subItem > .ActionListContent > .ActionListItem-label {
font-size: var(--yattho-text-body-size-small, 12px);
line-height: var(--yattho-text-body-lineHeight-small, calc(20 / 12));
}
/* trailing action icon button */
.ActionListItem--withActions {
display: flex;
flex-wrap: nowrap;
align-items: center;
}
.ActionListItem-trailingAction {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
/* show trailing action button on hover */
.ActionListItem--trailingActionHover .ActionListItem-trailingAction {
visibility: hidden;
}
.ActionListItem--trailingActionHover:hover .ActionListItem-trailingAction, .ActionListItem--trailingActionHover:focus-within .ActionListItem-trailingAction {
visibility: visible;
}
/* ActionList::Divider */
/* with children */
.ActionList-sectionDivider:not(:empty) {
display: flex;
padding-inline: var(--yattho-actionListContent-paddingBlock);
padding-block: var(--base-size-8, 8px);
font-size: var(--yattho-text-body-size-small, 12px);
line-height: var(--yattho-text-body-lineHeight-small, calc(20 / 12));
font-weight: var(--base-text-weight-semibold, 600);
color: var(--color-fg-muted);
flex-direction: column;
}
/* no children */
.ActionList-sectionDivider:empty {
display: block;
height: var(--yattho-borderWidth-thin, 1px);
padding: 0;
margin-block-start: calc(var(--base-size-8, 8px) - var(--yattho-borderWidth-thin, 1px));
margin-block-end: var(--base-size-8, 8px);
margin-inline: calc(-1 * var(--base-size-8, 8px));
list-style: none;
background: var(--color-action-list-item-inline-divider);
border: 0;
}
.ActionList-sectionDivider .ActionList-sectionDivider-title {
font-size: var(--yattho-text-body-size-small, 12px);
font-weight: var(--base-text-weight-semibold, 600);
color: var(--color-fg-muted);
}
.ActionList-sectionDivider--filled {
margin-block-start: calc(var(--base-size-8, 8px) - var(--yattho-borderWidth-thin, 1px));
margin-block-end: var(--base-size-8, 8px);
margin-inline: calc(-1 * var(--base-size-8, 8px));
background: var(--color-canvas-subtle);
border-top: solid var(--yattho-borderWidth-thin, 1px) var(--color-action-list-item-inline-divider);
border-bottom: solid var(--yattho-borderWidth-thin, 1px) var(--color-action-list-item-inline-divider);
/* if no children, treat as divider */
}
.ActionList-sectionDivider--filled:empty {
height: var(--base-size-8, 8px);
box-sizing: border-box;
}
.ActionList-sectionDivider--filled:first-child {
margin-block-start: 0;
}
/* autocomplete */
/* This file can be deprecated when AutoComplete is upstreamed to YVC + rolled out to dotcom https://github.com/github/yattho/issues/796
** AutoComplete relies on FormControl, Overlay and ActionList CSS */
/* Stacked label (default) */
.autocomplete-label-stacked {
display: block;
margin-bottom: 6px;
}
/* Inline label (non-default) */
.autocomplete-label-inline {
display: inline;
margin-right: 6px;
}
/* Switch to stacked at smaller viewport */
@media (max-width: 543.98px) {
.autocomplete-label-inline {
display: block;
margin-bottom: 6px;
}
}
/* Wrapper for the input and result elements to ensure alignment */
.autocomplete-body {
position: relative;
display: inline;
}
/* Wrapper and conditional styles for when an icon is added */
.autocomplete-embedded-icon-wrap {
display: inline-flex;
padding: 4px 8px;
align-items: center;
}
.autocomplete-embedded-icon-wrap:focus-within {
border-color: var(--color-accent-fg);
border-color: var(--color-accent-fg);
outline: none;
box-shadow: inset 0 0 0 1px var(--color-accent-fg);
}
.autocomplete-embedded-icon-wrap .form-control {
padding: 0;
margin-left: 8px;
border: none;
box-shadow: none;
}
.autocomplete-embedded-icon-wrap .form-control:focus {
box-shadow: none;
}
.autocomplete-embedded-icon-wrap .form-control:focus-visible {
box-shadow: none;
}
/* A pop up list of items used to show autocompleted results */
.autocomplete-results {
position: absolute;
left: 0;
z-index: 99;
width: max-content;
min-width: 100%;
max-height: 20em;
overflow-y: auto;
font-size: 13px;
list-style: none;
background: var(--color-canvas-overlay);
border: var(--yattho-borderWidth-thin, 1px) solid var(--color-border-default);
border-radius: var(--yattho-borderRadius-medium, 6px);
box-shadow: var(--color-shadow-medium);
}
/* One of the items that appears within an autocomplete group
** Bold black text on white background */
.autocomplete-item {
display: block;
width: 100%;
padding: 4px 8px;
overflow: hidden;
font-weight: var(--base-text-weight-semibold, 600);
color: var(--color-fg-default);
text-align: left;
text-decoration: none;
text-overflow: ellipsis;
white-space: nowrap;
cursor: pointer;
background-color: var(--color-canvas-overlay);
border: 0;
}
.autocomplete-item:hover {
color: var(--color-fg-on-emphasis);
text-decoration: none;
background-color: var(--color-accent-emphasis);
/* Inherit color on all child elements to ensure enough contrast */
}
.autocomplete-item:hover * {
color: inherit !important;
}
.autocomplete-item.selected,
.autocomplete-item[aria-selected='true'],
.autocomplete-item.navigation-focus {
color: var(--color-fg-on-emphasis);
text-decoration: none;
background-color: var(--color-accent-emphasis);
/* Inherit color on all child elements to ensure enough contrast */
}
.autocomplete-item.selected *, .autocomplete-item[aria-selected='true'] *, .autocomplete-item.navigation-focus * {
color: inherit !important;
}
/* Banner alert */
.Banner {
position: relative;
display: grid;
padding: var(--base-size-8, 8px);
color: var(--color-fg-default);
background-image: linear-gradient(var(--color-accent-subtle), var(--color-accent-subtle));
border: var(--yattho-borderWidth-thin, max(1px, 0.0625rem)) solid var(--color-accent-muted);
border-radius: var(--yattho-borderRadius-medium, 6px);
grid-auto-flow: column;
grid-template-areas: 'visual message actions close';
grid-template-columns: min-content 1fr minmax(0,auto) min-content;
grid-template-rows: min-content;
/* `sm` breakpoint variantion */
}
@media (max-width: 543.98px) {
.Banner {
grid-template-areas:
'visual message close'
'. actions actions';
grid-template-columns: min-content 1fr min-content;
grid-template-rows: min-content min-content;
}
.Banner .Banner-actions {
margin: var(--base-size-8, 8px) 0 0 var(--base-size-8, 8px);
}
}
/* Elements */
.Banner .Banner-visual {
display: grid;
padding: var(--base-size-6, 6px) var(--base-size-8, 8px);
grid-area: visual;
align-self: start;
}
.Banner .Banner-visual > .octicon {
margin-block: calc(var(--base-size-4, 4px) / 2);
}
.Banner .Banner-visual > * {
align-self: center;
}
.Banner .Banner-message {
padding: var(--base-size-6, 6px) var(--base-size-8, 8px);
grid-area: message;
align-self: center;
}
.Banner .Banner-message p:last-child {
margin-bottom: 0;
}
.Banner .Banner-message .Banner-title:not(:only-child) {
margin-bottom: 0;
font-weight: var(--base-text-weight-semibold, 600);
}
.Banner .Banner-actions {
grid-area: actions;
}
.Banner .Banner-actions:last-child {
align-self: center;
}
/* is this used anywhere? could not find any use, but unsure */
.Banner .Banner-close {
grid-area: close;
margin-left: var(--yattho-controlStack-medium-gap-condensed, 8px);
}
.Banner .Banner-visual .octicon {
color: var(--color-accent-fg);
}
.Banner.Banner--warning {
color: var(--color-fg-default);
background-image: linear-gradient(var(--color-attention-subtle), var(--color-attention-subtle));
border-color: var(--color-attention-muted);
}
.Banner.Banner--warning .Banner-visual .octicon {
color: var(--color-attention-fg);
}
.Banner.Banner--error {
color: var(--color-fg-default);
background-image: linear-gradient(var(--color-danger-subtle), var(--color-danger-subtle));
border-color: var(--color-danger-muted);
}
.Banner.Banner--error .Banner-visual .octicon {
color: var(--color-danger-fg);
}
.Banner.Banner--success {
color: var(--color-fg-default);
background-image: linear-gradient(var(--color-success-subtle), var(--color-success-subtle));
border-color: var(--color-success-muted);
}
.Banner.Banner--success .Banner-visual .octicon {
color: var(--color-success-fg);
}
/* Full-width */
.Banner.Banner--full {
margin-top: calc(var(--yattho-borderWidth-thin, max(1px, 0.0625rem)) * -1);
border-right: 0;
border-left: 0;
border-radius: 0;
}
@media (max-width: 767.98px) {
.Banner.Banner--full-whenNarrow {
margin-top: calc(var(--yattho-borderWidth-thin, max(1px, 0.0625rem)) * -1);
border-right: 0;
border-left: 0;
border-radius: 0;
}
}
/* Overlay */
.Overlay--hidden {
display: none !important;
}
.Overlay--visibilityHidden {
height: 0;
overflow: hidden;
visibility: hidden;
opacity: 0;
}
.Overlay {
display: flex;
width: min(var(--overlay-width), 100vw - 2rem);
min-width: 192px;
max-height: min(calc(100vh - 2rem), var(--overlay-height));
white-space: normal;
flex-direction: column;
background-color: var(--color-canvas-overlay);
border-radius: var(--yattho-borderRadius-large, 12px);
box-shadow: var(--color-overlay-shadow);
opacity: 1;
}
.Overlay.Overlay--size-auto {
min-width: 192px;
max-width: calc(100vw - 2rem);
max-height: calc(100vh - 2rem);
}
.Overlay.Overlay--size-full {
width: 100vw;
height: 100vh;
}
.Overlay.Overlay--size-xsmall {
--overlay-width: 192px;
max-height: calc(100vh - 2rem);
}
.Overlay.Overlay--size-small {
--overlay-height: 256px;
--overlay-width: 320px;
}
.Overlay.Overlay--size-small-portrait {
--overlay-height: 432px;
--overlay-width: 320px;
}
.Overlay.Overlay--size-medium {
--overlay-height: 320px;
--overlay-width: 480px;
}
.Overlay.Overlay--size-medium-portrait {
--overlay-height: 600px;
--overlay-width: 480px;
}
.Overlay.Overlay--size-large {
--overlay-height: 432px;
--overlay-width: 640px;
}
.Overlay.Overlay--size-xlarge {
--overlay-height: 600px;
--overlay-width: 960px;
}
.Overlay.Overlay--height-auto {
height: auto;
}
/* start deprecate in favor of Alpha::Dialog */
.Overlay.Overlay--height-xsmall {
height: min(192px, 100vh - 2rem);
}
.Overlay.Overlay--height-small {
height: min(256px, 100vh - 2rem);
}
.Overlay.Overlay--height-medium {
height: min(320px, 100vh - 2rem);
}
.Overlay.Overlay--height-large {
height: min(432px, 100vh - 2rem);
}
.Overlay.Overlay--height-xlarge {
height: min(600px, 100vh - 2rem);
}
.Overlay.Overlay--width-auto {
width: auto;
}
.Overlay.Overlay--width-small {
width: min(256px, 100vw - 2rem);
}
.Overlay.Overlay--width-medium {
width: min(320px, 100vw - 2rem);
}
.Overlay.Overlay--width-large {
width: min(480px, 100vw - 2rem);
}
.Overlay.Overlay--width-xlarge {
width: min(640px, 100vw - 2rem);
}
.Overlay.Overlay--width-xxlarge {
width: min(960px, 100vw - 2rem);
}
/* end deprecate */
@media screen and (prefers-reduced-motion: no-preference) {
.Overlay.Overlay--motion-scaleFade {
animation: 200ms cubic-bezier(0.33, 1, 0.68, 1) 0s 1 normal none running Overlay--motion-scaleFade;
}
}
@keyframes Overlay--motion-scaleFade {
0% {
opacity: 0;
transform: scale(0.5);
}
100% {
opacity: 1;
transform: scale(1);
}
}
/* for