forked from OpenLake/GitStartedWithUs
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathstyle.css
100 lines (86 loc) · 2.41 KB
/
style.css
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
body {
display: flex;
flex-direction: column;
justify-content:space-between;
align-items:center;
height: 100vh;
margin: 0;
background-color: #EEEEEE;
padding: 0 10vw;
}
h1 {
text-align: left;
font-size: 1vhvh;
color: white;
padding-left: 3vw;
}
header {
background-color: #474747;
height: 10vh;
width: 100vw;
}
footer {
text-align: center;
background-color: #252323;
color: white;
height: 10vh;
width: 100vw;
font-family: Verdana, Geneva, Tahoma, sans-serif;
padding-top: 2vh;
}
#pixel-art-container {
background-color: black;
display: grid;
grid-template-columns: repeat(20, 1fr); /* 20 columns, each taking 1 fraction of the available space */
grid-template-rows: repeat(20, 1fr); /* 20 rows, each taking 1 fraction of the available space */
gap: 1px;
width: 80vmin; /* Use vmin to ensure square grid */
height: 80vmin; /* Use vmin to ensure square grid */
border: 1px solid black; /* Optional: add border to the grid */
margin: 2vh;
}
.cell {
width: calc((80vmin - 19px) / 20); /* Adjust cell width to fit perfectly, subtracting gap spaces */
height: calc((80vmin - 19px) / 20); /* Adjust cell height to fit perfectly, subtracting gap spaces */
background-color: white; /* Default background color */
}
a {
text-decoration: none; /* Remove underline from links */
color: inherit; /* Ensure link color matches surrounding text ---- (optional) */
}
/* Customize colors for individual cells */
#pixel-art-container .cell:nth-child(1) {
background-color: red;
}
#pixel-art-container .cell:nth-child(2) {
background-color: blue;
}
#pixel-art-container .cell:nth-child(3) {
background-color: green;
}
#pixel-art-container .cell:nth-child(4) {
background-color: yellow;
}
#pixel-art-container .cell:nth-child(4) {
background-color: red;
}
#pixel-art-container .cell:nth-child(4) {
background-color: pink;
}
#pixel-art-container .cell:nth-child(5) {
background-color: purple;
}
#pixel-art-container .cell:nth-child(10) {
background-color: black;
}
#pixel-art-container .cell:nth-child(11) {
background-image: linear-gradient(red, blue);
}
#pixel-art-container .cell:nth-child(12) {
background-image: linear-gradient(green, pink);
#pixel-art-container .cell:nth-child(45) {
background-color: green;
}
/* test */
/* Add more colors for other cells as needed */
/* add */