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

import TemplateStyles CSS
PortalBox: объём + hover (TemplateStyles-safe)
 
(не показаны 3 промежуточные версии этого же участника)
Строка 1: Строка 1:
.portalbox {
.portalbox {
position: relative;
position: relative;
display: flex;
display: flex;
border-radius: 6px;
}
}
 
.portalbox--compact {
.portalbox-wrapper {
flex: 1 1 auto;
width: 100%;
max-width: 100%;
min-width: 0;
}
.portalbox-wrapper--compact {
overflow: hidden;
overflow: hidden;
position: relative;
position: relative;
flex: 1;
display: flex;
display: flex;
flex-direction: column;
align-items: center;
justify-content: flex-start;
gap: 0.35rem;
width: 100%;
min-height: 7.5rem;
padding: 0.45rem 0.3rem 0.55rem;
background-color: var(--tmp-10);
background-color: var(--tmp-10);
outline: 1px solid var(--tmp-25);
outline: 1px outset var(--tmp-25);
border-radius: 8px;
border-radius: 8px;
box-shadow: 0 2px 0 rgba(0,0,0,.12);
box-shadow: 0 2px 0 var(--tmp-25);
transition-property: box-shadow;
transition-property: transform, box-shadow, outline-color, background-color;
transition-duration: 0.15s;
transition-duration: 0.18s;
z-index: 1;
z-index: 1;
box-sizing: border-box;
}
}
 
.portalbox--compact:hover .portalbox-wrapper--compact {
.portalbox:hover .portalbox-wrapper {
transform: translateY(-0.18rem);
box-shadow: 0 2px 0 rgba(0,0,0,.12);
outline-color: var(--tmp-75);
background-color: var(--tmp-25);
box-shadow: 0 0.22rem 0 var(--tmp-50);
z-index: 2;
}
.portalbox--compact:active .portalbox-wrapper--compact {
transform: translateY(0);
box-shadow: inset 0 0 0.12em 0.06em rgba(0, 0, 0, 0.16);
transition-duration: 0s;
}
}
 
.portalbox-image {
.portalbox-role {
display: flex;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
justify-content: center;
text-align: center;
width: 64px;
width: 128px;
height: 64px;
gap: 0.5rem;
padding: 0.5rem 0;
background-color: var(--tmp-10);
border-right: 1px solid var(--tmp-25);
box-shadow: 0 3px 0 -1px var(--tmp-25);
}
}
.portalbox-image a {
.portalbox-image a {
transition-property: filter;
transition-property: filter;
transition-duration: 0.15s;
transition-duration: 0.15s;
}
}
 
.portalbox--compact:active .portalbox-image a {
.portalbox:active .portalbox-image a {
filter: drop-shadow(0 0 3px var(--tmp-75));
 
transition-duration: 0s;
transition-duration: 0s;
}
}
 
.portalbox-image img,
.portalbox-image .mw-file-element {
max-width: 64px !important;
max-height: 64px !important;
width: auto !important;
height: auto !important;
object-fit: contain !important;
image-rendering: pixelated;
}
.portalbox-name {
.portalbox-name {
hyphens: auto;
hyphens: auto;
font-weight: bold;
font-weight: bold;
line-height: 1rem;
font-size: 0.8rem;
padding: 0 0.25rem;
line-height: 1.05rem;
padding: 0 0.2rem;
text-align: center;
}
}
.portalbox-name a {
.portalbox-name a {
color: #1a1a1a;
color: inherit;
}
}
.portalbox-name a:before {
.portalbox-name a:before {
content: '';
content: '';
position: absolute;
position: absolute;
top:0;right:0;bottom:0;left:0;
top: 0;
}
right: 0;
 
bottom: 0;
.portalbox-desc {
left: 0;
    flex: 1;
    line-height: 1.1rem;
    padding: 0.5rem;
}
 
.portalbox-desc a {
    position: relative;
    z-index: 2;
}
 
/* Rainbow */
 
.portalbox.rgb .portalbox-wrapper {
margin: 1px;
background-color: #666666;
}
 
.portalbox.rgb .portalbox-role {
background-color: #666666;
border-right: 1px solid #c9d4e4;
box-shadow: 0 3px 0 -1px var(--color-primal);
}
 
.portalbox.rgb .rainbow {
 
}
 
.portalbox.rgb:hover .rainbow {
 
}
}

Текущая версия от 20:45, 6 августа 2026

.portalbox {
	position: relative;
	display: flex;
}
.portalbox--compact {
	flex: 1 1 auto;
	width: 100%;
	max-width: 100%;
	min-width: 0;
}
.portalbox-wrapper--compact {
	overflow: hidden;
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	gap: 0.35rem;
	width: 100%;
	min-height: 7.5rem;
	padding: 0.45rem 0.3rem 0.55rem;
	background-color: var(--tmp-10);
	outline: 1px outset var(--tmp-25);
	border-radius: 8px;
	box-shadow: 0 2px 0 var(--tmp-25);
	transition-property: transform, box-shadow, outline-color, background-color;
	transition-duration: 0.18s;
	z-index: 1;
	box-sizing: border-box;
}
.portalbox--compact:hover .portalbox-wrapper--compact {
	transform: translateY(-0.18rem);
	outline-color: var(--tmp-75);
	background-color: var(--tmp-25);
	box-shadow: 0 0.22rem 0 var(--tmp-50);
	z-index: 2;
}
.portalbox--compact:active .portalbox-wrapper--compact {
	transform: translateY(0);
	box-shadow: inset 0 0 0.12em 0.06em rgba(0, 0, 0, 0.16);
	transition-duration: 0s;
}
.portalbox-image {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
}
.portalbox-image a {
	transition-property: filter;
	transition-duration: 0.15s;
}
.portalbox--compact:active .portalbox-image a {
	filter: drop-shadow(0 0 3px var(--tmp-75));
	transition-duration: 0s;
}
.portalbox-image img,
.portalbox-image .mw-file-element {
	max-width: 64px !important;
	max-height: 64px !important;
	width: auto !important;
	height: auto !important;
	object-fit: contain !important;
	image-rendering: pixelated;
}
.portalbox-name {
	hyphens: auto;
	font-weight: bold;
	font-size: 0.8rem;
	line-height: 1.05rem;
	padding: 0 0.2rem;
	text-align: center;
}
.portalbox-name a {
	color: inherit;
}
.portalbox-name a:before {
	content: '';
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
}