Template:Mbox/styles.css: Difference between revisions

Template page
imported>Alistair3149
(Use skin CSS var)
 
sctools>Alistair3149
No edit summary
Line 3: Line 3:
display: flex;
display: flex;
flex-direction: column;
flex-direction: column;
margin-top: 0.4rem;
margin-top: var( --space-xs );
margin-bottom: 0.8rem;
margin-bottom: var( --space-md );
background-color: var( --color-surface-2 );
background-color: var( --color-surface-2 );
border-radius: var( --border-radius--medium );
border-radius: var( --border-radius--medium );
Line 22: Line 22:
display: flex;
display: flex;
align-items: center;
align-items: center;
padding: 10px 15px;
padding: var( --space-sm ) var( --space-md );
font-weight: 500;
font-weight: 500;
}
}
Line 29: Line 29:
width: 14px;
width: 14px;
height: auto;
height: auto;
margin-right: 10px;
margin-right: var( --space-xs );
opacity: 0.5;
opacity: 0.5;
}
}
Line 36: Line 36:
position: absolute;
position: absolute;
z-index: 10;
z-index: 10;
padding: 15px 20px;
padding: var( --space-md );
width: 100%;
    box-sizing: border-box;
background-color: var( --color-surface-2 );
background-color: var( --color-surface-2 );
border-radius: var( --border-radius--medium );
border-radius: var( --border-radius--medium );
box-shadow: var( --box-shadow-dialog );
box-shadow: var( --box-shadow-dialog );
opacity: 0;
opacity: 0;
transition: opacity 0.2s ease, box-shadow 0.2s ease;
visibility: hidden;
visibility: hidden;
}
}

Revision as of 02:26, 17 January 2023

.mbox {
	position: relative;
	display: flex;
	flex-direction: column;
	margin-top: var( --space-xs );
	margin-bottom: var( --space-md );
	background-color: var( --color-surface-2 );
	border-radius: var( --border-radius--medium );
	color: var( --color-base--subtle );
	font-size: 0.875rem;
}

.mbox.mbox-high {
	background-color: var( --background-color-destructive );
}

.mbox.mbox-med {
	background-color: var( --background-color-warning );
}

.mbox-title {
	display: flex;
	align-items: center;
	padding: var( --space-sm ) var( --space-md );
	font-weight: 500;
}

.mbox-icon img {
	width: 14px;
	height: auto;
	margin-right: var( --space-xs );
	opacity: 0.5;
}

.mbox-text {
	position: absolute;
	z-index: 10;
	padding: var( --space-md );
	width: 100%;
    box-sizing: border-box;
	background-color: var( --color-surface-2 );
	border-radius: var( --border-radius--medium );
	box-shadow: var( --box-shadow-dialog );
	opacity: 0;
	visibility: hidden;
}

.mbox:hover .mbox-text {
	opacity: 1;
	visibility: visible;
}

.mbox-high .mbox-text {
	background-color: var( --background-color-destructive );
}

.mbox-med .mbox-text {
	background-color: var( --background-color-warning );
}

/* Dark mode */
html.skin-citizen-dark .mbox-icon img {
	filter: invert( 1 );
}

/* Readability fixes */
html.skin-citizen-dark .mbox {
	color: var( --color-base--emphasized );
}