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

Страница интерфейса MediaWiki
Нет описания правки
Нет описания правки
 
(не показаны 44 промежуточные версии этого же участника)
Строка 1: Строка 1:
:root {
body:before {
  --width-layout: 100vw;
    content: "";
  --card-padding: 12px;
    position: fixed;
  --gap: 14px;
    top: 0;
  --primary-bg: #1a1a1a;
    left: 0;
  --secondary-bg: #2a2a2a;
    right: 0;
  --text-color: #e0e0e0;
    bottom: 0;
  --subtext-color: #b0b0b0;
    background-image: url("https://upload.wikimedia.org/wikipedia/commons/3/36/Snowflakes_falling_transparent.gif");
  --border-color: #444444;
    background-repeat: repeat;
  --shadow-color: rgba(0, 0, 0, 0.4);
    pointer-events: none;
  --header-bg: #333333;
    opacity: 0.35;
  --accent-color: #76c7c0;
    z-index: 2;
  --recipe-bg: #222222;
    animation: snowmove 60s linear infinite;
}
}


body {
@keyframes snowmove {
  font-family: sans-serif;
    from { background-position: 0 0; }
  margin: 0;
    to { background-position: 500px 1000px; }
  padding: 0;
  color: var(--text-color);
  font-size: 14px;
}
}


.action span {
h1, h2, h3, h4, h5 {
  position: relative;
    text-shadow: 0 0 6px rgba(179, 229, 252, 0.7), 0 0 12px rgba(179, 229, 252, 0.4);
  top: 10px;
    transition: text-shadow 0.3s;
  margin-left: 0;
}
}


.chem-container {
h1:hover, h2:hover, h3:hover, h4:hover, h5:hover {
  display: flex;
    text-shadow: 0 0 12px rgba(179, 229, 252, 0.9), 0 0 20px rgba(179, 229, 252, 0.6);
  flex-wrap: wrap;
  gap: var(--gap);
  justify-content: flex-start;
  max-width: 100%;
  overflow-x: hidden;
  margin: 0 auto;
  padding: 14px;
  box-sizing: border-box;
}
}


.infoblock {
a, a:visited {
  display: flex;
    transition: color 0.3s, text-shadow 0.3s;
  flex-direction: column;
  width: calc((100% - 3 * var(--gap)) / 4);
  margin: 10px 0;
  padding: var(--card-padding);
  background: var(--primary-bg);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  box-shadow: 0 1px 6px var(--shadow-color);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text-color);
  transition: box-shadow 0.3s ease, background-color 0.3s ease;
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
}
}


.infoblock:hover {
a:hover {
  box-shadow: 0 4px 12px var(--shadow-color);
    color: #b3e5fc !important;
    text-shadow: 0 0 6px #b3e5fc;
}
}


.header {
.wikitable {
  display: flex;
    border-color: rgba(179, 229, 252, 0.6) !important;
  align-items: center;
    border-radius: 6px;
  gap: 6px;
  margin-bottom: 10px;
  padding: 4px 10px;
  font-size: 1.1em;
  font-weight: 700;
  background: var(--header-bg);
  border-radius: 6px;
  color: var(--accent-color);
  user-select: none;
}
}


.title {
.wikitable th {
  font-weight: bold;
    background: rgba(179, 229, 252, 0.1);
  user-select: none;
}
}


.content {
.mw-page-title-main:before {
  flex-grow: 1;
    content: " ";
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}
}


.recipe-block {
.mw-page-title-main:after {
  display: flex;
     content: " ";
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding: 10px;
  background-color: var(--recipe-bg);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  min-width: 0;
  max-width: 100%;
}
 
.materials,
.result,
.action {
  background: var(--secondary-bg);
  border-radius: 6px;
  box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.1);
  color: var(--text-color);
  font-size: 0.9em;
  padding: 8px 12px;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  text-align: left;
  min-width: 0;
  max-width: 100%;
  flex-shrink: 1;
  flex-direction: column;
}
 
.materials div,
.result div {
  display: flex;
  justify-content: flex-start; /* выравниваем содержимое слева */
  align-items: center;
  padding: 2px 0;
  line-height: 1.3;
  width: 100%;
  box-sizing: border-box;
}
 
.mat-name {
  font-weight: bold;
  flex-grow: 1; /* название занимает всё доступное пространство */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
 
.mat-qty {
  color: var(--subtext-color);
  font-size: 0.95em;
  width: 40px;      /* фиксированная ширина */
  text-align: right; /* цифры прижаты к правому краю блока */
  flex-shrink: 0;    /* не сжимается */
  margin-left: 12px;
  box-sizing: border-box;
}
 
.action {
  flex: 0 0 auto;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: 100;
  color: var(--subtext-color);
  user-select: none;
  cursor: default;
  line-height: 1;
  margin-top: 4px;
}
 
.action span {
  margin: 0;
}
 
.section {
  background: var(--secondary-bg);
  padding: 8px 10px;
  border-radius: 6px;
  box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.1);
  color: var(--text-color);
  font-size: 0.85em;
  margin-top: 16px;
}
 
.section-title {
  font-weight: bold;
  margin-bottom: 4px;
}
 
@media (max-width: 1200px) {
  .infoblock {
     width: calc((100% - 2 * var(--gap)) / 3);
  }
}
 
@media (max-width: 960px) {
  .infoblock {
    width: calc((100% - var(--gap)) / 2);
  }
}
 
@media (max-width: 600px) {
  .infoblock {
    width: 100%;
  }
 
  .recipe-block {
    flex-wrap: wrap;
  }
 
  .materials,
  .result,
  .action {
    flex: 1 1 100%;
    margin-top: 6px;
  }
 
  .action {
    margin-top: 6px;
  }
}
}

Текущая версия от 08:23, 13 ноября 2025

body:before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("https://upload.wikimedia.org/wikipedia/commons/3/36/Snowflakes_falling_transparent.gif");
    background-repeat: repeat;
    pointer-events: none;
    opacity: 0.35;
    z-index: 2;
    animation: snowmove 60s linear infinite;
}

@keyframes snowmove {
    from { background-position: 0 0; }
    to { background-position: 500px 1000px; }
}

h1, h2, h3, h4, h5 {
    text-shadow: 0 0 6px rgba(179, 229, 252, 0.7), 0 0 12px rgba(179, 229, 252, 0.4);
    transition: text-shadow 0.3s;
}

h1:hover, h2:hover, h3:hover, h4:hover, h5:hover {
    text-shadow: 0 0 12px rgba(179, 229, 252, 0.9), 0 0 20px rgba(179, 229, 252, 0.6);
}

a, a:visited {
    transition: color 0.3s, text-shadow 0.3s;
}

a:hover {
    color: #b3e5fc !important;
    text-shadow: 0 0 6px #b3e5fc;
}

.wikitable {
    border-color: rgba(179, 229, 252, 0.6) !important;
    border-radius: 6px;
}

.wikitable th {
    background: rgba(179, 229, 252, 0.1);
}

.mw-page-title-main:before {
    content: " ";
}

.mw-page-title-main:after {
    content: " ";
}