Шаблон:Рамочка/style.css: различия между версиями
Материал из SpaceOnyx
Дополнительные действия
Neyran (обсуждение | вклад) Нет описания правки |
Neyran (обсуждение | вклад) Нет описания правки |
||
| Строка 11: | Строка 11: | ||
border-radius: 3px; | border-radius: 3px; | ||
box-sizing: border-box; | box-sizing: border-box; | ||
overflow: hidden; | overflow: hidden; | ||
} | } | ||
.рамка .wikitable { | .рамка .wikitable { | ||
margin: 0 !important; | |||
} | } | ||
| Строка 40: | Строка 40: | ||
} | } | ||
/* Кнопка сворачивания — символ вместо текста */ | /* Кнопка сворачивания — компактная, символ вместо текста */ | ||
.рамка-кнопка { | .рамка-кнопка { | ||
color: #fff; | color: #fff; | ||
cursor: pointer; | cursor: pointer; | ||
font-size: 0 !important; | font-size: 0 !important; | ||
display: inline-flex; | display: inline-flex; | ||
align-items: center; | align-items: center; | ||
justify-content: center; | justify-content: center; | ||
width: | width: 18px; | ||
height: | height: 18px; | ||
padding: | padding: 0; | ||
background: | background: transparent; | ||
border-radius: | border-radius: 3px; | ||
text-decoration: none !important; | text-decoration: none !important; | ||
user-select: none; | user-select: none; | ||
line-height: 1; | line-height: 1; | ||
box-sizing: border-box; | box-sizing: border-box; | ||
vertical-align: middle; | |||
flex: 0 0 auto; | |||
transition: background 0.15s ease; | |||
} | } | ||
.рамка-кнопка:hover { | .рамка-кнопка:hover { | ||
background: rgba(0, 0, 0, 0. | background: rgba(0, 0, 0, 0.22); | ||
} | } | ||
.рамка-кнопка::before { | .рамка-кнопка::before { | ||
font-size: | font-size: 12px; | ||
line-height: 1; | line-height: 1; | ||
color: #fff; | color: #fff; | ||
| Строка 72: | Строка 73: | ||
} | } | ||
/* | /* Развёрнуто — стрелка вниз */ | ||
.рамка:not(.mw-collapsed) .рамка-кнопка::before { | .рамка:not(.mw-collapsed) .рамка-кнопка::before { | ||
content: "▼"; | content: "▼"; | ||
} | } | ||
/* | /* Свёрнуто — стрелка влево */ | ||
.рамка.mw-collapsed .рамка-кнопка::before { | .рамка.mw-collapsed .рамка-кнопка::before { | ||
content: " | content: "◀"; | ||
} | } | ||
| Строка 89: | Строка 90: | ||
.рамка-содержимое p:first-child { | .рамка-содержимое p:first-child { | ||
margin-top: 0; | |||
} | } | ||
.рамка-содержимое p:last-child { | .рамка-содержимое p:last-child { | ||
margin-bottom: 0; | |||
} | } | ||
| Строка 107: | Строка 108: | ||
@media screen and (max-width: 751px) { | @media screen and (max-width: 751px) { | ||
.рамка { | |||
min-width: 0; | |||
} | |||
} | } | ||
Версия от 22:13, 12 сентября 2026
/* Основные стили рамки */
.рамка {
display: flex;
flex-direction: column;
max-width: 100%;
min-width: 300px;
width: 100%;
margin: 0.5em 0 5px 0;
border: 1px solid #465298;
padding: 2px;
border-radius: 3px;
box-sizing: border-box;
overflow: hidden;
}
.рамка .wikitable {
margin: 0 !important;
}
/* Заголовок рамки */
.рамка-заголовок {
background-color: #465298;
border-radius: 3px;
text-align: center;
cursor: pointer;
}
.рамка-заголовок-контент {
display: flex;
justify-content: space-between;
align-items: center;
text-align: left;
margin: 0 6px;
}
.рамка-название {
margin: 6px 0;
color: #fff;
flex-grow: 1;
}
/* Кнопка сворачивания — компактная, символ вместо текста */
.рамка-кнопка {
color: #fff;
cursor: pointer;
font-size: 0 !important;
display: inline-flex;
align-items: center;
justify-content: center;
width: 18px;
height: 18px;
padding: 0;
background: transparent;
border-radius: 3px;
text-decoration: none !important;
user-select: none;
line-height: 1;
box-sizing: border-box;
vertical-align: middle;
flex: 0 0 auto;
transition: background 0.15s ease;
}
.рамка-кнопка:hover {
background: rgba(0, 0, 0, 0.22);
}
.рамка-кнопка::before {
font-size: 12px;
line-height: 1;
color: #fff;
display: block;
}
/* Развёрнуто — стрелка вниз */
.рамка:not(.mw-collapsed) .рамка-кнопка::before {
content: "▼";
}
/* Свёрнуто — стрелка влево */
.рамка.mw-collapsed .рамка-кнопка::before {
content: "◀";
}
/* Содержимое рамки */
.рамка-содержимое {
padding: 5px 8px;
display: block;
}
.рамка-содержимое p:first-child {
margin-top: 0;
}
.рамка-содержимое p:last-child {
margin-bottom: 0;
}
/* Стили для MediaWiki collapsible */
.mw-collapsible-toggle {
display: inline-block;
user-select: none;
}
.mw-collapsible-text {
font-size: 0.9em;
}
@media screen and (max-width: 751px) {
.рамка {
min-width: 0;
}
}