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

Шаблон используемый на Wikimeat
мНет описания правки
мНет описания правки
 
(не показано 12 промежуточных версий этого же участника)
Строка 1: Строка 1:
/* Table elements */
.infobox {
.infobox {
    width: 100%;
overflow: visible;
    max-width: 400px;
width: 100%;
    margin-top: 0;
max-width: 340px;
    border-spacing: 0;
margin-top: 0;
    border-radius: 12px;
background: var( --color-surface-0 );
    font-size: 0.875rem;
border-radius: var( --border-radius--medium );
    text-align: left;
border-spacing: 0;
    /* boxshadow-2 */
box-shadow: var( --box-shadow-card );
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.04), 0 3px 6px rgba(0, 0, 0, 0.0575);
font-size: 0.875rem;
    /* In case if tooltips go out of boundary */
text-align: left;
    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-table {
.infobox th,
z-index: 3;
.infobox td {
width: 360px;
padding: 0 10px;
border-radius: 10px;
}
border-spacing: 0;
 
padding-bottom: 40px;
/* Infobox column */
font-size: 13px;
.infobox .infobox-nocol {
text-align: left;
width: 100%;
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.04), 0 3px 6px rgba(0, 0, 0, 0.0575);
flex-direction: row;
overflow: hidden;
}
}


.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: 100%;
}
 
.infobox .infobox-col2 {
width: 50%;
width: 50%;
}
}


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


.infobox-col4 {
.infobox .infobox-col4 {
width: 25%;
width: 25%;
}
}
Строка 49: Строка 67:
}
}


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


.infobox tr:first-of-type .mw-collapsible-toggle {
.infobox-image td {
display: none;
padding: 0;
float: unset;
}
}


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


.infobox tr:first-of-type .mw-collapsible-toggle a.mw-collapsible-text:hover {
.infobox-image--dark .image {
background: #b32424;
background: #2b2f36;
}
}


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


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


.infobox tr:first-of-type .mw-collapsible-toggle:before,
/* Neutral background for all transprent SVG */
.infobox tr:first-of-type .mw-collapsible-toggle:after {
.infobox-image .image img[ src$='.svg' ] {
content: none;
background: #eaecf0;
}
 
.infobox tr:not(.infobox-image) {
margin-top: 10px;
display: flex;
flex-direction: column;
}
}


.infobox th,
/* Infobox title */
.infobox td {
.infobox .infobox-title {
padding: 0 20px;
}
 
.infobox-title,
.infobox-header,
.infobox-button-bar {
width: 100%;
width: 100%;
}
.infobox-title th,
.infobox-header th {
text-align: left;
}
tr.infobox-title {
margin-top: 20px;
margin-top: 20px;
margin-bottom: 5px;
margin-bottom: 5px;
}
color: var(--color-base--emphasized);
 
.infobox-title th {
font-size: 1.4rem;
font-size: 1.4rem;
line-height: 1.4;
line-height: 1.4;
}
}


tr.infobox-header {
/* Infobox indicator */
padding-top: 15px;
.infobox .infobox-indicator {
/* base-80 */
margin-top: 0;
border-top: 1px solid #eaecf0;
padding: 0;
}
}


tr.infobox-header {
.infobox .infobox-indicator th,
margin-top: 15px !important;
.infobox .infobox-subtitle th {
display: none;
}
}


tr.infobox-button-bar {
/* Infobox subtitle */
margin-top: 25px !important;
.infobox .infobox-subtitle {
/* Cancel infobox-title bottom margin */
margin-top: -5px;
margin-bottom: 5px;
}
}


.infobox-header th {
/* 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;
font-size: 1rem;
}
}


.infobox-button-bar th,
/* Infobox value */
.infobox-image td {
padding: 0;
}
 
.infobox-image td {
background: #eaecf0;
}
 
.infobox-image {
border-radius: 12px 12px 0 0;
overflow: hidden;
}
 
.infobox-data th {
.infobox-data th {
/* base-30 */
color: var( --color-base--subtle );
color: #72777d;
font-size: 0.8125rem;
font-weight: normal;
font-weight: normal;
font-size: 0.8125rem;
letter-spacing: .75px;
}
}


.infobox-data td {
.infobox-data td {
text-align: left!important;
font-weight: 600;
font-weight: bold;
}
}


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


.infobox-table tr:not(#infobox-table-img-bg) {
/* Infobox button */
margin-top: 10px;
.infobox .infobox-button-bar {
display: flex;
width: 100%;
padding: 0;
margin-top: 25px;
text-align: center;
}
}


.infobox-table th,
.infobox-button-bar th {
.infobox-table tr>td:first-child {
padding: 0;
font-weight: 700;
}
}


.infobox-table tr>td:first-child {
/* Collapsible toggle */
margin: 0 20px;
.infobox tr:first-of-type .mw-collapsible-toggle {
color: #72777d;
position: relative;
font-weight: normal;
display: none;
font-size: 0.8125rem;
float: none;
}
}


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


.infobox-table th {
.infobox tr:first-of-type .mw-collapsible-toggle .mw-collapsible-text:hover {
font-size: 1rem;
background: var( --color-destructive--hover );
text-align: left !important;
padding-top: 15px !important;
border-top: 1px solid #eaecf0;
}
}


th.infobox-table-name {
.infobox tr:first-of-type .mw-collapsible-toggle .mw-collapsible-text:active {
border: 0 !important;
background: var( --color-destructive--active );
font-size: 1.4rem !important;
line-height: 1.4;
margin: 10px 20px 5px;
padding-top: 0 !important;
}
}


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


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


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


.infobox-button {
.infobox tr:first-of-type .mw-collapsible-toggle:before,
display: block;
.infobox tr:first-of-type .mw-collapsible-toggle:after {
width: 100%;
content: none;
}
}


.infobox-button>div {
@media only screen and ( max-width: 720px ) {
display: flex;
.infobox {
flex-wrap: wrap;
margin-right: auto;
justify-content: space-between;
margin-left: auto;
}
}
 
.infobox-table .live>td:nth-child(2n) {
color: #00af89;
}


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

Текущая версия от 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 для того, чтобы сделать ваш опыт использования сайта лучше и анализа использования сайта