Dantes (обсуждение | вклад) (Отмена правки 18774, сделанной Dantes (обсуждение)) Метка: отмена |
Dantes (обсуждение | вклад) Нет описания правки |
||
| Строка 2: | Строка 2: | ||
.recipe-card { | .recipe-card { | ||
width: 100%; | width: 100%; | ||
max-width: | max-width: 340px; /* Немного увеличил максимальную ширину */ | ||
box-sizing: border-box; | box-sizing: border-box; | ||
padding: | padding: 1rem; | ||
margin: 1em auto; | margin: 1em auto; | ||
background-color: #2a2a2a; | background-color: #2a2a2a; | ||
border: 2px solid | border: 2px solid; | ||
border-radius: | border-radius: 8px; /* Увеличил радиус скругления */ | ||
color: #f5f5f5; | color: #f5f5f5; | ||
font-size: | font-size: 15px; /* Увеличил базовый размер шрифта */ | ||
box-shadow: 0 | box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); /* Более выраженная тень */ | ||
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: | margin-bottom: 1.2rem; | ||
position: relative; | |||
} | } | ||
/* Заголовок карточки */ | /* Заголовок карточки */ | ||
.collapsible-header { | .collapsible-header { | ||
background-color: # | background-color: #37474f; /* Изменил цвет фона */ | ||
border: none; | border: none; | ||
font-weight: | font-weight: 600; /* Более умеренное начертание */ | ||
color: #81d4fa; | color: #81d4fa; | ||
text-transform: uppercase; | text-transform: uppercase; | ||
cursor: pointer; | cursor: pointer; | ||
border-radius: | border-radius: 6px; | ||
transition: | transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); | ||
padding: 0. | padding: 0.8rem 1.2rem; | ||
display: flex; | display: flex; | ||
align-items: center; /* | align-items: center; | ||
gap: 12px; /* Современный способ отступов между элементами */ | |||
} | } | ||
/* | /* Иконка спрайта */ | ||
.collapsible-header .sprite { | .collapsible-header .sprite { | ||
width: | width: 28px; | ||
height: | height: 28px; | ||
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; | |||
} | } | ||
/* Ховер- | /* Ховер-эффекты */ | ||
.collapsible-header:hover { | .collapsible-header:hover { | ||
background-color: # | background-color: #455a64; | ||
color: #b3e5fc; | color: #b3e5fc; | ||
} | |||
.collapsible-header:hover .sprite { | |||
transform: scale(1.1); /* Анимация иконки при наведении */ | |||
} | } | ||
/* Контент карточки */ | /* Контент карточки */ | ||
.collapsible-content { | .collapsible-content { | ||
margin-top: 1rem; | |||
margin-top: | padding-left: 1.8rem; | ||
padding-left: 1. | border-left: 3px solid; /* Более толстая линия */ | ||
border-left: | overflow: hidden; | ||
max-height: 0; | |||
max-height: | opacity: 0; | ||
transition: | |||
transition: max-height 0.3s ease; | max-height 0.35s ease-out, | ||
opacity 0.3s ease-out, | |||
padding 0.3s ease-out; | |||
} | } | ||
/* | /* Активное состояние */ | ||
.collapsible-content. | .collapsible-content.active { | ||
max-height: 500px; | max-height: 500px; | ||
opacity: 1; | |||
padding: 0.8rem 0 0.8rem 1.8rem; | |||
animation: slideDown 0.4s ease-out; | |||
} | } | ||
/* | /* Списки */ | ||
.recipe- | .recipe-list, .collapsible-content ul { | ||
margin | list-style: none; | ||
padding: 0; | |||
margin: 0; | |||
display: grid; | |||
gap: 8px; /* Управление отступами между элементами */ | |||
} | } | ||
.recipe-list li { | |||
.recipe-list { | |||
display: flex; | display: flex; | ||
align-items: center; | align-items: center; | ||
gap: 6px; | |||
padding: 0; | padding: 6px 0; | ||
border-bottom: 1px solid #37474f; /* Разделители между элементами */ | |||
} | } | ||
/* | /* Элемент инструкции */ | ||
.instruction { | .instruction { | ||
color: # | color: #81d4fa; /* Соответствует основной цветовой схеме */ | ||
font-weight: | font-weight: 600; | ||
font-size: | font-size: 15px; | ||
padding: 0 | padding: 8px 12px; | ||
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:36, 3 мая 2025
/* Основной стиль для карточек рецептов */
.recipe-card {
width: 100%;
max-width: 340px; /* Немного увеличил максимальную ширину */
box-sizing: border-box;
padding: 1rem;
margin: 1em auto;
background-color: #2a2a2a;
border: 2px solid;
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); /* Эффект поднятия при наведении */
}
/* Анимация для раскрытия контента */
@keyframes slideDown {
from { opacity: 0; transform: translateY(-10px); }
to { opacity: 1; transform: translateY(0); }
}
/* Стиль для блоков с контентом */
.collapsible-block {
margin-bottom: 1.2rem;
position: relative;
}
/* Заголовок карточки */
.collapsible-header {
background-color: #37474f; /* Изменил цвет фона */
border: none;
font-weight: 600; /* Более умеренное начертание */
color: #81d4fa;
text-transform: uppercase;
cursor: pointer;
border-radius: 6px;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
padding: 0.8rem 1.2rem;
display: flex;
align-items: center;
gap: 12px; /* Современный способ отступов между элементами */
}
/* Иконка спрайта */
.collapsible-header .sprite {
width: 28px;
height: 28px;
background-image: url('path_to_beaker_image.png');
background-size: contain;
transition: transform 0.2s ease;
}
/* Ховер-эффекты */
.collapsible-header:hover {
background-color: #455a64;
color: #b3e5fc;
}
.collapsible-header:hover .sprite {
transform: scale(1.1); /* Анимация иконки при наведении */
}
/* Контент карточки */
.collapsible-content {
margin-top: 1rem;
padding-left: 1.8rem;
border-left: 3px solid; /* Более толстая линия */
overflow: hidden;
max-height: 0;
opacity: 0;
transition:
max-height 0.35s ease-out,
opacity 0.3s ease-out,
padding 0.3s ease-out;
}
/* Активное состояние */
.collapsible-content.active {
max-height: 500px;
opacity: 1;
padding: 0.8rem 0 0.8rem 1.8rem;
animation: slideDown 0.4s ease-out;
}
/* Списки */
.recipe-list, .collapsible-content ul {
list-style: none;
padding: 0;
margin: 0;
display: grid;
gap: 8px; /* Управление отступами между элементами */
}
.recipe-list li {
display: flex;
align-items: center;
gap: 6px;
padding: 6px 0;
border-bottom: 1px solid #37474f; /* Разделители между элементами */
}
/* Элемент инструкции */
.instruction {
color: #81d4fa; /* Соответствует основной цветовой схеме */
font-weight: 600;
font-size: 15px;
padding: 8px 12px;
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;
}
}