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

Страница интерфейса MediaWiki
Нет описания правки
Нет описания правки
Строка 1: Строка 1:
:root {
:root {
   --width-layout: 100vw;
   --width-layout: 100vw;
   --card-padding: 16px;
   --card-padding: 12px;
   --gap: 20px;
   --gap: 14px;
 
   --primary-bg: #1a1a1a;
   --primary-bg: #1a1a1a;
   --secondary-bg: #2a2a2a;
   --secondary-bg: #2a2a2a;
Строка 20: Строка 19:
   padding: 0;
   padding: 0;
   color: var(--text-color);
   color: var(--text-color);
  font-size: 14px;
}
.action span {
  position: relative;
  top: 10px;
  margin-left: 0;
}
}


Строка 30: Строка 36:
   overflow-x: hidden;
   overflow-x: hidden;
   margin: 0 auto;
   margin: 0 auto;
   padding: 20px;
   padding: 14px;
   box-sizing: border-box;
   box-sizing: border-box;
}
}
Строка 38: Строка 44:
   flex-direction: column;
   flex-direction: column;
   width: calc((100% - 3 * var(--gap)) / 4);
   width: calc((100% - 3 * var(--gap)) / 4);
   margin: 15px 0;
   margin: 10px 0;
   padding: var(--card-padding);
   padding: var(--card-padding);
   background: var(--primary-bg);
   background: var(--primary-bg);
   border: 1px solid var(--border-color);
   border: 1px solid var(--border-color);
   border-radius: 12px;
   border-radius: 10px;
   box-shadow: 0 2px 8px var(--shadow-color);
   box-shadow: 0 1px 6px var(--shadow-color);
   font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
   font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
   color: var(--text-color);
   color: var(--text-color);
Строка 53: Строка 59:


.infoblock:hover {
.infoblock:hover {
   box-shadow: 0 6px 18px var(--shadow-color);
   box-shadow: 0 4px 12px var(--shadow-color);
}
}


Строка 59: Строка 65:
   display: flex;
   display: flex;
   align-items: center;
   align-items: center;
   gap: 8px;
   gap: 6px;
   margin-bottom: 12px;
   margin-bottom: 10px;
   padding: 6px 12px;
   padding: 4px 10px;
   font-size: 1.2em;
   font-size: 1.1em;
   font-weight: 700;
   font-weight: 700;
   background: var(--header-bg);
   background: var(--header-bg);
   border-radius: 8px;
   border-radius: 6px;
   color: var(--accent-color);
   color: var(--accent-color);
   user-select: none;
   user-select: none;
Строка 71: Строка 77:


.title {
.title {
  color: #ff4d4d;
   font-weight: bold;
   font-weight: bold;
   user-select: none;
   user-select: none;
}
.infoblock img,
.header img,
.action img {
  width: 24px;
  height: auto;
  margin-right: 5px;
}
}


Строка 88: Строка 85:
   display: flex;
   display: flex;
   flex-direction: column;
   flex-direction: column;
   gap: 14px;
   gap: 10px;
   margin-bottom: 20px;
   margin-bottom: 16px;
}
}


Строка 96: Строка 93:
   flex-wrap: nowrap;
   flex-wrap: nowrap;
   align-items: center;
   align-items: center;
   gap: 12px;
   gap: 10px;
   margin-bottom: 12px;
   margin-bottom: 10px;
   padding: 15px;
   padding: 10px;
   background-color: var(--recipe-bg);
   background-color: var(--recipe-bg);
   border: 1px solid var(--border-color);
   border: 1px solid var(--border-color);
   border-radius: 8px;
   border-radius: 6px;
   min-width: 0;
   min-width: 0;
   max-width: 100%;
   max-width: 100%;
Строка 110: Строка 107:
.action {
.action {
   background: var(--secondary-bg);
   background: var(--secondary-bg);
   border-radius: 8px;
   border-radius: 6px;
   box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.1);
   box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.1);
   color: var(--text-color);
   color: var(--text-color);
   font-size: 0.95em;
   font-size: 0.9em;
  overflow-wrap: break-word;
   padding: 8px 12px;
   padding: 12px 16px;
   display: flex;
   display: flex;
   justify-content: center;
   justify-content: flex-start;
   align-items: center;
   align-items: center;
   text-align: center;
   text-align: left;
   min-width: 0;
   min-width: 0;
   max-width: 100%;
   max-width: 100%;
   flex-shrink: 1;
   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;
}
}


.materials,
.mat-name {
.result {
  font-weight: bold;
   flex: 1 1 40%;
  flex-grow: 1; /* название занимает всё доступное пространство */
   flex-direction: column;
  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;
}
}


Строка 136: Строка 156:
   display: flex;
   display: flex;
   justify-content: center;
   justify-content: center;
   align-items: flex-start;
   align-items: center;
   font-weight: 100;
   font-weight: 100;
   color: var(--subtext-color);
   color: var(--subtext-color);
Строка 142: Строка 162:
   cursor: default;
   cursor: default;
   line-height: 1;
   line-height: 1;
   min-width: 0;
   margin-top: 4px;
  max-width: 100%;
}
}


.action span {
.action span {
  position: relative;
   margin: 0;
  top: 10px;
   margin-left: 0;
}
}


.section {
.section {
   background: var(--secondary-bg);
   background: var(--secondary-bg);
   padding: 10px 14px;
   padding: 8px 10px;
   border-radius: 8px;
   border-radius: 6px;
   box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.1);
   box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.1);
   color: var(--text-color);
   color: var(--text-color);
   font-size: 0.9em;
   font-size: 0.85em;
   margin-top: 20px;
   margin-top: 16px;
}
}


.section-title {
.section-title {
   font-weight: bold;
   font-weight: bold;
  margin-bottom: 5px;
}
.section ul {
  list-style-type: disc;
  padding-left: 20px;
}
.section ul li {
   margin-bottom: 4px;
   margin-bottom: 4px;
}
}
Строка 201: Строка 209:
   .action {
   .action {
     flex: 1 1 100%;
     flex: 1 1 100%;
     margin-top: 8px;
     margin-top: 6px;
   }
   }


   .action {
   .action {
     margin-top: 8px;
     margin-top: 6px;
   }
   }
}
}

Версия от 04:49, 9 июля 2025

:root {
  --width-layout: 100vw;
  --card-padding: 12px;
  --gap: 14px;
  --primary-bg: #1a1a1a;
  --secondary-bg: #2a2a2a;
  --text-color: #e0e0e0;
  --subtext-color: #b0b0b0;
  --border-color: #444444;
  --shadow-color: rgba(0, 0, 0, 0.4);
  --header-bg: #333333;
  --accent-color: #76c7c0;
  --recipe-bg: #222222;
}

body {
  font-family: sans-serif;
  margin: 0;
  padding: 0;
  color: var(--text-color);
  font-size: 14px;
}

.action span {
  position: relative;
  top: 10px;
  margin-left: 0;
}

.chem-container {
  display: flex;
  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 {
  display: flex;
  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 {
  box-shadow: 0 4px 12px var(--shadow-color);
}

.header {
  display: flex;
  align-items: center;
  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 {
  font-weight: bold;
  user-select: none;
}

.content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.recipe-block {
  display: flex;
  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;
  }
}