Шаблон:PortalBox/styles.css: различия между версиями
Admin (обсуждение | вклад) import TemplateStyles CSS |
Admin (обсуждение | вклад) import TemplateStyles CSS |
||
| Строка 1: | Строка 1: | ||
.portalbox { | .portalbox { | ||
position: relative; | position: relative; | ||
display: flex; | display: flex; | ||
} | } | ||
.portalbox--compact { | |||
.portalbox-wrapper { | flex: 0 0 auto; | ||
width: 7.5rem; | |||
} | |||
.portalbox-wrapper--compact { | |||
overflow: hidden; | overflow: hidden; | ||
position: relative; | position: relative; | ||
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.4rem 0.25rem 0.5rem; | |||
background-color: var(--tmp-10); | background-color: var(--tmp-10); | ||
outline: 1px solid var(--tmp-25); | outline: 1px solid var(--tmp-25); | ||
border-radius: 8px; | border-radius: 8px; | ||
box-shadow: 0 2px 0 rgba(0,0,0,.12); | box-shadow: 0 2px 0 rgba(0,0,0,.12); | ||
transition-property: box-shadow; | transition-property: box-shadow, outline-color; | ||
transition-duration: 0.15s; | transition-duration: 0.15s; | ||
z-index: 1; | z-index: 1; | ||
} | } | ||
.portalbox--compact:hover .portalbox-wrapper--compact { | |||
.portalbox:hover .portalbox-wrapper { | outline-color: var(--tmp-75); | ||
} | } | ||
.portalbox-image { | |||
.portalbox- | |||
display: flex; | display: flex; | ||
align-items: center; | |||
justify-content: center; | justify-content: center; | ||
width: 64px; | |||
width: | height: 64px; | ||
} | } | ||
.portalbox-image img, | |||
.portalbox-image | .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: | font-size: 0.8rem; | ||
padding: 0 0. | line-height: 1.05rem; | ||
padding: 0 0.2rem; | |||
text-align: center; | |||
} | } | ||
.portalbox-name a { | .portalbox-name a { | ||
color: | 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; left: 0; | ||
} | } | ||
Версия от 20:10, 6 августа 2026
.portalbox {
position: relative;
display: flex;
}
.portalbox--compact {
flex: 0 0 auto;
width: 7.5rem;
}
.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.4rem 0.25rem 0.5rem;
background-color: var(--tmp-10);
outline: 1px solid var(--tmp-25);
border-radius: 8px;
box-shadow: 0 2px 0 rgba(0,0,0,.12);
transition-property: box-shadow, outline-color;
transition-duration: 0.15s;
z-index: 1;
}
.portalbox--compact:hover .portalbox-wrapper--compact {
outline-color: var(--tmp-75);
}
.portalbox-image {
display: flex;
align-items: center;
justify-content: center;
width: 64px;
height: 64px;
}
.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;
}