Last active
April 8, 2020 07:53
-
-
Save steadyGuy/0de70e2090d688851bac04044f3af9af to your computer and use it in GitHub Desktop.
Normalize css by Andy Bell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Указываем box sizing */ | |
*, | |
*::before, | |
*::after { | |
box-sizing: border-box; | |
} | |
/* Убираем внутренние отступы */ | |
ul[class], | |
ol[class] { | |
padding: 0; | |
} | |
/* Убираем внешние отступы */ | |
body, | |
h1, | |
h2, | |
h3, | |
h4, | |
p, | |
ul[class], | |
ol[class], | |
li, | |
figure, | |
figcaption, | |
blockquote, | |
dl, | |
dd { | |
margin: 0; | |
} | |
/* Выставляем основные настройки по-умолчанию для body */ | |
body { | |
min-height: 100vh; | |
scroll-behavior: smooth; | |
text-rendering: optimizeSpeed; | |
line-height: 1.5; | |
} | |
/* Удаляем стандартную стилизацию для всех ul и il, у которых есть атрибут class*/ | |
ul[class], | |
ol[class] { | |
list-style: none; | |
} | |
/* Элементы a, у которых нет класса, сбрасываем до дефолтных стилей */ | |
a:not([class]) { | |
text-decoration-skip-ink: auto; | |
} | |
/* Упрощаем работу с изображениями */ | |
img { | |
max-width: 100%; | |
display: block; | |
} | |
/* Указываем понятную периодичность в потоке данных у article*/ | |
article > * + * { | |
margin-top: 1em; | |
} | |
/* Наследуем шрифты для инпутов и кнопок */ | |
input, | |
button, | |
textarea, | |
select { | |
font: inherit; | |
} | |
/* Удаляем все анимации и переходы для людей, которые предпочитай их не использовать */ | |
@media (prefers-reduced-motion: reduce) { | |
* { | |
animation-duration: 0.01ms !important; | |
animation-iteration-count: 1 !important; | |
transition-duration: 0.01ms !important; | |
scroll-behavior: auto !important; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment