Открыть меню
Переключить меню настроек
Открыть персональное меню
Вы не представились системе
Ваш IP-адрес будет виден всем, если вы внесёте какие-либо изменения.

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

Материал из SpaceOnyx
Нет описания правки
Нет описания правки
Строка 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;
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: 28px;                         /* размер подложки кнопки */
     width: 18px;
     height: 28px;
     height: 18px;
     padding: 2px;
     padding: 0;
     background: rgba(0, 0, 0, 0.22);     /* полупрозрачная подложка */
     background: transparent;
     border-radius: 5px;
     border-radius: 3px;
     text-decoration: none !important;
     text-decoration: none !important;
    transition: background 0.15s ease;
     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.42);
     background: rgba(0, 0, 0, 0.22);
}
}


/* Сам символ рисуется через ::before, его размер — отдельно от размера подложки */
.рамка-кнопка::before {
.рамка-кнопка::before {
     font-size: 22px;                     /* ← размер символа, крути тут */
     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;
margin-top: 0;
}
}


.рамка-содержимое p:last-child {
.рамка-содержимое p:last-child {
    margin-bottom: 0;
margin-bottom: 0;
}
}


Строка 107: Строка 108:


@media screen and (max-width: 751px) {
@media screen and (max-width: 751px) {
    .рамка {
.рамка {
        min-width: 0;
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;
	}
}