Skip to content

Commit ffff6a4

Browse files
fix responsive card display across all viewports (#1953)
* fix responsive card display across all viewports * update padding --------- Co-authored-by: Alexandra Carrillo <[email protected]>
1 parent 8dedd7d commit ffff6a4

File tree

1 file changed

+15
-24
lines changed

1 file changed

+15
-24
lines changed

src/theme/DocCardList/styles.module.scss

Lines changed: 15 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,23 @@
11
.row {
2-
> article.item {
3-
@include bp(desktop) {
4-
&:nth-last-child(-n + 2) {
5-
margin-bottom: 1.6rem !important;
6-
}
7-
}
8-
}
9-
}
10-
11-
.item {
12-
--color-palette: var(--developer-purple);
13-
margin-bottom: 1.6rem;
14-
transition: filter calc(var(--motion) * var(--motion-speed)) $gentle-ease;
15-
width: 100%;
16-
max-height: 19.5rem;
17-
margin-top: 0;
18-
position: relative;
19-
aspect-ratio: 1 / 0.5;
20-
21-
@include bp('tablet') {
22-
width: 50%;
23-
padding: 0 0.8rem;
2+
.item {
3+
--color-palette: var(--developer-purple);
4+
margin-bottom: 1.6rem;
5+
transition: filter calc(var(--motion) * var(--motion-speed)) $gentle-ease;
6+
width: 100%;
7+
margin-top: 0;
8+
position: relative;
249

2510
&:nth-last-child(-n + 2) {
2611
margin-bottom: 1.6rem !important;
2712
}
28-
}
2913

14+
@include bp('tablet') {
15+
width: 50%;
16+
padding: 0 0.8rem;
17+
}
18+
}
19+
}
20+
.item {
3021
&.active {
3122
filter: drop-shadow(0 0.8rem 2rem rgba(0, 0, 0, 0.1));
3223

@@ -45,7 +36,7 @@
4536
flex-direction: column;
4637
align-items: flex-start;
4738
gap: 0.6rem;
48-
padding: 2.4rem !important;
39+
padding: 2.4rem 2.4rem 9.6rem 2.4rem !important;
4940
position: relative;
5041
height: 100%;
5142
width: 100%;

0 commit comments

Comments
 (0)