Skip to content

Commit 3458bf3

Browse files
Add media queries for lg breakpoint
1 parent 99a1214 commit 3458bf3

File tree

4 files changed

+44
-19
lines changed

4 files changed

+44
-19
lines changed

src/index.css

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,13 @@ body {
1919
font-size: 1.6rem;
2020
line-height: 1.7;
2121
color: #1A1053;
22-
/* background-color: #fff; */
2322
background-color: rgb(245, 245, 245);
24-
/* background-color: rgba(185, 185, 185, 0.281); */
23+
}
24+
25+
@media (max-width: 1100px) {
26+
body {
27+
font-size: 1.4rem
28+
}
2529
}
2630

2731
code {

src/styles/CovidAppStyles.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import colors from "../constants/colors";
2+
import sizes from "./sizes";
23

34
export default {
45
header: {
@@ -52,6 +53,11 @@ export default {
5253
textAlign: "center",
5354
marginTop: "2.5rem",
5455
fontSize: "3rem",
56+
57+
[sizes.down("lg")]: {
58+
fontSize: "2.5rem",
59+
marginTop: "1.5rem",
60+
},
5561
},
5662

5763
tinyChartArea: {
@@ -64,7 +70,6 @@ export default {
6470
},
6571

6672
tinyChart: {
67-
// width: "50%",
6873
margin: "2.5rem",
6974
"& h3": {
7075
textTransform: "capitalize",

src/styles/DisplayPanelsStyles.js

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import colors from "../constants/colors";
2+
import sizes from "./sizes";
23

34
export default {
45
panel: {
56
display: "flex",
67
flexDirection: "column",
78
marginBottom: "3.5rem",
89
marginTop: "3.5rem",
9-
// boxShadow: "0 1rem 2rem rgba(0, 0, 0, 0.05)",
1010
backgroundColor: (props) => (props.isDarkMode ? colors.darkPurple : "#fff"),
1111
margin: (props) => (props.isMiniPanel ? "3rem 1rem" : "3.5rem 0"),
1212
padding: (props) => (props.isMiniPanel ? "1.5rem 1.5rem" : "1.5rem 3rem"),
@@ -17,23 +17,19 @@ export default {
1717
return null;
1818
}
1919
return "0 1.5rem 3rem rgba(0, 0, 0, 0.1)";
20-
// let color;
21-
// let title = props.title.toLowerCase();
22-
// if (title === "recovered") {
23-
// color = "rgb(28, 177, 66,.2)";
24-
// } else if (title === "deceased") {
25-
// color = "rgb(98, 54, 25,.2)";
26-
// } else if (title === "active") {
27-
// color = "rgb(250, 100, 0,.2)";
28-
// } else if (title === "confirmed") {
29-
// color = "rgb(249, 52, 94,.2)";
30-
// }
31-
// return `0 .5rem 3rem ${color}`;
20+
},
21+
22+
[sizes.down("lg")]: {
23+
marginBottom: ".5rem",
24+
marginTop: "2.5rem",
3225
},
3326
},
3427

3528
heading: {
3629
fontSize: (props) => (props.isMiniPanel ? "1.5rem" : "2rem"),
30+
[sizes.down("lg")]: {
31+
fontSize: (props) => (props.isMiniPanel ? "1.2rem" : "1.7rem"),
32+
},
3733
},
3834

3935
number: {
@@ -54,6 +50,9 @@ export default {
5450
fontSize: (props) => (props.isMiniPanel ? "2.2rem" : "3.5rem"),
5551
paddingTop: ".5rem",
5652
paddingBottom: ".5rem",
53+
[sizes.down("lg")]: {
54+
fontSize: (props) => (props.isMiniPanel ? "1.5rem" : "3rem"),
55+
},
5756
},
5857

5958
dataChange: {

src/styles/NavbarStyles.js

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import colors from "../constants/colors";
2+
import sizes from "./sizes";
23

34
export default {
45
nav: {
56
marginTop: "12rem",
6-
// padding: "2rem 5rem",
77
},
88
navItems: {
99
listStyle: "none",
@@ -42,19 +42,32 @@ export default {
4242
zIndex: "10",
4343
position: "relative",
4444
animation: "$float 2s ease infinite",
45+
transition: "all .5s",
46+
47+
[sizes.down("lg")]: {
48+
animation: "none",
49+
},
4550

4651
"&::before": {
4752
content: '""',
4853
position: "absolute",
4954
width: "155%",
5055
height: "110%",
5156
display: "block",
57+
borderRadius: "25px",
58+
transform: "translateX(2rem) skewX(10deg)",
5259
backgroundColor: (props) =>
5360
props.isDarkMode ? colors.lightPurple : "rgb(245, 245, 245)",
54-
transform: "translateX(2rem) skewX(10deg)",
55-
borderRadius: "25px",
5661
zIndex: 10,
62+
63+
[sizes.down("lg")]: {
64+
width: "120%",
65+
padding: ".5rem 2.5rem",
66+
height: "100%",
67+
transform: "translateX(0) skewX(0)",
68+
},
5769
},
70+
5871
"&::after": {
5972
content: '""',
6073
position: "absolute",
@@ -67,6 +80,10 @@ export default {
6780
props.isDarkMode ? "rgba(255,255,255,.6)nop" : colors.lightPurple,
6881
transform: "translate(-1rem, .1rem) skew(10deg, -5deg)",
6982
borderRadius: "25px",
83+
84+
[sizes.down("lg")]: {
85+
content: "none",
86+
},
7087
},
7188
},
7289
},

0 commit comments

Comments
 (0)