Skip to content

Commit 239869d

Browse files
authored
Merge pull request #1406 from kleros/fix(web)/fix-cases-list-view-alignment
fix(web): fix-cases-list-view-alignment
2 parents a2d5653 + 5b5b233 commit 239869d

File tree

4 files changed

+18
-18
lines changed

4 files changed

+18
-18
lines changed

web/src/components/CasesDisplay/CasesListHeader.tsx

+9-13
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,23 @@ import { responsiveSize } from "styles/responsiveSize";
66

77
const Container = styled.div`
88
display: flex;
9-
justify-content: space-between;
10-
gap: calc(15vw + (40 - 15) * (min(max(100vw, 375px), 1250px) - 375px) / 875);
119
width: 100%;
1210
height: 100%;
11+
justify-content: space-between;
1312
`;
1413

1514
const CasesData = styled.div`
16-
display: flex;
17-
align-items: center;
18-
justify-content: space-around;
19-
width: 100%;
20-
margin-left: ${responsiveSize(0, 33)};
21-
flex-wrap: wrap;
22-
padding: 0 3%;
23-
gap: ${responsiveSize(24, 48, 300)};
15+
display: grid;
16+
flex: 1;
17+
grid-template-columns: repeat(4, ${responsiveSize(100, 130, 900)});
18+
column-gap: ${responsiveSize(2, 12, 900)};
19+
justify-content: space-between;
20+
margin-right: 8px;
2421
`;
2522

2623
const CaseTitle = styled.div`
2724
display: none;
25+
width: ${responsiveSize(270, 345, 900)};
2826
margin-left: 32px;
2927
gap: 36px;
3028
label {
@@ -42,9 +40,7 @@ const CaseTitle = styled.div`
4240
)}
4341
`;
4442

45-
const StyledLabel = styled.label`
46-
margin-left: ${responsiveSize(4, 8, 300, 900)};
47-
`;
43+
const StyledLabel = styled.label``;
4844

4945
const tooltipMsg =
5046
"Users have an economic interest in serving as jurors in Kleros: " +

web/src/components/DisputeCard/DisputeInfo.tsx

+6-3
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ const Container = styled.div<{ isList: boolean; isOverview?: boolean }>`
2727
() => css`
2828
gap: 0;
2929
height: 100%;
30+
flex: 1;
3031
`
3132
)}
3233
`};
@@ -56,9 +57,11 @@ const RestOfFieldsContainer = styled.div<{ isList?: boolean; isOverview?: boolea
5657
css`
5758
${landscapeStyle(
5859
() => css`
59-
flex-direction: row;
60-
gap: ${responsiveSize(4, 24, 300, 900)};
61-
justify-content: space-around;
60+
display: grid;
61+
grid-template-columns: repeat(4, ${responsiveSize(100, 130, 900)});
62+
column-gap: ${responsiveSize(2, 12, 900)};
63+
justify-content: space-between;
64+
align-items: center;
6265
`
6366
)}
6467
`};

web/src/components/DisputeCard/PeriodBanner.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
import React from "react";
22
import styled, { Theme } from "styled-components";
33
import { Periods } from "consts/periods";
4+
import { responsiveSize } from "styles/responsiveSize";
45

56
const Container = styled.div<Omit<IPeriodBanner, "id">>`
67
height: ${({ isCard }) => (isCard ? "45px" : "100%")};
7-
width: auto;
8+
width: ${({ isCard }) => (isCard ? "auto" : responsiveSize(60, 80, 900))};
89
border-top-right-radius: 3px;
910
border-top-left-radius: 3px;
1011
display: flex;

web/src/components/DisputeCard/index.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ const ListTitle = styled.div`
6868
height: 100%;
6969
justify-content: start;
7070
align-items: center;
71-
width: calc(30vw + (40 - 30) * (min(max(100vw, 300px), 1250px)- 300px) / 950);
71+
width: ${responsiveSize(240, 300, 900)};
7272
`;
7373

7474
export const getPeriodEndTimestamp = (

0 commit comments

Comments
 (0)