Skip to content

Commit 6ef095b

Browse files
Add sass
1 parent aff163a commit 6ef095b

File tree

8 files changed

+470
-64
lines changed

8 files changed

+470
-64
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"@testing-library/jest-dom": "^4.2.4",
77
"@testing-library/react": "^9.3.2",
88
"@testing-library/user-event": "^7.1.2",
9+
"node-sass": "^4.13.0",
910
"react": "^16.12.0",
1011
"react-dom": "^16.12.0",
1112
"react-scripts": "3.3.0"

src/App.css

Lines changed: 0 additions & 38 deletions
This file was deleted.

src/App.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
import React from 'react';
22
import logo from './logo.svg';
3-
import './App.css';
3+
import './App.scss';
44

55
function App() {
66
return (
77
<div className="App">
8-
<header className="App-header">
9-
<img src={logo} className="App-logo" alt="logo" />
8+
<header className="header">
9+
<img src={logo} className="logo" alt="logo" />
1010
<p>
1111
Edit <code>src/App.js</code> and save to reload.
1212
</p>
1313
<a
14-
className="App-link"
14+
className="link"
1515
href="https://reactjs.org"
1616
target="_blank"
1717
rel="noopener noreferrer"

src/App.scss

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
@import './scss/variables.scss';
2+
3+
.App {
4+
text-align: center;
5+
.header {
6+
background-color: #282c34;
7+
min-height: 100vh;
8+
display: flex;
9+
flex-direction: column;
10+
align-items: center;
11+
justify-content: center;
12+
font-size: calc(10px + 2vmin);
13+
color: white;
14+
.logo {
15+
height: 40vmin;
16+
pointer-events: none;
17+
}
18+
.link {
19+
color: $primaryColor;
20+
}
21+
}
22+
}
23+
@media (prefers-reduced-motion: no-preference) {
24+
.App {
25+
.header {
26+
.logo {
27+
animation: App-logo-spin infinite 20s linear;
28+
}
29+
}
30+
}
31+
}
32+
@keyframes App-logo-spin {
33+
from {
34+
transform: rotate(0deg);
35+
}
36+
to {
37+
transform: rotate(360deg);
38+
}
39+
}

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22
import ReactDOM from 'react-dom';
3-
import './index.css';
3+
import './index.scss';
44
import App from './App';
55
import * as serviceWorker from './serviceWorker';
66

File renamed without changes.

src/scss/variables.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/**
2+
* Variables
3+
*/
4+
5+
// Color
6+
$primaryColor: #61dafb;

0 commit comments

Comments
 (0)