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

Страница интерфейса MediaWiki
Нет описания правки
Нет описания правки
Строка 1: Строка 1:
:root {
.chem-container {
    --width-layout: 100vw;
  display: flex;
    --card-bg: #2b2b2b;
  flex-wrap: wrap;
    --header-bg: #333;
  gap: 20px;
    --recipe-bg: #3a3a3a;
  justify-content: flex-start;
    --section-bg: transparent;
}
    --border-color: #555;
 
    --accent-color: #ffd;
.infoblock {
    --text-color: #e0e0e0;
  background: #f5f5f7;
    --subtext-color: #ccc;
  border-radius: 12px;
  }
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  padding: 16px;
  width: calc((100% - 40px) / 3); /* 3 колонки с отступом */
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: #222;
  transition: box-shadow 0.3s ease;
}
 
.infoblock:hover {
  box-shadow: 0 6px 18px rgba(0,0,0,0.15);
}
 
.header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 1.2em;
  font-weight: 700;
}
 
.title {
  user-select: none;
}
 
.content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
 
.recipe-block {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
 
.materials, .action, .result {
  background: #ffffff;
  padding: 10px 14px;
  border-radius: 8px;
  flex: 1 1 30%;
  box-shadow: inset 0 0 4px rgba(0,0,0,0.05);
}


  .infoblocks {
.section-title {
    column-count: 3;
  font-weight: 600;
    column-gap: 1.5em;
  margin-bottom: 6px;
    padding: 2em;
  color: #444;
    max-width: var(--width-layout);
}
    margin: 0 auto;
  }


  .infoblock {
.materials ul, .result ul, .section ul {
    background: var(--card-bg);
  margin: 0;
    color: var(--text-color);
  padding-left: 18px;
    border: 1px solid var(--border-color);
}
    border-radius: 8px;
    display: inline-block;
    width: 100%;
    margin-bottom: 1.5em;
    break-inside: avoid;
  }


  .infoblock .header {
.action {
    display: flex;
  display: flex;
    align-items: center;
  align-items: center;
    padding: 0.75em 1em;
  justify-content: center;
    background: var(--header-bg);
   font-weight: 600;
    border-bottom: 1px solid var(--border-color);
   font-size: 1em;
   }
  color: #555;
  .infoblock .header img { width: 24px; margin-right: 0.5em; }
}
   .infoblock .header .title { font-weight: bold; font-size: 1.2em; }


  .infoblock .content {
.action span {
    padding: 1em;
  margin-left: 6px;
    display: flex;
  user-select: none;
    flex-direction: column;
}
  }


  .recipe-block {
.section {
    display: flex;
  background: #ffffff;
    flex-direction: row;
  padding: 10px 14px;
    justify-content: space-between;
  border-radius: 8px;
    align-items: flex-start;
  box-shadow: inset 0 0 4px rgba(0,0,0,0.05);
    gap: 0.75em;
}
    padding: 0.5em 0.75em;
    background: var(--recipe-bg);
    border-radius: 6px;
    margin-bottom: 1em;
  }


  .materials, .result {
.section ul li {
    flex: 1;
  margin-bottom: 4px;
  }
}


  .materials .section-title,
/* Мобильная адаптация */
  .result .section-title {
    font-weight: bold;
    font-size: 0.95em;
    color: var(--accent-color);
    margin-bottom: 0.3em;
  }
  .materials ul,
  .result ul {
    margin: 0;
    padding: 0 0 0 1.2em;
  }
  .materials li,
  .result li {
    font-size: 0.9em;
    line-height: 1.3;
  }


  .action {
@media (max-width: 960px) {
    text-align: center;
   .infoblock {
    color: var(--subtext-color);
     width: calc((100% - 20px) / 2); /* 2 колонки */
    font-size: 0.85em;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0 0.5em;
  }
   .action img {
     width: 20px;
    margin-bottom: 0.2em;
   }
   }
}


  .section {
@media (max-width: 600px) {
    margin-bottom: 1em;
   .infoblock {
    background: var(--section-bg);
     width: 100%; /* 1 колонка */
  }
  .section-title {
    font-weight: bold;
    font-size: 1em;
    color: var(--subtext-color);
    margin-bottom: 0.5em;
  }
   .section ul {
     margin: 0;
    padding-left: 1.4em;
   }
   }
  .section ul li { margin-bottom: 0.4em; }
}

Версия от 12:57, 3 июля 2025

.chem-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: flex-start;
}

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

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

.header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 1.2em;
  font-weight: 700;
}

.title {
  user-select: none;
}

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

.recipe-block {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.materials, .action, .result {
  background: #ffffff;
  padding: 10px 14px;
  border-radius: 8px;
  flex: 1 1 30%;
  box-shadow: inset 0 0 4px rgba(0,0,0,0.05);
}

.section-title {
  font-weight: 600;
  margin-bottom: 6px;
  color: #444;
}

.materials ul, .result ul, .section ul {
  margin: 0;
  padding-left: 18px;
}

.action {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1em;
  color: #555;
}

.action span {
  margin-left: 6px;
  user-select: none;
}

.section {
  background: #ffffff;
  padding: 10px 14px;
  border-radius: 8px;
  box-shadow: inset 0 0 4px rgba(0,0,0,0.05);
}

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

/* Мобильная адаптация */

@media (max-width: 960px) {
  .infoblock {
    width: calc((100% - 20px) / 2); /* 2 колонки */
  }
}

@media (max-width: 600px) {
  .infoblock {
    width: 100%; /* 1 колонка */
  }
}