Skip to content

Commit

Permalink
global.css <a>color
Browse files Browse the repository at this point in the history
  • Loading branch information
herohoro committed Dec 29, 2021
1 parent 1eff921 commit 2e5892f
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pages/_app.js
@@ -0,0 +1,5 @@
import '../styles/global.css'

export default function App({ Component, pageProps }) {
return <Component {...pageProps} />
}
27 changes: 27 additions & 0 deletions styles/global.css
@@ -0,0 +1,27 @@
html,
body {
padding: 0;
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu,
Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
line-height: 1.6;
font-size: 18px;
}

* {
box-sizing: border-box;
}

a {
color: #0070f3;
text-decoration: none;
}

a:hover {
text-decoration: underline;
}

img {
max-width: 100%;
display: block;
}

2 comments on commit 2e5892f

@herohoro
Copy link
Owner Author

@herohoro herohoro commented on 2e5892f Dec 29, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@herohoro
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In Next.js, you can add global CSS files by importing them from pages/_app.js. You cannot import global CSS anywhere else.

_app.jsでしかglobal CSSは取り込めない(゜o゜;
どこでも使えるわけではない!!!

Please sign in to comment.