MediaWiki:Common.css: различия между версиями

Нет описания правки
Нет описания правки
Метки: с мобильного устройства из мобильной версии через расширенный мобильный режим
 
(не показаны 3 промежуточные версии этого же участника)
Строка 16: Строка 16:
  * 12. SOURCE EDITOR → SYNTAX HIGHLIGHTING
  * 12. SOURCE EDITOR → SYNTAX HIGHLIGHTING
  * 13. DRUID Infoboxes
  * 13. DRUID Infoboxes
  * 14. Меню настроек темы
  * 14. JS
  */
  */


Строка 2186: Строка 2186:
/* ============ */
/* ============ */


.js-project-menu {
/* Складной списки с кнопкой в ширину всего блока */
display: inline-flex;
.collapsible-title {
gap: 6px;
display: grid;
font-size: var(--font-size-s);
flex-wrap: wrap;
}
}


.js-project-menu label {
.collapsible-title > *:not(.mw-collapsible-content) {
user-select: none;
grid-row: 1;
-webkit-user-drag: none;
grid-column: 1 / 3;
transition-property: background,box-shadow;
}  
transition-duration: var(--transition-time);
cursor: pointer;
padding: 0.2em 0.4em;
font-weight: bold;
border-bottom: solid 2px var(--theme-text-color-dark);
border-radius: var(--border-radius-low) var(--border-radius-low) 0 0;
color: var(--theme-text-color-dark);
opacity: 0.75;
}


.js-project-menu input {
.collapsible-title > .mw-collapsible-content {
display: none;
grid-row: 2;
grid-column: 1 / 3;
}
}


.js-project-menu input:checked + label,
/* Делает кнопку раскрытия складного списка в виде стрелочки */
.js-project-menu label:hover {
.collapsible-toggle-arrow::before {
opacity: 1;
--wh-ratio: 1.5;
}
--w: 0.9em;
 
--h: calc(var(--w) / var(--wh-ratio));
.js-project-menu input:not(:checked) + label {
content: "";
background: unset !important;
background-image: url(/images/1/12/Inverted_triangle.svg);
display: inline-block;
background-size: cover;
width: var(--w);
height: var(--h);
margin: 0 0.1em;
transition: transform 60ms ease;
}
}


.js-project-menu input#project-Corvax + label {
.mw-collapsible:has(.mw-collapsible-toggle-collapsed) > .collapsible-toggle-arrow::before {
color: var(--text-color-crimson);
transform: rotate(-90deg);
border-bottom-color: var(--text-color-crimson);
background: var(--bg-color-pastel-red-dark);
}
}


.js-project-menu input#project-WL + label {
.mw-collapsible:has(.collapsible-toggle-arrow) > .mw-collapsible-toggle *,
color: var(--text-color-dark-salmon);
.mw-collapsible:has(.collapsible-toggle-arrow) > .mw-collapsible-toggle::after,
border-bottom-color: var(--text-color-dark-salmon);
.mw-collapsible:has(.collapsible-toggle-arrow) > .mw-collapsible-toggle::before {
background: var(--bg-color-rust-dark);
display: none;
}
}


.js-project-menu input#project-CM + label {
/* Ссылка на весь контейнер кнопки */
color: var(--text-color-turquoise);
a:has(.StupidButton) {
border-bottom-color: var(--text-color-turquoise);
position: absolute;
background: var(--bg-color-emerald-dark);
top: 0;
bottom: 0;
left: 0;
right: 0;
z-index: var(--index-overlay);
}
}


.js-project-menu input#project-Frontier + label {
/* Тег p без отступов */
color: var(--text-color-violet);
.p-no-margin p {
border-bottom-color: var(--text-color-violet);
margin: 0;
background: var(--bg-color-violet-dark);
}
}


.js-project-menu input#project-Fallout + label {
/* Подсветка при наведении */
color: var(--text-color-silver);
.backlight:hover {
border-bottom-color: var(--text-color-silver);
box-shadow: 0 0 4px 2px var(--color-contrast);
background: var(--bg-color-grey-dark);
}
}


.js-project-menu input#project-SW + label {
/* Key press */
color: var(--text-color-crimson);
.keyboard-key,
border-bottom-color: var(--text-color-crimson);
.ve-ui-commandHelpDialog-shortcut > kbd, .ve-ui-commandHelpDialog-sequence > kbd {
background: var(--bg-color-pastel-red-dark);
border: 1px solid var(--theme-border-color-100);
border-radius: var(--border-radius-low);
background-image: linear-gradient(to bottom, var(--theme-bg-color-100), var(--theme-bg-color-250), var(--theme-bg-color-100));
color: var(--theme--text-color);
padding: 0.1em 0.3em;
font-family: inherit;
font-size: 0.8em;
}
}


.js-project-menu input#project-Wega + label {
/* Кнопка вверх [[Файл:AnomalyElectricityPulse.png]] */
color: var(--text-color-pink);
#scroll-top {
border-bottom-color: var(--text-color-pink);
display: none !important;
background: var(--bg-color-pink-dark);
background: url(https://station14.ru/images/0/00/AnomalyElectricityPulse.png) 0% 0%/57px 57px no-repeat;
}
opacity: 0.5;
 
width: 57px;
.js-project-menu input#project-Goob + label {
height: 57px;
color: var(--text-color-blue);
cursor: pointer;
border-bottom-color: var(--text-color-blue);
position: fixed;
background: var(--bg-color-blue-dark);
right: calc(0.95em + 6px);
bottom: 30px;
z-index: 10000;
image-rendering: pixelated;
filter: var(--filter-drop-shadow-medium);
}
}


/* Складной списки с кнопкой в ширину всего блока */
#scroll-top:hover {
.collapsible-title {
opacity: 0.8;
display: grid;
}
}


.collapsible-title > *:not(.mw-collapsible-content) {
@media screen and (max-width: 850px) {
grid-row: 1;
#scroll-top {
grid-column: 1 / 3;
transform: translate(-50%, -50%);
}
left: 50%;
 
right: 50%;
.collapsible-title > .mw-collapsible-content {
bottom: 15px;
grid-row: 2;
opacity: 0.3;
grid-column: 1 / 3;
}
}
}


/* Делает кнопку раскрытия складного списка в виде стрелочки */
/* Необходим для использования fonts.google.com/icons */
.collapsible-toggle-arrow::before {
.material-symbols-outlined {
--wh-ratio: 1.5;
font-family: 'Material Symbols Outlined';
--w: 0.9em;
font-weight: normal;
--h: calc(var(--w) / var(--wh-ratio));
font-style: normal;
content: "";
font-size: 24px;
background-image: url(/images/1/12/Inverted_triangle.svg);
line-height: 1;
letter-spacing: normal;
text-transform: none;
display: inline-block;
display: inline-block;
background-size: cover;
white-space: nowrap;
width: var(--w);
word-wrap: normal;
height: var(--h);
direction: ltr;
margin: 0 0.1em;
-webkit-font-feature-settings: 'liga';
transition: transform 60ms ease;
-webkit-font-smoothing: antialiased
}
}


.mw-collapsible:has(.mw-collapsible-toggle-collapsed) > .collapsible-toggle-arrow::before {
#mw-indicator-mw-helplink a {
transform: rotate(-90deg);
background-image: none;
}
}


.mw-collapsible:has(.collapsible-toggle-arrow) > .mw-collapsible-toggle *,
.mw-body-content sub,.mw-body-content sup,span.reference {
.mw-collapsible:has(.collapsible-toggle-arrow) > .mw-collapsible-toggle::after,
font-size: 80%
.mw-collapsible:has(.collapsible-toggle-arrow) > .mw-collapsible-toggle::before {
display: none;
}
}


/* Ссылка на весь контейнер кнопки */
.ns-talk .mw-body-content dd {
a:has(.StupidButton) {
margin-top: 0.4em;
position: absolute;
margin-bottom: 0.4em
top: 0;
bottom: 0;
left: 0;
right: 0;
z-index: var(--index-overlay);
}
}


/* Тег p без отступов */
#interwiki-completelist {
.p-no-margin p {
font-weight: bold
margin: 0;
}
}


/* Подсветка при наведении */
.hatnote {
.backlight:hover {
font-style: italic;
box-shadow: 0 0 4px 2px var(--color-contrast);
padding-left: 1.6em;
}
}


/* Key press */
.biglink {
.keyboard-key,
font-family: var(--font-family-oswald);
.ve-ui-commandHelpDialog-shortcut > kbd, .ve-ui-commandHelpDialog-sequence > kbd {
font-style: oblique 10deg;
border: 1px solid var(--theme-border-color-100);
font-variant-caps: small-caps;
border-radius: var(--border-radius-low);
text-shadow: var(--theme-bg-color-base) 1px 2px,#595959dd 2px 2px 1px
background-image: linear-gradient(to bottom, var(--theme-bg-color-100), var(--theme-bg-color-250), var(--theme-bg-color-100));
color: var(--theme--text-color);
padding: 0.1em 0.3em;
font-family: inherit;
font-size: 0.8em;
}
}


/* Кнопка вверх [[Файл:AnomalyElectricityPulse.png]] */
.client-js .mw-special-Watchlist #watchlist-message,.client-js .collapsible:not(.mw-made-collapsible).collapsed>tbody>tr:not(:first-child),#editpage-specialchars {
#scroll-top {
display: none
display: none !important;
background: url(https://station14.ru/images/0/00/AnomalyElectricityPulse.png) 0% 0%/57px 57px no-repeat;
opacity: 0.5;
width: 57px;
height: 57px;
cursor: pointer;
position: fixed;
right: calc(0.95em + 6px);
bottom: 30px;
z-index: 10000;
image-rendering: pixelated;
filter: var(--filter-drop-shadow-medium);
}
}


#scroll-top:hover {
.mw-rcfilters-enabled .mw-specialpage-summary {
opacity: 0.8;
margin-top: 1em
}
}


@media screen and (max-width: 850px) {
.citation:target {
#scroll-top {
background: rgba(0, 127, 255, 0.133)
transform: translate(-50%, -50%);
left: 50%;
right: 50%;
bottom: 15px;
opacity: 0.3;
}
}
}


/* Необходим для использования fonts.google.com/icons */
.citation {
.material-symbols-outlined {
word-wrap: break-word
font-family: 'Material Symbols Outlined';
font-weight: normal;
font-style: normal;
font-size: 24px;
line-height: 1;
letter-spacing: normal;
text-transform: none;
display: inline-block;
white-space: nowrap;
word-wrap: normal;
direction: ltr;
-webkit-font-feature-settings: 'liga';
-webkit-font-smoothing: antialiased
}
}


#mw-indicator-mw-helplink a {
ol.references {
background-image: none;
font-size: 90%;
margin-bottom: 0.5em
}
}


.mw-body-content sub,.mw-body-content sup,span.reference {
.hlist dl,.hlist ol,.hlist ul {
font-size: 80%
margin: 0;
padding: 0
}
}


.ns-talk .mw-body-content dd {
.hlist dd,.hlist dt,.hlist li {
margin-top: 0.4em;
margin: 0;
margin-bottom: 0.4em
display: inline
}
}


#interwiki-completelist {
.hlist.inline,.hlist.inline dl,.hlist.inline ol,.hlist.inline ul,.hlist dl dl,.hlist dl ol,.hlist dl ul,.hlist ol dl,.hlist ol ol,.hlist ol ul,.hlist ul dl,.hlist ul ol,.hlist ul ul {
font-weight: bold
display: inline
}
}


.hatnote {
.hlist .mw-empty-li {
font-style: italic;
display: none
padding-left: 1.6em;
}
}


.biglink {
.hlist dt:after {
font-family: var(--font-family-oswald);
content: ":"
font-style: oblique 10deg;
font-variant-caps: small-caps;
text-shadow: var(--theme-bg-color-base) 1px 2px,#595959dd 2px 2px 1px
}
}


.client-js .mw-special-Watchlist #watchlist-message,.client-js .collapsible:not(.mw-made-collapsible).collapsed>tbody>tr:not(:first-child),#editpage-specialchars {
.hlist dd:after,.hlist li:after {
display: none
content: " · ";
font-weight: bold
}
}


.mw-rcfilters-enabled .mw-specialpage-summary {
.hlist dd:last-child:after,.hlist dt:last-child:after,.hlist li:last-child:after {
margin-top: 1em
content: none
}
}


.citation:target {
.hlist dd dd:first-child:before,.hlist dd dt:first-child:before,.hlist dd li:first-child:before,.hlist dt dd:first-child:before,.hlist dt dt:first-child:before,.hlist dt li:first-child:before,.hlist li dd:first-child:before,.hlist li dt:first-child:before,.hlist li li:first-child:before {
background: rgba(0, 127, 255, 0.133)
content: " (";
font-weight: normal
}
}


.citation {
.hlist dd dd:last-child:after,.hlist dd dt:last-child:after,.hlist dd li:last-child:after,.hlist dt dd:last-child:after,.hlist dt dt:last-child:after,.hlist dt li:last-child:after,.hlist li dd:last-child:after,.hlist li dt:last-child:after,.hlist li li:last-child:after {
word-wrap: break-word
content: ")";
font-weight: normal
}
}


ol.references {
.hlist ol {
font-size: 90%;
counter-reset: listitem
margin-bottom: 0.5em
}
}


.hlist dl,.hlist ol,.hlist ul {
.hlist ol>li {
margin: 0;
counter-increment: listitem
padding: 0
}
}


.hlist dd,.hlist dt,.hlist li {
.hlist ol>li:before {
margin: 0;
content: " " counter(listitem) "\a0"
display: inline
}
}


.hlist.inline,.hlist.inline dl,.hlist.inline ol,.hlist.inline ul,.hlist dl dl,.hlist dl ol,.hlist dl ul,.hlist ol dl,.hlist ol ol,.hlist ol ul,.hlist ul dl,.hlist ul ol,.hlist ul ul {
.hlist dd ol>li:first-child:before,.hlist dt ol>li:first-child:before,.hlist li ol>li:first-child:before {
display: inline
content: " (" counter(listitem) "\a0"
}
}


.hlist .mw-empty-li {
.plainlist ol,.plainlist ul {
display: none
line-height: inherit;
list-style: none none;
margin: 0
}
}


.hlist dt:after {
.plainlist ol li,.plainlist ul li {
content: ":"
margin-bottom: 0
}
}


.hlist dd:after,.hlist li:after {
content: " · ";
font-weight: bold
}


.hlist dd:last-child:after,.hlist dt:last-child:after,.hlist li:last-child:after {
 
content: none
@media (max-width: 800px) {
.grid-adaptive {
grid-template-columns: 1fr !important;
}
}
}


.hlist dd dd:first-child:before,.hlist dd dt:first-child:before,.hlist dd li:first-child:before,.hlist dt dd:first-child:before,.hlist dt dt:first-child:before,.hlist dt li:first-child:before,.hlist li dd:first-child:before,.hlist li dt:first-child:before,.hlist li li:first-child:before {
.grid-item-adaptive {
content: " (";
display: grid;
font-weight: normal
gap: 8px;
grid-template-columns: repeat(auto-fit, minmax(clamp(200px, 30vw, 300px), 1fr));
}
}


.hlist dd dd:last-child:after,.hlist dd dt:last-child:after,.hlist dd li:last-child:after,.hlist dt dd:last-child:after,.hlist dt dt:last-child:after,.hlist dt li:last-child:after,.hlist li dd:last-child:after,.hlist li dt:last-child:after,.hlist li li:last-child:after {
.grid-big-item-adaptive {
content: ")";
display: grid;
font-weight: normal
gap: 10px;
grid-template-columns: repeat(auto-fit, minmax(clamp(200px, 30vw, 400px), 1fr));
}
}


.hlist ol {
.grid-small-item-adaptive {
counter-reset: listitem
display: grid;
gap: 8px;
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
}


.hlist ol>li {
.grid-item-compressed {
counter-increment: listitem
display: grid;
gap: 10px;
grid-template-columns: repeat(auto-fit, minmax(clamp(280px, 30vw, 350px), 0fr));
}
}


.hlist ol>li:before {
.grid-item-compressed {
content: " " counter(listitem) "\a0"
display: grid;
gap: 10px;
grid-template-columns: repeat(auto-fit, minmax(clamp(280px, 30vw, 350px), 0fr));
}
}


.hlist dd ol>li:first-child:before,.hlist dt ol>li:first-child:before,.hlist li ol>li:first-child:before {
.link-card__flex-container {
content: " (" counter(listitem) "\a0"
display: flex;
}
gap: 10px;
 
justify-content: center;
.plainlist ol,.plainlist ul {
flex-grow: 1;  
line-height: inherit;
align-items: flex-start;  
list-style: none none;
flex-wrap: wrap;
margin: 0
align-content: center;
}
 
.plainlist ol li,.plainlist ul li {
margin-bottom: 0
}
}


@media (max-width: 800px) {
@media (max-width: 800px) {
.grid-adaptive {
.link-card__flex-container {
grid-template-columns: 1fr !important;
gap: 8px;
}
}
}
}


.grid-item-adaptive {
/* Удаление верхних и нижних отступов для первого и последнего дочернего элемента */
display: grid;
.no-margin-edges > :first-child,
gap: 8px;
.tabs-content > :first-child,
grid-template-columns: repeat(auto-fit, minmax(clamp(200px, 30vw, 300px), 1fr));
.doc > :first-child {
margin-top: 0 !important;
}
}


.grid-big-item-adaptive {
.no-margin-edges > :last-child,
display: grid;
.tabs-content > :last-child,
gap: 10px;
.doc > :last-child {
grid-template-columns: repeat(auto-fit, minmax(clamp(200px, 30vw, 400px), 1fr));
margin-bottom: 0 !important;
}
}


.grid-small-item-adaptive {
/* Сброс и настройка отступов для списков */
display: grid;
.list-reset-margin ol {
gap: 8px;
margin: 0 0 0 24px;
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
padding: 0;
}
}


.grid-item-compressed {
.list-reset-margin > ol > li:not(:first-child),
display: grid;
.list-reset-margin > ul:nth-of-type(n+2) {
gap: 10px;
margin-top: 10px;
grid-template-columns: repeat(auto-fit, minmax(clamp(280px, 30vw, 350px), 0fr));
}
}


.grid-item-compressed {
/* Кнопка копирования текста */
display: grid;
.copy-icon {
gap: 10px;
cursor: pointer;
grid-template-columns: repeat(auto-fit, minmax(clamp(280px, 30vw, 350px), 0fr));
}
}


.link-card__flex-container {
/* Кнопка копирования текста */
display: flex;  
.brightness-overlay::before {
gap: 10px;  
content: "";
justify-content: center;  
position: absolute;
flex-grow: 1;  
top: 0;
align-items: flex-start;  
left: 0;
flex-wrap: wrap;  
right: 0;
align-content: center;
bottom: 0;
z-index: -1;
background: var(--background-color);
}
}


@media (max-width: 800px) {
.link-card__flex-container {
gap: 8px;
}
}


/* Удаление верхних и нижних отступов для первого и последнего дочернего элемента */
/* Псевдоэлемент для добавления фона, который изменяет яркость при наведении */
.no-margin-edges > :first-child,
.tabs-content > :first-child,
.doc > :first-child {
margin-top: 0 !important;
}
 
.no-margin-edges > :last-child,
.tabs-content > :last-child,
.doc > :last-child {
margin-bottom: 0 !important;
}
 
/* Сброс и настройка отступов для списков */
.list-reset-margin ol {
margin: 0 0 0 24px;
padding: 0;
}
 
.list-reset-margin > ol > li:not(:first-child),
.list-reset-margin > ul:nth-of-type(n+2) {
margin-top: 10px;
}
 
/* Кнопка копирования текста */
.copy-icon {
cursor: pointer;
}
 
/* Кнопка копирования текста */
.brightness-overlay::before {
.brightness-overlay::before {
content: "";
content: "";
Строка 2595: Строка 2526:
right: 0;
right: 0;
bottom: 0;
bottom: 0;
z-index: -1;
z-index: 0;
background: var(--background-color);
background: var(--background-color);
}
}


.brightness-overlay:hover::before {
filter: brightness(105%);
}


/* Псевдоэлемент для добавления фона, который изменяет яркость при наведении */
/* Уменьшеная полоса прокрутки */
.brightness-overlay::before {
@media not all and (hover: none) and (pointer: coarse) {
content: "";
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 0;
background: var(--background-color);
}
 
.brightness-overlay:hover::before {
filter: brightness(105%);
}
 
/* Уменьшеная полоса прокрутки */
@media not all and (hover: none) and (pointer: coarse) {
body:not(.wgl-theme-light) .short-scrollbar::-webkit-scrollbar {  
body:not(.wgl-theme-light) .short-scrollbar::-webkit-scrollbar {  
width: 13px;
width: 13px;
Строка 3738: Строка 3656:


/* ============ */
/* ============ */
/* #region Меню настроек темы */
/* #region JS */
/* ============ */
/* ============ */


/* Переключатель проекта */
.js-project-menu {
display: inline-flex;
gap: 6px;
font-size: var(--font-size-s);
flex-wrap: wrap;
padding-bottom: 6px;
}
.js-project-menu label {
user-select: none;
-webkit-user-drag: none;
transition-property: background,box-shadow;
transition-duration: var(--transition-time);
cursor: pointer;
padding: 0.2em 0.4em;
font-weight: bold;
border-bottom: solid 2px var(--theme-text-color-dark);
border-radius: var(--border-radius-low) var(--border-radius-low) 0 0;
color: var(--theme-text-color-dark);
opacity: 0.75;
}
.js-project-menu input {
display: none;
}
.js-project-menu input:checked + label,
.js-project-menu label:hover {
opacity: 1;
}
.js-project-menu input:not(:checked) + label {
background: unset !important;
}
.js-project-menu input#project-Corvax + label {
color: var(--text-color-crimson);
border-bottom-color: var(--text-color-crimson);
background: var(--bg-color-pastel-red-dark);
}
.js-project-menu input#project-WL + label {
color: var(--text-color-dark-salmon);
border-bottom-color: var(--text-color-dark-salmon);
background: var(--bg-color-rust-dark);
}
.js-project-menu input#project-CM + label {
color: var(--text-color-turquoise);
border-bottom-color: var(--text-color-turquoise);
background: var(--bg-color-emerald-dark);
}
.js-project-menu input#project-Frontier + label {
color: var(--text-color-violet);
border-bottom-color: var(--text-color-violet);
background: var(--bg-color-violet-dark);
}
.js-project-menu input#project-Fallout + label {
color: var(--text-color-silver);
border-bottom-color: var(--text-color-silver);
background: var(--bg-color-grey-dark);
}
.js-project-menu input#project-SW + label {
color: var(--text-color-crimson);
border-bottom-color: var(--text-color-crimson);
background: var(--bg-color-pastel-red-dark);
}
.js-project-menu input#project-Wega + label {
color: var(--text-color-pink);
border-bottom-color: var(--text-color-pink);
background: var(--bg-color-pink-dark);
}
.js-project-menu input#project-Goob + label {
color: var(--text-color-blue);
border-bottom-color: var(--text-color-blue);
background: var(--bg-color-blue-dark);
}
@media screen and (max-width: 850px) {
.js-project-menu {
font-size: var(--font-size-xs);
}
}
/* Меню настроек темы */
.theme-dropdown {
.theme-dropdown {
position: relative;
position: relative;