normalize css.
Installation
npm i @hi9mi/normalize-css
yarn add @hi9mi/normalize-css
Usage
React:
import { StrictMode } from 'react';
import ReactDOM from 'react-dom';
import App from './App';
import '@hi9mi/normalize-css/index.min.css';
import './index.css';
const rootElement = document.getElementById('root');
ReactDOM.render(
<StrictMode>
<App />
</StrictMode>,
rootElement
);
CSS:
@import '@hi9mi/normalize-css/index.min.css';
body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto',
'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans',
'Helvetica Neue', sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
code {
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
monospace;
}
What's in normalize-css
*,
::before,
::after {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
* {
padding: 0;
margin: 0;
border: 0;
}
@-ms-viewport {
width: device-width;
}
*[hidden] {
display: none;
}
html {
line-height: 1.15;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
-moz-text-size-adjust: 100%;
-moz-tab-size: 4;
tab-size: 4;
}
body {
height: 100%;
min-height: 100vh;
width: 100vw;
scroll-behavior: smooth;
text-rendering: optimizeSpeed;
overflow: visible;
text-align: left;
}
article,
aside,
details,
main,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section {
display: block;
}
html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
background: transparent;
}
hr {
overflow: visible;
height: 0;
color: inherit;
}
summary {
display: list-item;
}
abbr[title] {
text-decoration: underline dotted;
}
b,
strong {
font-weight: bolder;
}
code,
kbd,
samp,
pre {
font-family: ui-monospace, SFMono-Regular, Consolas, 'Liberation Mono', Menlo,
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;
}
table {
text-indent: 0;
border-color: inherit;
border-collapse: collapse;
border-spacing: 0;
}
input {
border-radius: 0;
}
button,
input,
optgroup,
select,
textarea {
font: inherit;
line-height: 1.15;
margin: 0;
}
optgroup {
font-weight: bold;
}
button {
overflow: visible;
}
button,
select {
text-transform: none;
}
button,
[type='button'],
[type='reset'],
[type='submit'],
[role='button'] {
cursor: pointer;
color: inherit;
}
input::-ms-clear {
display: none;
}
[disabled] {
cursor: default;
}
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-focus-inner,
[type='reset']::-moz-focus-inner,
[type='submit']::-moz-focus-inner {
outline: 1px dotted ButtonText;
}
button,
html [type='button'],
[type='reset'],
[type='submit'] {
-webkit-appearance: button;
}
button,
input,
select,
textarea {
background-color: transparent;
border-style: none;
}
button:focus,
input:focus,
select:focus,
textarea:focus {
outline-width: 0;
}
select {
-moz-appearance: none;
-webkit-appearance: none;
}
select::-ms-value {
color: currentColor;
}
select::-ms-expand {
display: none;
}
:-moz-ui-invalid {
box-shadow: none;
}
legend {
border: 0;
color: inherit;
display: table;
max-width: 100%;
white-space: normal;
max-width: 100%;
}
legend {
padding: 0;
}
progress {
vertical-align: baseline;
}
[type='number']::-webkit-inner-spin-button,
[type='number']::-webkit-outer-spin-button {
height: auto;
}
[type='search'] {
-webkit-appearance: textfield;
outline-offset: -2px;
}
::-webkit-search-decoration {
-webkit-appearance: none;
}
::-webkit-file-upload-button {
-webkit-appearance: button;
font: inherit;
color: inherit;
}
textarea {
overflow: auto;
resize: vertical;
}
a {
background-color: transparent;
-webkit-text-decoration-skip: objects;
}
a:active,
a:hover {
outline-width: 0;
}
blockquote,
q {
quotes: none;
}
blockquote::before,
blockquote::after,
q::before,
q::after {
content: '';
content: none;
}
img {
max-width: 100%;
display: block;
}
img {
border-style: none;
}