MediaWiki:Gadget-FontSwitcher.css: различия между версиями
Перейти к навигации
Перейти к поиску
Ланселот (обсуждение | вклад) Нет описания правки |
Ланселот (обсуждение | вклад) Нет описания правки |
||
| (не показаны 33 промежуточные версии этого же участника) | |||
| Строка 1: | Строка 1: | ||
/* Крупный шрифт для области содержимого (коэффициент 1. | /* ============================================== | ||
Gadget: FontSwitcher | |||
Крупный шрифт для слабовидящих + защита вёрстки | |||
+ поддержка ночной темы «АСТРЕЯ» | |||
============================================== */ | |||
/* Бета-версия 1.1, кнопка в боковой панели */ | |||
/* Лицензия: MIT (opensource.org/license/mit) ==> 2026, absurdopedia.wiki */ | |||
/* Идёт в связке с [[MediaWiki:Gadget-FontSwitcher.js]] */ | |||
/* ===== 1. Крупный шрифт для области содержимого (коэффициент 1.5) ===== */ | |||
body.font-large #mw-content-text, | body.font-large #mw-content-text, | ||
body.font-large .mw-parser-output { | body.font-large .mw-parser-output { | ||
font-size: 1. | font-size: 1.5em; | ||
line-height: 1. | line-height: 1.75; | ||
} | } | ||
body.font-large #firstHeading { | body.font-large #firstHeading { | ||
font-size: 2. | font-size: 2.4em; | ||
} | } | ||
/* Ссылка в «Инструментах» — | /* ===== 2. Ссылка в «Инструментах» — дневная тема ===== */ | ||
#p-tb #ca-font-switcher a { | #p-tb li#ca-font-switcher a, | ||
color: | #p-tb li#ca-font-switcher a:visited, | ||
#p-tb li#ca-font-switcher a:hover, | |||
#p-tb li#ca-font-switcher a:focus, | |||
#p-tb li#ca-font-switcher a:active, | |||
#p-tb .font-switcher-item a, | |||
#p-tb a.font-switcher-link, | |||
#ca-font-switcher a, | |||
a#ca-font-switcher, | |||
.font-switcher-link { | |||
color: #0645ad !important; | |||
-webkit-text-fill-color: #0645ad !important; | |||
text-decoration: none; | |||
} | } | ||
#p-tb #ca-font-switcher a: | #p-tb li#ca-font-switcher a:hover, | ||
#p-tb li#ca-font-switcher a:focus, | |||
#p-tb .font-switcher-item a:hover, | |||
#p-tb a.font-switcher-link:hover, | |||
#ca-font-switcher a:hover, | |||
a#ca-font-switcher:hover, | |||
.font-switcher-link:hover { | |||
text-decoration: underline; | |||
} | } | ||
#p-tb #ca-font-switcher a:hover, | /* ===== 3. Ссылка в «Инструментах» — ночная тема «АСТРЕЯ» ===== */ | ||
#p-tb #ca-font-switcher a:focus { | html.dm #p-tb li#ca-font-switcher a, | ||
html.dm #p-tb li#ca-font-switcher a:visited, | |||
html.dm #p-tb li#ca-font-switcher a:hover, | |||
html.dm #p-tb li#ca-font-switcher a:focus, | |||
html.dm #p-tb li#ca-font-switcher a:active, | |||
html.dm #p-tb .font-switcher-item a, | |||
html.dm #p-tb a.font-switcher-link, | |||
html.dm #ca-font-switcher a, | |||
html.dm a#ca-font-switcher, | |||
html.dm .font-switcher-link { | |||
color: #8cc8ff !important; | |||
-webkit-text-fill-color: #8cc8ff !important; | |||
} | |||
html.dm #p-tb li#ca-font-switcher a:hover, | |||
html.dm #p-tb li#ca-font-switcher a:focus, | |||
html.dm #p-tb .font-switcher-item a:hover, | |||
html.dm #p-tb a.font-switcher-link:hover, | |||
html.dm #ca-font-switcher a:hover, | |||
html.dm a#ca-font-switcher:hover, | |||
html.dm .font-switcher-link:hover { | |||
text-decoration: underline; | text-decoration: underline; | ||
} | |||
/* ===== 4. Глобальная защита от выхода текста за рамки ===== */ | |||
/* 4.1. Текстовые элементы переносятся, а не вылезают */ | |||
body.font-large #mw-content-text p, | |||
body.font-large #mw-content-text li, | |||
body.font-large #mw-content-text dd, | |||
body.font-large #mw-content-text dt, | |||
body.font-large #mw-content-text td, | |||
body.font-large #mw-content-text th, | |||
body.font-large #mw-content-text .mw-parser-output > div, | |||
body.font-large #mw-content-text .mw-parser-output > span { | |||
overflow-wrap: anywhere; | |||
word-break: break-word; | |||
white-space: normal; | |||
max-width: 100%; | |||
box-sizing: border-box; | |||
} | |||
/* 4.2. Заголовки */ | |||
body.font-large #mw-content-text h1, | |||
body.font-large #mw-content-text h2, | |||
body.font-large #mw-content-text h3, | |||
body.font-large #mw-content-text h4, | |||
body.font-large #mw-content-text h5, | |||
body.font-large #mw-content-text h6 { | |||
overflow-wrap: anywhere; | |||
word-break: break-word; | |||
white-space: normal; | |||
max-width: 100%; | |||
} | |||
/* 4.3. Картинки и медиа не распирают контейнер */ | |||
body.font-large #mw-content-text img, | |||
body.font-large #mw-content-text video, | |||
body.font-large #mw-content-text svg { | |||
max-width: 100%; | |||
height: auto; | |||
} | |||
/* 4.4. Таблицы: прокрутка вместо вылезания */ | |||
body.font-large #mw-content-text table { | |||
max-width: 100%; | |||
} | |||
body.font-large #mw-content-text .mw-parser-output > table, | |||
body.font-large #mw-content-text .wikitable { | |||
display: block; | |||
overflow-x: auto; | |||
} | |||
/* 4.5. Флекс-контейнеры внутри шаблонов переносятся */ | |||
body.font-large #mw-content-text .mw-parser-output [style*="display:flex"], | |||
body.font-large #mw-content-text .mw-parser-output [style*="display: flex"] { | |||
flex-wrap: wrap; | |||
} | } | ||
Текущая версия от 20:27, 15 ноября 2026
/* ==============================================
Gadget: FontSwitcher
Крупный шрифт для слабовидящих + защита вёрстки
+ поддержка ночной темы «АСТРЕЯ»
============================================== */
/* Бета-версия 1.1, кнопка в боковой панели */
/* Лицензия: MIT (opensource.org/license/mit) ==> 2026, absurdopedia.wiki */
/* Идёт в связке с [[MediaWiki:Gadget-FontSwitcher.js]] */
/* ===== 1. Крупный шрифт для области содержимого (коэффициент 1.5) ===== */
body.font-large #mw-content-text,
body.font-large .mw-parser-output {
font-size: 1.5em;
line-height: 1.75;
}
body.font-large #firstHeading {
font-size: 2.4em;
}
/* ===== 2. Ссылка в «Инструментах» — дневная тема ===== */
#p-tb li#ca-font-switcher a,
#p-tb li#ca-font-switcher a:visited,
#p-tb li#ca-font-switcher a:hover,
#p-tb li#ca-font-switcher a:focus,
#p-tb li#ca-font-switcher a:active,
#p-tb .font-switcher-item a,
#p-tb a.font-switcher-link,
#ca-font-switcher a,
a#ca-font-switcher,
.font-switcher-link {
color: #0645ad !important;
-webkit-text-fill-color: #0645ad !important;
text-decoration: none;
}
#p-tb li#ca-font-switcher a:hover,
#p-tb li#ca-font-switcher a:focus,
#p-tb .font-switcher-item a:hover,
#p-tb a.font-switcher-link:hover,
#ca-font-switcher a:hover,
a#ca-font-switcher:hover,
.font-switcher-link:hover {
text-decoration: underline;
}
/* ===== 3. Ссылка в «Инструментах» — ночная тема «АСТРЕЯ» ===== */
html.dm #p-tb li#ca-font-switcher a,
html.dm #p-tb li#ca-font-switcher a:visited,
html.dm #p-tb li#ca-font-switcher a:hover,
html.dm #p-tb li#ca-font-switcher a:focus,
html.dm #p-tb li#ca-font-switcher a:active,
html.dm #p-tb .font-switcher-item a,
html.dm #p-tb a.font-switcher-link,
html.dm #ca-font-switcher a,
html.dm a#ca-font-switcher,
html.dm .font-switcher-link {
color: #8cc8ff !important;
-webkit-text-fill-color: #8cc8ff !important;
}
html.dm #p-tb li#ca-font-switcher a:hover,
html.dm #p-tb li#ca-font-switcher a:focus,
html.dm #p-tb .font-switcher-item a:hover,
html.dm #p-tb a.font-switcher-link:hover,
html.dm #ca-font-switcher a:hover,
html.dm a#ca-font-switcher:hover,
html.dm .font-switcher-link:hover {
text-decoration: underline;
}
/* ===== 4. Глобальная защита от выхода текста за рамки ===== */
/* 4.1. Текстовые элементы переносятся, а не вылезают */
body.font-large #mw-content-text p,
body.font-large #mw-content-text li,
body.font-large #mw-content-text dd,
body.font-large #mw-content-text dt,
body.font-large #mw-content-text td,
body.font-large #mw-content-text th,
body.font-large #mw-content-text .mw-parser-output > div,
body.font-large #mw-content-text .mw-parser-output > span {
overflow-wrap: anywhere;
word-break: break-word;
white-space: normal;
max-width: 100%;
box-sizing: border-box;
}
/* 4.2. Заголовки */
body.font-large #mw-content-text h1,
body.font-large #mw-content-text h2,
body.font-large #mw-content-text h3,
body.font-large #mw-content-text h4,
body.font-large #mw-content-text h5,
body.font-large #mw-content-text h6 {
overflow-wrap: anywhere;
word-break: break-word;
white-space: normal;
max-width: 100%;
}
/* 4.3. Картинки и медиа не распирают контейнер */
body.font-large #mw-content-text img,
body.font-large #mw-content-text video,
body.font-large #mw-content-text svg {
max-width: 100%;
height: auto;
}
/* 4.4. Таблицы: прокрутка вместо вылезания */
body.font-large #mw-content-text table {
max-width: 100%;
}
body.font-large #mw-content-text .mw-parser-output > table,
body.font-large #mw-content-text .wikitable {
display: block;
overflow-x: auto;
}
/* 4.5. Флекс-контейнеры внутри шаблонов переносятся */
body.font-large #mw-content-text .mw-parser-output [style*="display:flex"],
body.font-large #mw-content-text .mw-parser-output [style*="display: flex"] {
flex-wrap: wrap;
}