Правильное обнуление стилей браузеров?

Не знаю на сколько это правильно или универсально, но меня ни разу не подводил еще. Единственное нужно не забывать указывать фотсайз html, так как используются ремы.

 html {font-family: sans-serif;line-height: 1.15;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;}
 body {margin: 0;}
 article,aside,footer,header,nav,section {display: block;}
 h1 {font-size: 2em;margin: 0.67em 0;}
 figcaption,figure,main {display: block;}
 figure {margin: 1em 40px;}
 hr {-webkit-box-sizing: content-box;box-sizing: content-box;height: 0;overflow: visible;}
 pre {font-family: monospace, monospace;font-size: 1em;}
 a {background-color: transparent;-webkit-text-decoration-skip: objects;}
 a:active,a:hover {outline-width: 0;}
 abbr[title] {border-bottom: none;text-decoration: underline;text-decoration: underline dotted;}
 b,strong {font-weight: inherit;}
 b,strong {font-weight: bolder;}
 code,kbd,samp {font-family: monospace, monospace;font-size: 1em;}
 dfn {font-style: italic;}
 mark {background-color: #ff0;color: #000;}
 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;}
 audio,video {display: inline-block;}
 audio:not([controls]) {display: none;height: 0;}
 img {border-style: none;}
 svg:not(:root) {overflow: hidden;}
 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,html [type="button"],[type="reset"],[type="submit"] {-webkit-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: none;}
 fieldset {border: 1px solid #c0c0c0;margin: 0 2px;padding: 0.35em 0.625em 0.75em;}
 legend {-webkit-box-sizing: border-box;box-sizing: border-box;color: inherit;display: table;max-width: 100%;padding: 0;white-space: normal;}
 progress {display: inline-block;vertical-align: baseline;}
 textarea {overflow: auto;}
 [type="checkbox"],[type="radio"] {-webkit-box-sizing: border-box;box-sizing: border-box;padding: 0;}
 [type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button {height: auto;}
 [type="search"] {-webkit-appearance: textfield;outline-offset: 0;}
 [type="search"]::-webkit-search-cancel-button,[type="search"]::-webkit-search-decoration {-webkit-appearance: none;}
 ::-webkit-file-upload-button {-webkit-appearance: button;font: inherit;}
 details,menu {display: block;}
 summary {display: list-item;}
 canvas {display: inline-block;}
 template {display: none;}
 [hidden] {display: none;}
 html {-webkit-box-sizing: border-box;box-sizing: border-box;}
 *,*::before,*::after {-webkit-box-sizing: inherit;box-sizing: inherit;}
 @-ms-viewport {width: device-width;}
 html {-ms-overflow-style: scrollbar;-webkit-tap-highlight-color: transparent;}
 [tabindex="-1"]:focus {outline: none !important;}
 h1, h2, h3, h4, h5, h6 {margin-top: 0;margin-bottom: .5rem;}
 p {margin-top: 0;margin-bottom: 1rem;}
 abbr[title],abbr[data-original-title] {cursor: help;}
 address {margin-bottom: 1rem;font-style: normal;line-height: inherit;}
 ol,ul,dl {margin-top: 0;margin-bottom: 1rem;}
 ol ol,ul ul,ol ul,ul ol {margin-bottom: 0;}
 dt {font-weight: bold;}
 dd {margin-bottom: .5rem;margin-left: 0;}
 blockquote {margin: 0 0 1rem;}
 a {color: #0275d8;text-decoration: none;}
 a:focus, a:hover {color: #014c8c;text-decoration: underline;}
 a:not([href]):not([tabindex]) {color: inherit;text-decoration: none;}
 a:not([href]):not([tabindex]):focus, a:not([href]):not([tabindex]):hover {color: inherit;text-decoration: none;}
 a:not([href]):not([tabindex]):focus {outline: 0;}
 pre {margin-top: 0;margin-bottom: 1rem;overflow: auto;}
 figure {margin: 0 0 1rem;}
 img {vertical-align: middle;}
 [role="button"] {cursor: pointer;}
 a,area,button,[role="button"],input,label,select,summary,textarea {-ms-touch-action: manipulation;touch-action: manipulation;}
 table {border-collapse: collapse;background-color: transparent;}
 caption {padding-top: 0.75rem;padding-bottom: 0.75rem;color: inherit;text-align: left;caption-side: top;}
 th {text-align: left;}
 label {display: inline-block;margin-bottom: .5rem;}
 button:focus {outline: none;outline: none;}
 input,button,select,textarea {line-height: inherit;}
 input[type="radio"]:disabled,input[type="checkbox"]:disabled {cursor: not-allowed;}
 input[type="date"],input[type="time"],input[type="datetime-local"],input[type="month"] {-webkit-appearance: listbox;}
 textarea {resize: vertical;}
 fieldset {min-width: 0;padding: 0;margin: 0;border: 0;}
 legend {display: block;width: 100%;padding: 0;margin-bottom: .5rem;font-size: 1.5rem;line-height: inherit;}
 input[type="search"] {-webkit-appearance: none;}
 output {display: inline-block;}
 [hidden] {display: none !important;}
 

Добавить Комментарий

Ваш ответ

Размещая свой ответ, вы соглашаетесь с правилами сайта.