I started a new project using next.js by running the command:
yarn create next-app
However, I noticed that all heading and paragraph tags in my code have default top margins in next.js.
index.js
import React, { Component } from "react";
import styles from "../styles/Index.module.css";
export default class index extends Component {
render() {
return (
<div className={styles.container}>
<h1>Hello world</h1>
</div>
);
}
}
Index.module.css
.container{
background-color: aqua;
min-height:100vh;
width:100%;
}
global.css
html,
body {
padding: 0px;
margin: 0px;
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen,
Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
}
a {
color: inherit;
text-decoration: none;
}
* {
box-sizing: border-box;
}