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

Страница интерфейса MediaWiki
Нет описания правки
(Отмена правки 18783, сделанной Dantes (обсуждение))
Метка: отмена
Строка 2: Строка 2:
.recipe-card {
.recipe-card {
   width: 100%;
   width: 100%;
   max-width: 340px; /* Немного увеличил максимальную ширину */
   max-width: 320px;
   box-sizing: border-box;
   box-sizing: border-box;
   padding: 1rem;
   padding: 0.8em 1.2em;
   margin: 1em auto;
   margin: 1em auto;
  display: inline-block;
  vertical-align: top;
   background-color: #2a2a2a;
   background-color: #2a2a2a;
   border: 2px solid;
   border: 2px solid #444;
   border-radius: 8px; /* Увеличил радиус скругления */
   border-radius: 6px;
   color: #f5f5f5;
   color: #f5f5f5;
   font-size: 15px; /* Увеличил базовый размер шрифта */
   font-size: 14px;
   box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); /* Более выраженная тень */
   box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s ease; /* Добавил анимацию при наведении */
}
 
.recipe-card:hover {
  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: 1em;
  position: relative;
}
}


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


/* Иконка спрайта */
/* Спрайт для заголовка */
.collapsible-header .sprite {
.collapsible-header .sprite {
   width: 28px;
   width: 32px; /* Размер иконки */
   height: 28px;
   height: 32px;
   background-image: url('path_to_beaker_image.png');
   background-image: url('path_to_beaker_image.png'); /* Путь к изображению */
   background-size: contain;
   background-size: contain;
   transition: transform 0.2s ease;
   background-repeat: no-repeat;
  margin-right: 0.8em; /* Отступ от иконки */
}
}


/* Ховер-эффекты */
/* Ховер-эффект для заголовка */
.collapsible-header:hover {
.collapsible-header:hover {
   background-color: #455a64;
   background-color: #555;
   color: #b3e5fc;
   color: #b3e5fc;
}
.collapsible-header:hover .sprite {
  transform: scale(1.1); /* Анимация иконки при наведении */
}
}


/* Контент карточки */
/* Контент карточки */
.collapsible-content {
.collapsible-content {
   margin-top: 1rem;
  display: none;
   padding-left: 1.8rem;
   margin-top: 1em;
   border-left: 3px solid; /* Более толстая линия */
   padding-left: 1.5em;
   overflow: hidden;
   border-left: 2px solid #81d4fa;
   max-height: 0;
   font-size: 14px;
   opacity: 0;
   max-height: 200px;
   transition:  
   overflow-y: auto;
    max-height 0.35s ease-out,
   transition: max-height 0.3s ease;
    opacity 0.3s ease-out,
    padding 0.3s ease-out;
}
}


/* Активное состояние */
/* Показать контент при активной карточке */
.collapsible-content.active {
.collapsible-content.show {
  display: block;
   max-height: 500px;
   max-height: 500px;
  opacity: 1;
  padding: 0.8rem 0 0.8rem 1.8rem;
  animation: slideDown 0.4s ease-out;
}
}


/* Списки */
/* Описание рецепта */
.recipe-list, .collapsible-content ul {
.recipe-description {
   list-style: none;
   margin-top: 1em;
   padding: 0;
   font-size: 13px;
   margin: 0;
   color: #b0bec5;
  display: grid;
  gap: 8px; /* Управление отступами между элементами */
}
}


.recipe-list li {
/* Стиль для списка рецепта */
.recipe-list {
   display: flex;
   display: flex;
  justify-content: space-between;
   align-items: center;
   align-items: center;
   gap: 6px;
   list-style-type: none;
   padding: 6px 0;
   padding: 0;
   border-bottom: 1px solid #37474f; /* Разделители между элементами */
   margin: 0;
}
}


/* Элемент инструкции */
/* Стиль для элемента инструкции */
.instruction {
.instruction {
   color: #81d4fa; /* Соответствует основной цветовой схеме */
   color: #808080; /* Цвет для выделения действия */
   font-weight: 600;
   font-weight: bold;
   font-size: 15px;
   font-size: 16px; /* Увеличиваем размер шрифта */
  padding: 8px 12px;
   padding: 0 1em;
  background: rgba(129, 212, 250, 0.1); /* Подсветка фона */
  border-radius: 4px;
  margin: 12px 0;
  display: inline-flex;
  align-items: center;
}
 
.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; /* Акцентная полоса */
}
 
/* Эффекты */
.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) {
  .recipe-card {
    font-size: 14px;
    padding: 0.8rem;
  }
 
  .collapsible-header {
    padding: 0.6rem 1rem;
  }
 
  .instruction {
    font-size: 14px;
  }
}
}

Версия от 19:38, 3 мая 2025

/* Основной стиль для карточек рецептов */
.recipe-card {
  width: 100%;
  max-width: 320px;
  box-sizing: border-box;
  padding: 0.8em 1.2em;
  margin: 1em auto;
  display: inline-block;
  vertical-align: top;
  background-color: #2a2a2a;
  border: 2px solid #444;
  border-radius: 6px;
  color: #f5f5f5;
  font-size: 14px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

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

/* Заголовок карточки */
.collapsible-header {
  background-color: #444;
  border: none;
  font-weight: bold;
  color: #81d4fa;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.3s ease, color 0.3s ease;
  padding: 0.6em 1em;
  display: flex;
  align-items: center; /* Размещаем спрайт и текст в ряд */
}

/* Спрайт для заголовка */
.collapsible-header .sprite {
  width: 32px; /* Размер иконки */
  height: 32px;
  background-image: url('path_to_beaker_image.png'); /* Путь к изображению */
  background-size: contain;
  background-repeat: no-repeat;
  margin-right: 0.8em; /* Отступ от иконки */
}

/* Ховер-эффект для заголовка */
.collapsible-header:hover {
  background-color: #555;
  color: #b3e5fc;
}

/* Контент карточки */
.collapsible-content {
  display: none;
  margin-top: 1em;
  padding-left: 1.5em;
  border-left: 2px solid #81d4fa;
  font-size: 14px;
  max-height: 200px;
  overflow-y: auto;
  transition: max-height 0.3s ease;
}

/* Показать контент при активной карточке */
.collapsible-content.show {
  display: block;
  max-height: 500px;
}

/* Описание рецепта */
.recipe-description {
  margin-top: 1em;
  font-size: 13px;
  color: #b0bec5;
}

/* Стиль для списка рецепта */
.recipe-list {
  display: flex;
  justify-content: space-between;
  align-items: center;
  list-style-type: none;
  padding: 0;
  margin: 0;
}

/* Стиль для элемента инструкции */
.instruction {
  color: #808080; /* Цвет для выделения действия */
  font-weight: bold;
  font-size: 16px;  /* Увеличиваем размер шрифта */
  padding: 0 1em;
}