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

Страница интерфейса MediaWiki
Нет описания правки
Нет описания правки
Строка 1: Строка 1:
/* Основной стиль для карточек рецептов */
.recipe-card {
.recipe-card {
   width: 100%;
   width: 100%;
   max-width: 340px; /* Немного увеличил максимальную ширину */
   max-width: 340px;
  margin: 1em auto;
  padding: 1rem;
   box-sizing: border-box;
   box-sizing: border-box;
  padding: 1rem;
  margin: 1em auto;
   background-color: #2a2a2a;
   background-color: #2a2a2a;
   border: 2px solid;
   border: 2px solid #4fc3f7;
   border-radius: 8px; /* Увеличил радиус скругления */
   border-radius: 8px;
   color: #f5f5f5;
   color: #f5f5f5;
   font-size: 15px; /* Увеличил базовый размер шрифта */
   font-size: 15px;
   box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); /* Более выраженная тень */
   box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
   transition: transform 0.2s ease; /* Добавил анимацию при наведении */
   transition: transform 0.2s ease;
}
}


.recipe-card:hover {
.recipe-card:hover {
   transform: translateY(-2px); /* Эффект поднятия при наведении */
   transform: translateY(-2px);
}
 
/* Анимация для раскрытия контента */
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
}


/* Стиль для блоков с контентом */
.collapsible-block {
.collapsible-block {
   margin-bottom: 1.2rem;
   margin-bottom: 1.2rem;
  position: relative;
}
}


/* Заголовок карточки */
.collapsible-header {
.collapsible-header {
   background-color: #37474f; /* Изменил цвет фона */
   background-color: #37474f;
  border: none;
  font-weight: 600; /* Более умеренное начертание */
   color: #81d4fa;
   color: #81d4fa;
  font-weight: 600;
   text-transform: uppercase;
   text-transform: uppercase;
  cursor: pointer;
   border-radius: 6px;
   border-radius: 6px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
   padding: 0.8rem 1.2rem;
   padding: 0.8rem 1.2rem;
  cursor: pointer;
   display: flex;
   display: flex;
   align-items: center;
   align-items: center;
   gap: 12px; /* Современный способ отступов между элементами */
   gap: 12px;
  transition: background 0.3s ease;
}
 
.collapsible-header:hover {
  background-color: #455a64;
  color: #b3e5fc;
}
}


/* Иконка спрайта */
.sprite {
.collapsible-header .sprite {
   width: 28px;
   width: 28px;
   height: 28px;
   height: 28px;
   background-image: url('path_to_beaker_image.png');
   background-image: url('Beaker.png');
   background-size: contain;
   background-size: contain;
  background-repeat: no-repeat;
   transition: transform 0.2s ease;
   transition: transform 0.2s ease;
}
/* Ховер-эффекты */
.collapsible-header:hover {
  background-color: #455a64;
  color: #b3e5fc;
}
}


.collapsible-header:hover .sprite {
.collapsible-header:hover .sprite {
   transform: scale(1.1); /* Анимация иконки при наведении */
   transform: scale(1.1);
}
}


/* Контент карточки */
.collapsible-content {
.collapsible-content {
  margin-top: 1rem;
  padding-left: 1.8rem;
  border-left: 3px solid; /* Более толстая линия */
   overflow: hidden;
   overflow: hidden;
   max-height: 0;
   max-height: 0;
   opacity: 0;
   opacity: 0;
   transition:  
  margin-top: 0;
    max-height 0.35s ease-out,
   transition: max-height 0.35s ease-out, opacity 0.3s ease-out;
    opacity 0.3s ease-out,
  border-left: 3px solid #4fc3f7;
    padding 0.3s ease-out;
  padding-left: 1.8rem;
}
}


/* Активное состояние */
.collapsible-content.active {
.collapsible-content.active {
   max-height: 500px;
   max-height: 500px;
   opacity: 1;
   opacity: 1;
   padding: 0.8rem 0 0.8rem 1.8rem;
   margin-top: 1rem;
  animation: slideDown 0.4s ease-out;
}
}


/* Списки */
.recipe-list, .effect-list {
.recipe-list, .collapsible-content ul {
   list-style: none;
   list-style: none;
  margin: 0;
   padding: 0;
   padding: 0;
  margin: 0;
   display: grid;
   display: grid;
   gap: 8px; /* Управление отступами между элементами */
   gap: 8px;
}
}


.recipe-list li {
.recipe-list li, .effect-list li {
   display: flex;
   display: flex;
   align-items: center;
   align-items: center;
   gap: 6px;
   gap: 6px;
   padding: 6px 0;
   padding: 6px 0;
   border-bottom: 1px solid #37474f; /* Разделители между элементами */
   border-bottom: 1px solid #37474f;
  position: relative;
  padding-left: 24px;
}
 
.effect-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: #4fc3f7;
  font-size: 1.4em;
  line-height: 0.8;
}
 
.chem-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  filter: drop-shadow(0 0 2px #4fc3f7);
}
}


/* Элемент инструкции */
.instruction {
.instruction {
   color: #81d4fa; /* Соответствует основной цветовой схеме */
   color: #81d4fa;
   font-weight: 600;
   font-weight: 600;
   font-size: 15px;
   font-size: 15px;
  background: rgba(129, 212, 250, 0.1);
  border-radius: 4px;
   padding: 8px 12px;
   padding: 8px 12px;
  background: rgba(129, 212, 250, 0.1); /* Подсветка фона */
  border-radius: 4px;
  margin: 12px 0;
  display: inline-flex;
  align-items: center;
}
}


Строка 124: Строка 119:
}
}


/* Описание рецепта */
.recipe-description {
.recipe-description {
   margin-top: 1.2rem;
   margin-top: 1.2rem;
Строка 132: Строка 126:
   font-size: 14px;
   font-size: 14px;
   line-height: 1.5;
   line-height: 1.5;
   color: #cfd8dc; /* Более светлый цвет текста */
   color: #cfd8dc;
   border-left: 3px solid #4fc3f7; /* Акцентная полоса */
   border-left: 3px solid #4fc3f7;
}
 
/* Эффекты */
.collapsible-content ul li {
  position: relative;
  padding-left: 24px;
}
}


.collapsible-content ul li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: #4fc3f7;
  font-size: 1.4em;
  line-height: 0.8;
}
/* Адаптивность */
@media (max-width: 480px) {
@media (max-width: 480px) {
   .recipe-card {
   .recipe-card {
Строка 157: Строка 135:
     padding: 0.8rem;
     padding: 0.8rem;
   }
   }
 
   .collapsible-header {
   .collapsible-header {
     padding: 0.6rem 1rem;
     padding: 0.6rem 1rem;
   }
   }
 
   .instruction {
   .instruction {
     font-size: 14px;
     font-size: 14px;
   }
   }
}
.collapsible-content {
  overflow-anchor: none;
}
.chem-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  filter: drop-shadow(0 0 2px #4fc3f7);
}
}

Версия от 17:47, 5 мая 2025

.recipe-card {
  width: 100%;
  max-width: 340px;
  margin: 1em auto;
  padding: 1rem;
  box-sizing: border-box;
  background-color: #2a2a2a;
  border: 2px solid #4fc3f7;
  border-radius: 8px;
  color: #f5f5f5;
  font-size: 15px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease;
}

.recipe-card:hover {
  transform: translateY(-2px);
}

.collapsible-block {
  margin-bottom: 1.2rem;
}

.collapsible-header {
  background-color: #37474f;
  color: #81d4fa;
  font-weight: 600;
  text-transform: uppercase;
  border-radius: 6px;
  padding: 0.8rem 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: background 0.3s ease;
}

.collapsible-header:hover {
  background-color: #455a64;
  color: #b3e5fc;
}

.sprite {
  width: 28px;
  height: 28px;
  background-image: url('Beaker.png');
  background-size: contain;
  background-repeat: no-repeat;
  transition: transform 0.2s ease;
}

.collapsible-header:hover .sprite {
  transform: scale(1.1);
}

.collapsible-content {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  margin-top: 0;
  transition: max-height 0.35s ease-out, opacity 0.3s ease-out;
  border-left: 3px solid #4fc3f7;
  padding-left: 1.8rem;
}

.collapsible-content.active {
  max-height: 500px;
  opacity: 1;
  margin-top: 1rem;
}

.recipe-list, .effect-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.recipe-list li, .effect-list li {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 0;
  border-bottom: 1px solid #37474f;
  position: relative;
  padding-left: 24px;
}

.effect-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: #4fc3f7;
  font-size: 1.4em;
  line-height: 0.8;
}

.chem-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  filter: drop-shadow(0 0 2px #4fc3f7);
}

.instruction {
  color: #81d4fa;
  font-weight: 600;
  font-size: 15px;
  background: rgba(129, 212, 250, 0.1);
  border-radius: 4px;
  padding: 8px 12px;
}

.instruction::before {
  content: '➤';
  margin-right: 8px;
  color: #4fc3f7;
}

.recipe-description {
  margin-top: 1.2rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.5;
  color: #cfd8dc;
  border-left: 3px solid #4fc3f7;
}

@media (max-width: 480px) {
  .recipe-card {
    font-size: 14px;
    padding: 0.8rem;
  }
  .collapsible-header {
    padding: 0.6rem 1rem;
  }
  .instruction {
    font-size: 14px;
  }
}