Files

312 lines
5.3 KiB
CSS

/*
Пишите свои стили ниже. Сохраняйте файл и обновляйте страницу.
Начинайте каждый селектор с класса задания, например .task-01 .meter.
Внутри @media тоже указывайте класс задания.
*/
/* 01. Полоска в половину контейнера */
.task-01 .meter {
width: 50%;
}
/* 02. Карточка с полями */
.task-02 .note {
box-sizing: border-box;
width: 90%;
max-width: 420px;
margin-inline: auto;
}
/* 03. Баннер, который растёт вместе с окном */
.task-03 .banner {
box-sizing: border-box;
display: flex;
align-items: center;
min-height: 25vh;
padding: 1rem;
}
/* 04. Заголовок в двух размерах */
.task-04 .headline {
margin-block: 0;
font-size: 24px;
line-height: 1.2;
}
@media (min-width: 600px) {
.task-04 .headline {
font-size: 40px;
}
}
/* 05. Из колонки в ряд */
.task-05 .actions {
display: flex;
flex-direction: column;
gap: 12px;
}
@media (min-width: 640px) {
.task-05 .actions {
flex-direction: row;
}
}
/* 06. Меню из трёх ссылок */
.task-06 .menu {
display: flex;
flex-direction: column;
gap: 0.5rem;
}
.task-06 .menu a {
padding: 0.5rem;
color: #315cb0;
background: #eef3ff;
border-radius: 0.25rem;
text-decoration: none;
}
.task-06 .menu a:hover {
background: #dfe8ff;
}
.task-06 .menu a:focus-visible {
outline: 2px solid #315cb0;
outline-offset: 2px;
}
@media (min-width: 600px) {
.task-06 .menu {
flex-direction: row;
flex-wrap: wrap;
}
}
/* 07. Каталог на одну, две и три колонки */
.task-07 .catalog {
display: grid;
grid-template-columns: minmax(0, 1fr);
gap: 12px;
}
.task-07 .item {
box-sizing: border-box;
padding: 0.75rem;
background: #f1f3f7;
border-radius: 0.25rem;
}
@media (min-width: 600px) {
.task-07 .catalog {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
}
@media (min-width: 900px) {
.task-07 .catalog {
grid-template-columns: repeat(3, minmax(0, 1fr));
}
}
/* 08. Фото с подписью */
.task-08 .photo {
margin: 0;
}
.task-08 .photo img {
display: block;
width: 100%;
height: auto;
}
.task-08 .photo figcaption {
margin-top: 0.5rem;
color: #444;
}
@media (min-width: 700px) {
.task-08 .photo {
display: flex;
align-items: flex-start;
gap: 1rem;
}
.task-08 .photo img {
flex: 0 0 55%;
width: 55%;
}
.task-08 .photo figcaption {
flex: 1 1 0;
min-width: 0;
margin-top: 0;
}
}
/* 09. Первый экран с гибкой типографикой */
.task-09 .hero {
box-sizing: border-box;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 0.75rem;
min-height: 35vh;
padding: 1.5rem 1rem;
background: #edf2fb;
text-align: center;
}
.task-09 .hero h3 {
margin: 0;
font-size: clamp(24px, 6vw, 56px);
line-height: 1.1;
}
.task-09 .hero p {
margin: 0;
max-width: 42ch;
}
/* 10. Мини-страница мастерской */
.task-10 .studio {
box-sizing: border-box;
width: 95%;
max-width: 900px;
margin-inline: auto;
padding: 1rem;
color: #2f2a24;
background: #fbf7f1;
border-radius: 0.5rem;
overflow-wrap: break-word;
}
.task-10 .studio-title {
margin: 0 0 0.25rem;
font-size: 1.5rem;
line-height: 1.2;
}
.task-10 .studio-lead {
margin: 0 0 1rem;
color: #6b5f52;
}
.task-10 .studio-menu {
display: flex;
flex-direction: column;
gap: 0.5rem;
}
.task-10 .studio-menu a {
display: block;
padding: 0.5rem 0.75rem;
color: #8a3f1d;
background: #fffdfa;
border: 1px solid #e6d9c8;
border-radius: 0.375rem;
text-decoration: none;
}
.task-10 .studio-menu a:hover {
background: #f6ece0;
}
.task-10 .studio-menu a:focus-visible {
outline: 2px solid #8a3f1d;
outline-offset: 2px;
}
.task-10 .studio-intro {
margin-top: 1.5rem;
}
.task-10 .studio-intro img {
display: block;
width: 100%;
height: auto;
border-radius: 0.5rem;
}
.task-10 .studio-intro-text {
margin-top: 0.75rem;
}
.task-10 h4 {
margin: 0 0 0.5rem;
font-size: 1.125rem;
line-height: 1.3;
}
.task-10 h5 {
margin: 0 0 0.25rem;
font-size: 1rem;
line-height: 1.3;
}
.task-10 p {
margin: 0 0 0.5rem;
}
.task-10 .studio-classes {
margin-top: 1.5rem;
}
.task-10 .studio-cards {
display: grid;
grid-template-columns: minmax(0, 1fr);
gap: 0.75rem;
}
.task-10 .studio-card {
box-sizing: border-box;
padding: 1rem;
background: #fffdfa;
border: 1px solid #e6d9c8;
border-radius: 0.5rem;
}
.task-10 .studio-card p:last-child {
margin-bottom: 0;
}
.task-10 .studio-meta {
color: #8a3f1d;
font-weight: 700;
}
.task-10 .studio-signup {
margin-top: 1.5rem;
padding-top: 1rem;
border-top: 1px solid #e6d9c8;
}
.task-10 .studio-signup p {
margin-bottom: 0;
}
@media (min-width: 640px) {
.task-10 .studio-menu {
flex-direction: row;
flex-wrap: wrap;
}
.task-10 .studio-intro {
display: grid;
grid-template-columns: 40% minmax(0, 1fr);
align-items: center;
gap: 1rem;
}
.task-10 .studio-intro-text {
margin-top: 0;
}
}
@media (min-width: 900px) {
.task-10 .studio-cards {
grid-template-columns: repeat(3, minmax(0, 1fr));
}
}