Last active
July 10, 2020 11:02
-
-
Save mpodaniev/3bd76ec585f6519488763d81f610cf08 to your computer and use it in GitHub Desktop.
Базовые стили
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
//Правильное присвоение border-box для всех элементов | |
html { | |
box-sizing: border-box; | |
} | |
*, *::before, *::after { | |
box-sizing: inherit; | |
} | |
//Присвоение для конкретного элемента | |
.content-box-coponent { | |
box-sizing: content-box; | |
} | |
//Исключение последнего (или первого) элемента | |
.nav li:not(:last-child) { | |
border-right: 1px solid #666; | |
} | |
//Ячейки таблицы одинаковой ширины | |
.calendar { | |
table-layout: fixed; | |
} | |
//Отображение пустых ссылок | |
a[href^="http"]:empty::before { | |
content: attr(href); | |
} | |
//Стиль по умолчанию для ссылок | |
a[href]:not([class]) { | |
color: #999; | |
text-decoration: none; | |
transition: all ease-in-out .3s; | |
} | |
//Православный visually-hidden | |
.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; | |
} | |
.visually-hidden { | |
position: absolute; | |
clip: rect(0 0 0 0); | |
width: 1px; | |
height: 1px; | |
margin: -1px; | |
} | |
//Убирает селект в IE | |
select::-ms-expand { | |
display: none; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment