Skip to content

Commit 1e7929a

Browse files
committed
Deleting the Home.module.css file, creating Home.module.scss file that contains all the necessary styles for Home page in SASS format and referencing the scss file in Index.js
1 parent c0bf5c1 commit 1e7929a

File tree

3 files changed

+114
-114
lines changed

3 files changed

+114
-114
lines changed

pages/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import Head from "next/head";
22
import Link from "next/link";
3-
import styles from "../styles/Home.module.css";
3+
import styles from "../styles/Home.module.scss";
44

55
export default function Home() {
66
return (

styles/Home.module.css

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

styles/Home.module.scss

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
hr.divider {
2+
border-top: 1px solid #eaeaea;
3+
width: 100%;
4+
margin: 4rem 0;
5+
}
6+
7+
.title {
8+
margin: 0;
9+
line-height: 1.15;
10+
font-size: 2.5rem;
11+
text-align: center;
12+
13+
a {
14+
color: #0070f3;
15+
text-decoration: none;
16+
17+
&:hover,
18+
&:focus,
19+
&:active {
20+
text-decoration: underline;
21+
}
22+
}
23+
}
24+
25+
.description {
26+
line-height: 1.5;
27+
font-size: 1.5rem;
28+
text-align: center;
29+
max-width: 90%;
30+
margin: 0 auto;
31+
}
32+
33+
.centerText {
34+
text-align: center;
35+
width: 90%;
36+
margin: 1.5rem auto;
37+
}
38+
39+
.grid {
40+
display: flex;
41+
align-items: center;
42+
justify-content: center;
43+
flex-wrap: wrap;
44+
margin: 3rem auto;
45+
}
46+
47+
.card {
48+
height: 13rem;
49+
max-width: 40%;
50+
margin: 1.5rem;
51+
flex-basis: 45%;
52+
padding: 1.5rem;
53+
text-align: left;
54+
display: flex;
55+
align-items: center;
56+
justify-content: center;
57+
text-decoration: none;
58+
border: 2px solid #666;
59+
transition: color 0.15s ease, border-color 0.15s ease;
60+
61+
&:hover,
62+
&:focus,
63+
&:active {
64+
color: #666;
65+
border-color: #eaeaea;
66+
}
67+
68+
p {
69+
margin: 0 1rem;
70+
font-size: 1.125rem;
71+
line-height: 1.5;
72+
text-align: center;
73+
font-weight: bold;
74+
}
75+
}
76+
77+
.button {
78+
height: 2.4rem;
79+
width: 8rem;
80+
border-radius: 5px;
81+
background-color: #696969;
82+
color: #fff;
83+
font-size: 0.875rem;
84+
border: none;
85+
text-transform: uppercase;
86+
transition: opacity 0.3s ease;
87+
88+
&:hover {
89+
opacity: 65%;
90+
cursor: pointer;
91+
}
92+
}
93+
94+
@media (min-width: 1024px) {
95+
.title {
96+
font-size: 4rem;
97+
}
98+
}
99+
100+
@media (max-width: 728px) {
101+
.grid {
102+
width: 100%;
103+
flex-direction: column;
104+
margin: 3rem 0;
105+
}
106+
107+
.card {
108+
max-width: none;
109+
margin: 0.5rem;
110+
width: 90%;
111+
min-height: 7rem;
112+
}
113+
}

0 commit comments

Comments
 (0)