Шаблон:Infobox/styles.css: различия между версиями

Шаблон используемый на Wikimeat
(Новая страница: «.infobox { margin-top: 0rem!important; border-spacing: 0; border-radius: 12px; z-index: 3!important; →‎base-90: background: #f8f9fa; f...»)
 
мНет описания правки
 
(не показано 29 промежуточных версий этого же участника)
Строка 1: Строка 1:
/* Table elements */
.infobox {
.infobox {
margin-top: 0rem!important;
overflow: visible;
    border-spacing: 0;
width: 100%;
    border-radius: 12px;
max-width: 340px;
    z-index: 3!important;
margin-top: 0;
    /* base-90 */
background: var( --color-surface-0 );
    background: #f8f9fa;
border-radius: var( --border-radius--medium );
    font-size: 0.875rem;
border-spacing: 0;
    text-align: left;
box-shadow: var( --box-shadow-card );
    /* boxshadow-2 */
font-size: 0.875rem;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.04), 0 3px 6px rgba(0, 0, 0, 0.0575);
text-align: left;
    /* In case if tooltips go out of boundary */
}
    overflow: visible;
 
.infobox tbody {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
}
 
.infobox tr {
display: flex;
box-sizing: border-box;
flex-direction: column;
margin-top: 10px;
padding: 0 10px;
}
 
.infobox th,
.infobox td {
padding: 0 10px;
}
}


.infobox-col1 {
/* Infobox column */
    width: 100%;
.infobox .infobox-nocol {
    flex-direction: row !important;
width: 100%;
flex-direction: row;
}
}


.infobox-col1 th {
.infobox .infobox-nocol th {
    width: 30%;
width: 30%;
}
}


.infobox-col1 td {
.infobox .infobox-nocol td {
    width: 70%;
width: 70%;
}
}


.infobox-col2 {
.infobox .infobox-col1 {
    width: 50%;
width: 100%;
}
}


.infobox-col3 {
.infobox .infobox-col2 {
    width: calc(100% / 3);
width: 50%;
}
}


.infobox-col4 {
.infobox .infobox-col3 {
    width: 25%;
width: calc(100% / 3);
}
 
.infobox .infobox-col4 {
width: 25%;
}
}


.infobox-data {
.infobox-data {
    min-width: 25%;
min-width: 25%;
}
 
/* Infobox image */
.infobox .infobox-image {
overflow: hidden;
padding: 0;
margin-top: 0;
border-radius: var( --border-radius--medium ) var( --border-radius--medium ) 0 0;
}
}


.infobox tbody {
.infobox-image td {
    display: flex;
padding: 0;
    flex-wrap: wrap;
}
}


.infobox tr:first-of-type .mw-collapsible-toggle {
.infobox-image--light .image {
    display: none;
background: #eaecf0;
    float: unset;
}
}


.infobox tr:first-of-type .mw-collapsible-toggle a.mw-collapsible-text {
.infobox-image--dark .image {
    position: absolute;
background: #2b2f36;
    right: 0;
    border-radius: 0 12px;
    padding: 5px 15px;
    background: #d33 !important;
    color: white;
    display: block;
}
}


.infobox tr:first-of-type .mw-collapsible-toggle a.mw-collapsible-text:hover {
.infobox-image .image:hover img {
    background: #b32424 !important;
transform: scale( 1.1 );
}
}


.infobox tr:first-of-type .mw-collapsible-toggle.mw-collapsible-toggle-collapsed a.mw-collapsible-text {
.infobox-image .image img {
    background: #36c !important;
display: block;
max-width: 100%;
background: var(--background-color-quiet--hover);
}
}


.infobox tr:first-of-type .mw-collapsible-toggle.mw-collapsible-toggle-collapsed a.mw-collapsible-text:hover {
/* Neutral background for all transprent SVG */
    background: #2a4b8d !important;
.infobox-image .image img[ src$='.svg' ] {
background: #eaecf0;
}
}


.infobox tr:first-of-type .mw-collapsible-toggle:before,
/* Infobox title */
.infobox tr:first-of-type .mw-collapsible-toggle:after {
.infobox .infobox-title {
    content: none;
width: 100%;
margin-top: 20px;
margin-bottom: 5px;
color: var(--color-base--emphasized);
font-size: 1.4rem;
line-height: 1.4;
}
}


.infobox tr:not(.infobox-image) {
/* Infobox indicator */
    margin-top: 10px;
.infobox .infobox-indicator {
    display: flex;
margin-top: 0;
    flex-direction: column;
padding: 0;
}
}


.infobox th,
.infobox .infobox-indicator th,
.infobox td {
.infobox .infobox-subtitle th {
    padding: 0 20px;
display: none;
}
}


.infobox-title,
/* Infobox subtitle */
.infobox-header,
.infobox .infobox-subtitle {
.infobox-button-bar {
/* Cancel infobox-title bottom margin */
    width: 100%;
margin-top: -5px;
margin-bottom: 5px;
}
}


.infobox-title th,
/* Infobox header */
.infobox-header th {
.infobox .infobox-header {
     text-align: left !important;
width: 100%;
padding-top: 15px;
     border-top: 1px solid;
border-color: var( --border-color-base );
margin-top: 15px;
color: var( --color-base--emphasized );
font-size: 1rem;
}
}


tr.infobox-title {
/* Infobox value */
    margin-top: 20px !important;
.infobox-data th {
    margin-bottom: 5px;
color: var( --color-base--subtle );
font-size: 0.8125rem;
font-weight: normal;
}
}


.infobox-title th {
.infobox-data td {
    font-size: 1.4rem;
font-weight: 600;
    line-height: 1.4;
}
}


tr.infobox-header {
.infobox-data ul,
    padding-top: 15px;
.infobox-data ol {
    /* base-80 */
list-style: none;
    border-top: 1px solid #eaecf0;
margin-top: 0;
margin-left: 0;
}
}


tr.infobox-header {
/* Infobox button */
    margin-top: 15px !important;
.infobox .infobox-button-bar {
width: 100%;
padding: 0;
margin-top: 25px;
text-align: center;
}
}


tr.infobox-button-bar {
.infobox-button-bar th {
    margin-top: 25px !important;
padding: 0;
}
}


.infobox-header th {
/* Collapsible toggle */
    font-size: 1rem;
.infobox tr:first-of-type .mw-collapsible-toggle {
position: relative;
display: none;
float: none;
}
}


.infobox-button-bar th,
.infobox tr:first-of-type .mw-collapsible-toggle .mw-collapsible-text {
.infobox-image td {
position: absolute;
    padding: 0;
right: 0;
display: block;
padding: 5px 15px;
background: var( --color-destructive );
border-radius: 0 var( --border-radius--medium );
color: #fff;
}
}


.infobox-image td {
.infobox tr:first-of-type .mw-collapsible-toggle .mw-collapsible-text:hover {
    background: #eaecf0;
background: var( --color-destructive--hover );
}
}


.infobox-image {
.infobox tr:first-of-type .mw-collapsible-toggle .mw-collapsible-text:active {
    border-radius: 12px 12px 0 0;
background: var( --color-destructive--active );
    overflow: hidden;
}
}


.infobox-data th {
.infobox tr:first-of-type .mw-collapsible-toggle-collapsed .mw-collapsible-text {
    /* base-30 */
background: var( --color-primary );
    color: #72777d;
    font-weight: normal;
    font-size: 0.8125rem;
    letter-spacing: .75px;
}
}


.infobox-data td {
.infobox tr:first-of-type .mw-collapsible-toggle-collapsed .mw-collapsible-text:hover {
    text-align: left!important;
background: var( --color-primary--hover );
    font-weight: bold;
}
}


.infobox-data ul,
.infobox tr:first-of-type .mw-collapsible-toggle-collapsed .mw-collapsible-text:active {
.infobox-data ol {
background: var( --color-primary--active );
margin-top: 0;
}
}


/* Screen0 */
.infobox tr:first-of-type .mw-collapsible-toggle:before,
@media only screen and (max-width: 720px) {
.infobox tr:first-of-type .mw-collapsible-toggle:after {
    .infobox {
content: none;
        margin-bottom: 1.6rem !important;
}
        padding: 0 !important;
    }


    .infobox tr:first-of-type .mw-collapsible-toggle {
@media only screen and ( max-width: 720px ) {
        display: block;
.infobox {
    }
margin-right: auto;
margin-left: auto;
}


    .infobox-image img {
.infobox tr:first-of-type .mw-collapsible-toggle {
        width: 100vw !important;
display: block;
        height: auto !important;
}
    }
}
}

Текущая версия от 05:09, 26 июля 2022

/* Table elements */

.infobox {
	overflow: visible;
	width: 100%;
	max-width: 340px;
	margin-top: 0;
	background: var( --color-surface-0 );
	border-radius: var( --border-radius--medium );
	border-spacing: 0;
	box-shadow: var( --box-shadow-card );
	font-size: 0.875rem;
	text-align: left;
}

.infobox tbody {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
}

.infobox tr {
	display: flex;
	box-sizing: border-box;
	flex-direction: column;
	margin-top: 10px;
	padding: 0 10px;
}

.infobox th,
.infobox td {
	padding: 0 10px;
}

/* Infobox column */
.infobox .infobox-nocol {
	width: 100%;
	flex-direction: row;
}

.infobox .infobox-nocol th {
	width: 30%;
}

.infobox .infobox-nocol td {
	width: 70%;
}

.infobox .infobox-col1 {
	width: 100%;
}

.infobox .infobox-col2 {
	width: 50%;
}

.infobox .infobox-col3 {
	width: calc(100% / 3);
}

.infobox .infobox-col4 {
	width: 25%;
}

.infobox-data {
	min-width: 25%;
}

/* Infobox image */
.infobox .infobox-image {
	overflow: hidden;
	padding: 0;
	margin-top: 0;
	border-radius: var( --border-radius--medium ) var( --border-radius--medium ) 0 0;
}

.infobox-image td {
	padding: 0;
}

.infobox-image--light .image {
	background: #eaecf0;
}

.infobox-image--dark .image {
	background: #2b2f36;
}

.infobox-image .image:hover img {
	transform: scale( 1.1 );
}

.infobox-image .image img {
	display: block;
	max-width: 100%;
	background: var(--background-color-quiet--hover);
}

/* Neutral background for all transprent SVG */
.infobox-image .image img[ src$='.svg' ] {
	background: #eaecf0;
}

/* Infobox title */
.infobox .infobox-title {
	width: 100%;
	margin-top: 20px;
	margin-bottom: 5px;
	color: var(--color-base--emphasized);
	font-size: 1.4rem;
	line-height: 1.4;
}

/* Infobox indicator */
.infobox .infobox-indicator {
	margin-top: 0;
	padding: 0;
}

.infobox .infobox-indicator th,
.infobox .infobox-subtitle th {
	display: none;
}

/* Infobox subtitle */
.infobox .infobox-subtitle {
	/* Cancel infobox-title bottom margin */
	margin-top: -5px;
	margin-bottom: 5px;
}

/* Infobox header */
.infobox .infobox-header {
	width: 100%;
	padding-top: 15px;
    border-top: 1px solid;
	border-color: var( --border-color-base );
	margin-top: 15px;
	color: var( --color-base--emphasized );
	font-size: 1rem;
}

/* Infobox value */
.infobox-data th {
	color: var( --color-base--subtle );
	font-size: 0.8125rem;
	font-weight: normal;
}

.infobox-data td {
	font-weight: 600;
}

.infobox-data ul,
.infobox-data ol {
	list-style: none;
	margin-top: 0;
	margin-left: 0;
}

/* Infobox button */
.infobox .infobox-button-bar {
	width: 100%;
	padding: 0;
	margin-top: 25px;
	text-align: center;
}

.infobox-button-bar th {
	padding: 0;
}

/* Collapsible toggle */
.infobox tr:first-of-type .mw-collapsible-toggle {
	position: relative;
	display: none;
	float: none;
}

.infobox tr:first-of-type .mw-collapsible-toggle .mw-collapsible-text {
	position: absolute;
	right: 0;
	display: block;
	padding: 5px 15px;
	background: var( --color-destructive );
	border-radius: 0 var( --border-radius--medium );
	color: #fff;
}

.infobox tr:first-of-type .mw-collapsible-toggle .mw-collapsible-text:hover {
	background: var( --color-destructive--hover );
}

.infobox tr:first-of-type .mw-collapsible-toggle .mw-collapsible-text:active {
	background: var( --color-destructive--active );
}

.infobox tr:first-of-type .mw-collapsible-toggle-collapsed .mw-collapsible-text {
	background: var( --color-primary );
}

.infobox tr:first-of-type .mw-collapsible-toggle-collapsed .mw-collapsible-text:hover {
	background: var( --color-primary--hover );
}

.infobox tr:first-of-type .mw-collapsible-toggle-collapsed .mw-collapsible-text:active {
	background: var( --color-primary--active );
}

.infobox tr:first-of-type .mw-collapsible-toggle:before,
.infobox tr:first-of-type .mw-collapsible-toggle:after {
	content: none;
}

@media only screen and ( max-width: 720px ) {
	.infobox {
		margin-right: auto;
		margin-left: auto;
	}

	.infobox tr:first-of-type .mw-collapsible-toggle {
		display: block;
	}
}
🍪 Наш веб-сайт использует файлы cookie для того, чтобы сделать ваш опыт использования сайта лучше и анализа использования сайта