Jump to content
Toggle menu
  • 36 articles
  • 9 files
  • 1 users
  • 417 edits
Paracosm
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Module:Mbox/styles.css: Difference between revisions

From Paracosm
m 1 revision imported from starcitizen:Module:Mbox/styles.css
m update from wiki-tools
 
Line 1: Line 1:
.mbox {
/* Markup comes from Module:Mbox; nothing outside it should target these classes. */
position: relative;
 
display: flex;
.t-mbox {
flex-direction: column;
/* flow-root keeps the box beside a floated infobox instead of running underneath it. */
display: flow-root;
margin-block: var(--space-md);
margin-block: var(--space-md);
color: var(--color-base);
background-color: var(--color-surface-1);
background-color: var(--color-surface-1);
border: var(--border-base);
border: var(--border-base);
Line 11: Line 13:
}
}


.mbox.mbox-high {
.t-mbox__header {
color: var(--color-destructive);
display: flex;
background-color: var(--background-color-destructive-subtle);
align-items: flex-start;
border-color: var(--border-color-destructive);
gap: var(--space-xs);
padding: var(--space-sm) var(--space-md);
border-radius: var(--border-radius-medium);
}
 
.t-mbox__title {
flex-grow: 1;
min-width: 0;
}
 
/* Both are 1em boxes; the margin centres them on the first line of a title that wraps. */
.t-mbox__icon,
.t-mbox__indicator {
flex-shrink: 0;
margin-block: calc( ( var(--line-height-xx-small) - 1 ) * 0.5em );
}
 
.t-mbox--notice > .t-mbox__header > .t-mbox__icon {
color: var(--color-subtle);
}
}


.mbox.mbox-med {
.t-mbox--warning {
color: var(--color-warning);
color: var(--color-warning);
background-color: var(--background-color-warning-subtle);
background-color: var(--background-color-warning-subtle);
Line 23: Line 43:
}
}


.mbox-title,
.t-mbox--error {
.mbox-text {
color: var(--color-destructive);
padding: var(--space-sm) var(--space-md);
background-color: var(--background-color-destructive-subtle);
border-color: var(--border-color-destructive);
}
}


.mbox-title {
.t-mbox--placeholder {
display: flex;
color: var(--color-subtle);
align-items: center;
border-style: dashed;
}
}


.mbox-icon img {
/* Disclosure: the body opens in place and pushes the page down. */
display: block;
summary.t-mbox__header {
width: var(--font-size-small);
cursor: pointer;
height: auto;
list-style: none;
margin-right: var(--space-xs);
user-select: none;
opacity: var(--opacity-icon-base);
-webkit-user-select: none;
filter: var(--filter-invert);
}
}


.mbox-text {
summary.t-mbox__header:hover {
position: absolute;
background-color: var(--background-color-button-quiet--hover);
top: 100%;
left: 0;
right: 0;
z-index: 10;
margin-inline: -1px;
box-sizing: border-box;
color: var(--color-base);
background-color: var(--color-surface-1);
border-inline: var(--border-base);
border-bottom: var(--border-base);
border-bottom-left-radius: var(--border-radius-medium);
border-bottom-right-radius: var(--border-radius-medium);
box-shadow: var(--box-shadow-drop-xx-large);
opacity: 0;
visibility: hidden;
}
}


.mbox-text::before {
summary.t-mbox__header:focus-visible {
content: '';
outline: 2px solid var(--outline-color-progressive--focus);
display: block;
outline-offset: -2px;
position: absolute;
top: 0;
left: var(--space-md);
right: var(--space-md);
height: var(--border-width-base);
background: var(--border-color-subtle);
}
}


.mbox:hover {
.t-mbox[open] > .t-mbox__header {
/* Merge with popup */
border-bottom-left-radius: 0;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
border-bottom-right-radius: 0;
box-shadow: var(--box-shadow-drop-xx-large);
}
}


.mbox:hover .mbox-text {
.t-mbox__indicator {
opacity: 1;
--size-icon: var(--font-size-small);
visibility: visible;
transition: var(--transition-hover);
transition-property: transform;
transform: rotate3d( 1, 0, 0, 180deg );
}
 
.t-mbox[open] > .t-mbox__header > .t-mbox__indicator {
transform: none;
}
 
.t-mbox__text {
padding: var(--space-sm) var(--space-md);
border-top: var(--border-subtle);
color: var(--color-base);
}
 
.t-mbox__text > :first-child {
margin-top: 0;
}
 
.t-mbox__text > :last-child {
margin-bottom: 0;
}
 
.t-mbox--warning > .t-mbox__text {
border-top-color: var(--border-color-warning);
}
 
.t-mbox--error > .t-mbox__text {
border-top-color: var(--border-color-destructive);
}
}

Latest revision as of 00:27, 12 November 2026

/* Markup comes from Module:Mbox; nothing outside it should target these classes. */

.t-mbox {
	/* flow-root keeps the box beside a floated infobox instead of running underneath it. */
	display: flow-root;
	margin-block: var(--space-md);
	color: var(--color-base);
	background-color: var(--color-surface-1);
	border: var(--border-base);
	border-radius: var(--border-radius-medium);
	font-size: var(--font-size-small);
	line-height: var(--line-height-xx-small);
}

.t-mbox__header {
	display: flex;
	align-items: flex-start;
	gap: var(--space-xs);
	padding: var(--space-sm) var(--space-md);
	border-radius: var(--border-radius-medium);
}

.t-mbox__title {
	flex-grow: 1;
	min-width: 0;
}

/* Both are 1em boxes; the margin centres them on the first line of a title that wraps. */
.t-mbox__icon,
.t-mbox__indicator {
	flex-shrink: 0;
	margin-block: calc( ( var(--line-height-xx-small) - 1 ) * 0.5em );
}

.t-mbox--notice > .t-mbox__header > .t-mbox__icon {
	color: var(--color-subtle);
}

.t-mbox--warning {
	color: var(--color-warning);
	background-color: var(--background-color-warning-subtle);
	border-color: var(--border-color-warning);
}

.t-mbox--error {
	color: var(--color-destructive);
	background-color: var(--background-color-destructive-subtle);
	border-color: var(--border-color-destructive);
}

.t-mbox--placeholder {
	color: var(--color-subtle);
	border-style: dashed;
}

/* Disclosure: the body opens in place and pushes the page down. */
summary.t-mbox__header {
	cursor: pointer;
	list-style: none;
	user-select: none;
	-webkit-user-select: none;
}

summary.t-mbox__header:hover {
	background-color: var(--background-color-button-quiet--hover);
}

summary.t-mbox__header:focus-visible {
	outline: 2px solid var(--outline-color-progressive--focus);
	outline-offset: -2px;
}

.t-mbox[open] > .t-mbox__header {
	border-bottom-left-radius: 0;
	border-bottom-right-radius: 0;
}

.t-mbox__indicator {
	--size-icon: var(--font-size-small);
	transition: var(--transition-hover);
	transition-property: transform;
	transform: rotate3d( 1, 0, 0, 180deg );
}

.t-mbox[open] > .t-mbox__header > .t-mbox__indicator {
	transform: none;
}

.t-mbox__text {
	padding: var(--space-sm) var(--space-md);
	border-top: var(--border-subtle);
	color: var(--color-base);
}

.t-mbox__text > :first-child {
	margin-top: 0;
}

.t-mbox__text > :last-child {
	margin-bottom: 0;
}

.t-mbox--warning > .t-mbox__text {
	border-top-color: var(--border-color-warning);
}

.t-mbox--error > .t-mbox__text {
	border-top-color: var(--border-color-destructive);
}
Last modified