Skip to content

Commit 0cd92ff

Browse files
author
github-actions-bot
committed
Change nth-child to nth-of-type to fix some errors
1 parent 7ef981e commit 0cd92ff

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/components/MoveDex/MovePageContent.jsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -154,36 +154,36 @@ const MovePageContent = ({ move2, move3, moveV, movesList }) => {
154154

155155
// sm: 2 columns
156156
"@media (min-width: 600px)": {
157-
"&:nth-child(2n)": {
157+
"&:nth-of-type(2n)": {
158158
margin: "8px 0px 8px 8px", // Rightmost in 2-column rows
159159
},
160-
"&:nth-child(2n-1)": {
160+
"&:nth-of-type(2n-1)": {
161161
margin: "8px 8px 8px 0px", // Leftmost in 2-column rows
162162
},
163163
},
164164

165165
// md: 3 columns
166166
"@media (min-width: 900px)": {
167-
"&:nth-child(3n)": {
167+
"&:nth-of-type(3n)": {
168168
margin: "8px 0px 8px 8px", // Rightmost in 3-column rows
169169
},
170-
"&:nth-child(3n-2)": {
170+
"&:nth-of-type(3n-2)": {
171171
margin: "8px 8px 8px 0px", // Leftmost in 3-column rows
172172
},
173-
"&:nth-child(3n-1)": {
173+
"&:nth-of-type(3n-1)": {
174174
margin: "8px", // Middle element in 3-column rows
175175
},
176176
},
177177

178178
// lg: 4 columns
179179
"@media (min-width: 1200px)": {
180-
"&:nth-child(4n)": {
180+
"&:nth-of-type(4n)": {
181181
margin: "8px 0px 8px 8px", // Rightmost in 4-column rows
182182
},
183-
"&:nth-child(4n-3)": {
183+
"&:nth-of-type(4n-3)": {
184184
margin: "8px 8px 8px 0px", // Leftmost in 4-column rows
185185
},
186-
"&:nth-child(4n-2), &:nth-child(4n-1)": {
186+
"&:nth-of-type(4n-2), &:nth-of-type(4n-1)": {
187187
margin: "8px", // Middle elements in 4-column rows
188188
},
189189
},

0 commit comments

Comments
 (0)