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

Страница интерфейса MediaWiki
Нет описания правки
Нет описания правки
Строка 1: Строка 1:
:root {
:root {
--width-layout: 100vw;
  --width-layout: 100vw;
--card-bg: #2b2b2b;
  --card-bg: #f5f5f7;
--header-bg: #333;
  --header-bg: #ddd;
--recipe-bg: #3a3a3a;
  --recipe-bg: #e5e5e5;
--section-bg: transparent;
  --section-bg: transparent;
--border-color: #555;
  --border-color: #ccc;
--accent-color: #ffd;
  --accent-color: #995500;
--text-color: #e0e0e0;
  --text-color: #222;
--subtext-color: #ccc;
  --subtext-color: #555;
  --shadow-color: rgba(0,0,0,0.1);
}
 
@media (prefers-color-scheme: dark) {
  :root {
    --card-bg: #2b2b2b;
    --header-bg: #333;
    --recipe-bg: #3a3a3a;
    --section-bg: transparent;
    --border-color: #555;
    --accent-color: #ffd;
    --text-color: #e0e0e0;
    --subtext-color: #ccc;
    --shadow-color: rgba(0,0,0,0.5);
  }
}
}


Строка 16: Строка 31:
   gap: 20px;
   gap: 20px;
   justify-content: flex-start;
   justify-content: flex-start;
  max-width: var(--width-layout);
  margin: 0 auto;
  padding: 10px;
  box-sizing: border-box;
}
}


.infoblock {
.infoblock {
   background: #f5f5f7;
   background: var(--card-bg);
   border-radius: 12px;
   border-radius: 12px;
   box-shadow: 0 2px 8px rgba(0,0,0,0.1);
   box-shadow: 0 2px 8px var(--shadow-color);
   padding: 16px;
   padding: 16px;
   width: calc((100% - 40px) / 3); /* 3 колонки с отступом */
   width: calc((100% - 40px) / 3);
   box-sizing: border-box;
   box-sizing: border-box;
   display: flex;
   display: flex;
   flex-direction: column;
   flex-direction: column;
   font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
   font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
   color: #222;
   color: var(--text-color);
   transition: box-shadow 0.3s ease;
   transition: box-shadow 0.3s ease, background-color 0.3s ease;
  border: 1px solid var(--border-color);
}
}


.infoblock:hover {
.infoblock:hover {
   box-shadow: 0 6px 18px rgba(0,0,0,0.15);
   box-shadow: 0 6px 18px var(--shadow-color);
}
}


Строка 43: Строка 63:
   font-size: 1.2em;
   font-size: 1.2em;
   font-weight: 700;
   font-weight: 700;
  background: var(--header-bg);
  padding: 6px 12px;
  border-radius: 8px;
  user-select: none;
  color: var(--accent-color);
}
}


Строка 55: Строка 80:
   gap: 14px;
   gap: 14px;
}
}


.recipe-block {
.recipe-block {
Строка 61: Строка 85:
   gap: 12px;
   gap: 12px;
   flex-wrap: nowrap;
   flex-wrap: nowrap;
   align-items: center; /* выравнивание по вертикали */
   align-items: center;
   margin-bottom: 12px;
   margin-bottom: 12px;
}
}


.materials, .result {
.materials, .result {
   background: #ffffff;
   background: var(--recipe-bg);
   padding: 12px 16px;
   padding: 12px 16px;
   border-radius: 8px;
   border-radius: 8px;
   box-shadow: inset 0 0 4px rgba(0,0,0,0.05);
   box-shadow: inset 0 0 4px rgba(0,0,0,0.1);
   flex: 1 1 40%; /* чуть шире */
   flex: 1 1 40%;
  color: var(--text-color);
  font-size: 0.95em;
  overflow-wrap: break-word;
}
}


.action {
.action {
   background: #ffffff;
   background: var(--recipe-bg);
   padding: 12px 20px;
   padding: 12px 20px;
   border-radius: 8px;
   border-radius: 8px;
   box-shadow: inset 0 0 4px rgba(0,0,0,0.05);
   box-shadow: inset 0 0 4px rgba(0,0,0,0.1);
   flex: 0 0 120px; /* фиксированная ширина */
   flex: 0 0 120px;
   display: flex;
   display: flex;
   justify-content: center;
   justify-content: center;
   align-items: center;
   align-items: center;
   font-weight: 600;
   font-weight: 600;
   color: #555;
   color: var(--subtext-color);
   user-select: none;
   user-select: none;
   cursor: default;
   cursor: default;
Строка 91: Строка 118:
   margin-left: 8px;
   margin-left: 8px;
}
}


.section {
.section {
   background: #ffffff;
   background: var(--recipe-bg);
   padding: 10px 14px;
   padding: 10px 14px;
   border-radius: 8px;
   border-radius: 8px;
   box-shadow: inset 0 0 4px rgba(0,0,0,0.05);
   box-shadow: inset 0 0 4px rgba(0,0,0,0.1);
  color: var(--text-color);
  font-size: 0.9em;
}
 
.section ul {
  padding-left: 18px;
}
}


Строка 103: Строка 135:
   margin-bottom: 4px;
   margin-bottom: 4px;
}
}
/* Мобильная адаптация */


@media (max-width: 960px) {
@media (max-width: 960px) {
   .infoblock {
   .infoblock {
     width: calc((100% - 20px) / 2); /* 2 колонки */
     width: calc((100% - 20px) / 2);
   }
   }
}
}
Строка 114: Строка 144:
@media (max-width: 600px) {
@media (max-width: 600px) {
   .infoblock {
   .infoblock {
     width: 100%; /* 1 колонка */
     width: 100%;
  }
  .recipe-block {
    flex-wrap: wrap;
  }
  .materials, .result, .action {
    flex: 1 1 100%;
  }
  .action {
    margin-top: 8px;
   }
   }
}
}

Версия от 14:17, 3 июля 2025

:root {
  --width-layout: 100vw;
  --card-bg: #f5f5f7;
  --header-bg: #ddd;
  --recipe-bg: #e5e5e5;
  --section-bg: transparent;
  --border-color: #ccc;
  --accent-color: #995500;
  --text-color: #222;
  --subtext-color: #555;
  --shadow-color: rgba(0,0,0,0.1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --card-bg: #2b2b2b;
    --header-bg: #333;
    --recipe-bg: #3a3a3a;
    --section-bg: transparent;
    --border-color: #555;
    --accent-color: #ffd;
    --text-color: #e0e0e0;
    --subtext-color: #ccc;
    --shadow-color: rgba(0,0,0,0.5);
  }
}

.chem-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: flex-start;
  max-width: var(--width-layout);
  margin: 0 auto;
  padding: 10px;
  box-sizing: border-box;
}

.infoblock {
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: 0 2px 8px var(--shadow-color);
  padding: 16px;
  width: calc((100% - 40px) / 3);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text-color);
  transition: box-shadow 0.3s ease, background-color 0.3s ease;
  border: 1px solid var(--border-color);
}

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

.header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 1.2em;
  font-weight: 700;
  background: var(--header-bg);
  padding: 6px 12px;
  border-radius: 8px;
  user-select: none;
  color: var(--accent-color);
}

.title {
  user-select: none;
}

.content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.recipe-block {
  display: flex;
  gap: 12px;
  flex-wrap: nowrap;
  align-items: center;
  margin-bottom: 12px;
}

.materials, .result {
  background: var(--recipe-bg);
  padding: 12px 16px;
  border-radius: 8px;
  box-shadow: inset 0 0 4px rgba(0,0,0,0.1);
  flex: 1 1 40%;
  color: var(--text-color);
  font-size: 0.95em;
  overflow-wrap: break-word;
}

.action {
  background: var(--recipe-bg);
  padding: 12px 20px;
  border-radius: 8px;
  box-shadow: inset 0 0 4px rgba(0,0,0,0.1);
  flex: 0 0 120px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: 600;
  color: var(--subtext-color);
  user-select: none;
  cursor: default;
}

.action span {
  margin-left: 8px;
}

.section {
  background: var(--recipe-bg);
  padding: 10px 14px;
  border-radius: 8px;
  box-shadow: inset 0 0 4px rgba(0,0,0,0.1);
  color: var(--text-color);
  font-size: 0.9em;
}

.section ul {
  padding-left: 18px;
}

.section ul li {
  margin-bottom: 4px;
}

@media (max-width: 960px) {
  .infoblock {
    width: calc((100% - 20px) / 2);
  }
}

@media (max-width: 600px) {
  .infoblock {
    width: 100%;
  }
  .recipe-block {
    flex-wrap: wrap;
  }
  .materials, .result, .action {
    flex: 1 1 100%;
  }
  .action {
    margin-top: 8px;
  }
}