/
outthevoid
/
frontend_developer_module_5
Обзор
Документация
Войти
/
outthevoid
/
frontend_developer_module_5
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
src/components/app/style.js
268 строк
4 KB
darthmorgot
Добавил подключение шрифтов в стилях.
21 мар 2024, 17:31
21 мар 2024, 17:31
ec37716
Код
Авторство
О чём код?
import {createGlobalStyle} from 'styled-components'; import regularWoff2 from 'Fonts/Inter-Regular.woff2'; import regularWoff from 'Fonts/Inter-Regular.woff'; import boldWoff2 from 'Fonts/Inter-Bold.woff2'; import boldWoff from 'Fonts/Inter-Bold.woff'; export const GlobalStyle = createGlobalStyle` // fonts @font-face { font-family: "Inter"; src: url(${regularWoff2}) format("woff2"), url(${regularWoff}) format("woff"); font-weight: 400; font-style: normal; font-display: swap; } @font-face { font-family: "Inter"; src: url(${boldWoff2}) format("woff2"), url(${boldWoff}) format("woff"); font-weight: 700; font-style: normal; font-display: swap; } // end fonts // normalize html { line-height: 1.15; text-size-adjust: 100%; } body { margin: 0; } main { display: block; } h1 { font-size: 2em; margin: 0.67em 0; } hr { box-sizing: content-box; height: 0; overflow: visible; } pre { font-family: monospace; font-size: 1em; } a { background-color: transparent; } abbr[title] { border-bottom: none; text-decoration: underline dotted; } b, strong { font-weight: bolder; } code, kbd, samp { font-family: monospace; font-size: 1em; } small { font-size: 80%; } sub, sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; } sub { bottom: -0.25em; } sup { top: -0.5em; } img { border-style: none; } button, input, optgroup, select, textarea { font-family: inherit; font-size: 100%; line-height: 1.15; margin: 0; } button, input { overflow: visible; } button, select { text-transform: none; } button, [type="button"], [type="reset"], [type="submit"] { appearance: button; } button::-moz-focus-inner, [type="button"]::-moz-focus-inner, [type="reset"]::-moz-focus-inner, [type="submit"]::-moz-focus-inner { border-style: none; padding: 0; } button:-moz-focusring, [type="button"]:-moz-focusring, [type="reset"]:-moz-focusring, [type="submit"]:-moz-focusring { outline: 1px dotted ButtonText; } fieldset { padding: 0.35em 0.75em 0.63em; } legend { box-sizing: border-box; color: inherit; display: table; max-width: 100%; padding: 0; white-space: normal; } progress { vertical-align: baseline; } textarea { overflow: auto; } [type="checkbox"], [type="radio"] { box-sizing: border-box; padding: 0; } [type="number"]::-webkit-inner-spin-button, [type="number"]::-webkit-outer-spin-button { height: auto; } [type="search"] { appearance: textfield; outline-offset: -2px; } [type="search"]::-webkit-search-decoration { appearance: none; } ::-webkit-file-upload-button { appearance: button; font: inherit; } details { display: block; } summary { display: list-item; } template { display: none; } [hidden] { display: none; } // end normalize // Common style html { height: 100%; box-sizing: border-box; } *, *::before, *::after { box-sizing: inherit; } body { min-width: 1140px; margin: 0; padding: 0; font-family: "Inter", "Arial", sans-serif; font-size: 18px; line-height: 150%; font-weight: 400; font-style: normal; color: ${props => props.theme.mineShaft}; background-color: ${props => props.theme.white}; } #root { display: flex; flex-direction: column; min-height: 100vh; } .wrapper { max-width: 1140px; margin: 0 auto; padding-left: 20px; padding-right: 20px; } a { color: inherit; text-decoration: none; } .visually-hidden:not(:focus, :active), input[type="checkbox"].visually-hidden, input[type="radio"].visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; border: 0; padding: 0; white-space: nowrap; clip-path: inset(100%); clip: rect(0 0 0 0); overflow: hidden; } `;