/
AkentevRoman
/
WithCoffee
Обзор
Документация
Войти
/
AkentevRoman
/
WithCoffee
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
style.css
576 строк
8 KB
AkentevRoman
first_commit
02 окт 2024, 17:01
02 окт 2024, 17:01
ea98b4d
Код
Авторство
О чём код?
html { box-sizing: border-box; } *, *::after, *::before { box-sizing: inherit; margin: 0; padding: 0; } html, body { height: 100%; } ul { list-style-type: none; } a { text-decoration: none; color: inherit; } /** Убираем внутренние отступы слева тегам списков, у которых есть атрибут class */ :where(ul, ol):where([class]) { padding-left: 0; } /** Убираем стандартный маркер маркированному списку, у которого есть атрибут class */ :where(ul[class]) { list-style: none; } /** Упрощаем работу с изображениями */ img { display: block; max-width: 100%; } /** Наследуем свойства шрифт для полей ввода */ input, textarea, select, button { font: inherit; } html { /** Плавный скролл */ scroll-behavior: smooth; } /* Cкроем Open menu из виду, но оставим для пользователей скринридеров: */ .visually-hidden { position: absolute !important; width: 1px!important; height: 1px!important; margin: -1px!important; border: 0!important; padding: 0!important; white-space: nowrap!important; clip-path: inset(100%)!important; clip: rect(0 0 0 0)!important; overflow: hidden!important; } @font-face { font-family: 'Gabriela'; src: url('fonts/Gabriela-Regular.woff2') format('woff2'); font-weight: normal; font-style: normal; font-display: swap; } /* Переменные */ :root { --transition-duration: 0.3s; /*придание плавности переходам*/ } /* Общие стили */ body { font-family: 'Gabriela', sans-serif; background-color: #1C1C1C; color: #f6f0ee; } a { color: #f6f0ee; text-decoration: none; z-index: 1; } p { margin: 0; } p + p { margin-top: 15px; } ul { list-style: none; padding: 0; margin: 0; } h1, h2, h3, h4, h5, h6 { font-weight: 500; margin: 0; } .wrapper { min-height: 100%; display: flex; flex-direction: column; } .container { box-sizing: border-box; max-width: 1170px; margin: 0 auto; padding: 15px 15px; } .btn { display: flex; align-items: center; justify-content: center; width: 165px; height: 50px; font-size: 16px; font-weight: 500; text-transform: uppercase; border-radius: 5px; background: linear-gradient(#834f2a,#dba173,#834f2a); transition: var(--transition-duration); } .btn:hover { opacity: 0.8; } .btn-small { width: 140px; height: 40px; font-size: 12px; } /* Шапка */ .header .container { display: flex; justify-content: space-between; align-items: center; } .header-list { display: flex; gap: 30px; } .header-nav a { opacity: 0.7; font-size: 14px; transition: var(--transition-duration); } .header-nav a:hover { opacity: 0.9; } /* Приветственная секция */ .welcome { min-height: 100vh; box-sizing: border-box; margin-top: -100px; padding: 240px 0; background-repeat: no-repeat; background-size: cover; background-position: left; } .welcome-text { max-width: 550px; } .welcome-subtitle { margin-bottom: 7px; font-size: 14px; letter-spacing: 10%; } .welcome-title { margin-bottom: 37px; font-size: 58px; } .welcome-desc { margin: 40px 0; font-size: 18px; opacity: 0.7; max-width: 450px; } /* Список еды */ .food-list { padding: 100px 0; } .food-list__title{ display: flex; justify-content: center; font-size: 50px; margin-bottom: 40px; } .food-list .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 40px 10px; } .food-list-card { width: 260px; overflow: hidden;/*отрезать всё что выходит за пределы карточки*/ border-radius: 10px; background: rgb(49, 47, 48); text-align: center; } .food-list-card:hover{ scale: 1.3; transition-duration: var(--transition-duration); } .food-list-img { width: 100%; height: 175px; object-fit: cover; } .food-list-text-wrapper{ padding: 30px 20px; } .food-list-title { margin-bottom: 15px; font-size: 20px; } .food-list-desc { opacity: 0.7; font-size: 16px; } /* Order */ .order { padding: 60px 0; } .order .container { min-height: 500px; background-repeat: no-repeat; background-size: cover; background-position: center; } .order-text { max-width: 360px; padding-left: 15px; } .order-title { margin-bottom: 25px; font-size: 44px; } .order-desc { margin-bottom: 15px; opacity: 0.7; } .order-price { color: rgb(246, 118, 44); font-size: 20px; font-weight: 500; letter-spacing: 10%; } .order-old-price { font-size: 16px; opacity: 0.5; text-decoration-line: line-through; } .order-price + .order-price { margin-left: 3px; } .order .btn { margin-top: 10px; } .product { padding: 100px 0; } .product .container { display: flex; flex-wrap: wrap; gap: 30px; justify-content: center; } .product-card { box-sizing: border-box; width: 555px; min-height: 300px; padding: 25px 20px 60px 310px; background-color: rgb(107, 88, 88); background-size: cover; background-repeat: no-repeat; background-position: right; } .product-title { margin-bottom: 20px; font-size: 30px; } .product-desc { margin-bottom: 5px; opacity: 0.7; } .product-price { color: rgb(246, 118, 44); font-weight: 500; letter-spacing: 10%; } .product-price + .product-price{ margin-left: 5px; } .product-old-price { text-decoration-line: line-through; opacity: 0.5; } .product .btn{ margin-top: 10px; } /* Feedback */ .feedback { padding-bottom: 200px; } .feedback .container { display: flex; align-items: center; justify-content:space-between; max-width: 1170px; } .feedback-img{ max-width: 700px; } .feedback-text { margin: 0; width: 370px; text-align: center; } .feedback-desc { opacity: 0.7; margin: 30px 0; } .feedback-autor { font-size: 24px; font-weight: 500; } .feedback-subautor { opacity: 0.7; font-size: 12px; font-weight: 500; display: block; } /* Download */ .download { padding: 60px 0; background: rgb(49, 47, 48); } .download .container { display: flex; justify-content: space-around; } .download-title { font-size: 40px; font-weight: 500; } /* Footer */ .footer{ padding: 120px 0; } .footer a { font-size: 12px; opacity: 0.8; } .footer .footer-title { font-size: 16px; font-weight: 500; opacity: 1; } .footer .container{ display: grid; grid-template-columns: 1fr 3fr 1fr; } .footer .footer-list{ display: flex; justify-content: space-evenly; } .footer-socials-list{ display: flex; gap: 10px; } @media (max-width: 1200px){ .welcome-subtitle{ font-size: 12px; } .welcome-title{ font-size: 40px; } .welcome-text { max-width: 400px; } .welcome{ min-height: auto; } .food-list .container{ display: grid; grid-template-columns: auto auto ; justify-content:space-evenly; } } @media (max-width: 767px){ .welcome { margin-top: -150px; background-size: cover; background-position: center; } .welcome-title{ font-size: 25px; } .welcome-text { max-width: 700px; } .btn { width: 100px; height: 40px; font-size: 12px; } .btn-small { width: 90px; height: 30px; font-size: 10px; } .header .container{ display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; grid-template-areas: "logo btn" "nav nav"; } .header-logo{ grid-area: logo; } .header-btn{ grid-area: btn; margin-left: auto; } .header-nav{ grid-area: nav; } .header-list{ justify-content: space-evenly; gap: 10px; } }