Skip to content

Commit 56cc34a

Browse files
committed
feat: mobile responsiveness, font-sizes
1 parent 0541466 commit 56cc34a

File tree

31 files changed

+80
-61
lines changed

31 files changed

+80
-61
lines changed

web-devtools/src/app/(main)/(homepage)/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import Tools from "./Tools";
1212
const Container = styled.div`
1313
width: 100%;
1414
background-color: ${({ theme }) => theme.klerosUIComponentsLightBackground};
15-
padding: ${responsiveSize(32, 72)} ${responsiveSize(24, 132)} ${responsiveSize(76, 96)};
15+
padding: ${responsiveSize(32, 72)} ${responsiveSize(8, 132)} ${responsiveSize(76, 96)};
1616
max-width: 1780px;
1717
margin: 0 auto;
1818
`;

web/src/components/CasesDisplay/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,11 @@ const TitleContainer = styled.div`
2222

2323
const StyledTitle = styled.h1`
2424
margin: 0px;
25+
font-size: ${responsiveSize(20, 24)};
2526
`;
2627

2728
const StyledLabel = styled.label`
28-
font-size: 16px;
29+
font-size: ${responsiveSize(14, 16)};
2930
`;
3031

3132
interface ICasesDisplay extends ICasesGrid {

web/src/components/DisputePreview/DisputeContext.tsx

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ import { ExternalLink } from "../ExternalLink";
1919
const StyledH1 = styled.h1`
2020
margin: 0;
2121
word-wrap: break-word;
22+
font-size: ${responsiveSize(18, 24)};
23+
line-height: 24px;
2224
`;
2325

2426
const ReactMarkdownWrapper = styled.div`
@@ -36,17 +38,25 @@ const VotingOptions = styled.div`
3638
const AnswersContainer = styled.div`
3739
display: flex;
3840
flex-direction: column;
41+
gap: ${responsiveSize(4, 2)};
3942
`;
4043

4144
const AnswersHeader = styled.small`
4245
margin: 0;
4346
`;
4447

45-
const Answer = styled.div`
46-
margin: 0px;
47-
display: flex;
48-
flex-wrap: wrap;
49-
gap: 6px;
48+
export const AnswerTitleAndDescription = styled.div`
49+
display: block;
50+
`;
51+
52+
export const AnswerTitle = styled.small`
53+
display: inline;
54+
`;
55+
56+
export const AnswerDescription = styled.small`
57+
display: inline;
58+
font-weight: 400;
59+
color: ${({ theme }) => theme.secondaryText};
5060
`;
5161

5262
const AliasesContainer = styled.div`
@@ -90,12 +100,11 @@ export const DisputeContext: React.FC<IDisputeContext> = ({ disputeDetails, isRp
90100
{isUndefined(disputeDetails) ? null : <AnswersHeader>Voting Options</AnswersHeader>}
91101
<AnswersContainer>
92102
{disputeDetails?.answers?.map((answer: IAnswer, i: number) => (
93-
<Answer key={answer.title}>
94-
<small>
95-
<label>{i + 1}.</label> {answer.title}
96-
{answer.description.trim() ? ` - ${answer.description}` : null}
97-
</small>
98-
</Answer>
103+
<AnswerTitleAndDescription key={answer.title}>
104+
<label>{i + 1}. </label>
105+
<AnswerTitle>{answer.title}</AnswerTitle>
106+
<AnswerDescription>{answer.description.trim() ? ` - ${answer.description}` : null}</AnswerDescription>
107+
</AnswerTitleAndDescription>
99108
))}
100109
</AnswersContainer>
101110
</VotingOptions>

web/src/components/EvidenceCard.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ const StyledCard = styled(Card)`
3030
const TopContent = styled.div`
3131
display: flex;
3232
flex-direction: column;
33-
padding: ${responsiveSize(8, 24)};
34-
gap: ${responsiveSize(4, 8)};
33+
padding: ${responsiveSize(8, 20)} ${responsiveSize(8, 24)};
34+
gap: 4px;
3535
overflow-wrap: break-word;
3636
3737
> * {

web/src/components/FavoriteCases.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ const Container = styled.div`
1919

2020
const Title = styled.h1`
2121
margin-bottom: 4px;
22+
font-size: ${responsiveSize(20, 24)};
2223
`;
2324

2425
const DisputeContainer = styled.div`

web/src/components/LatestCases.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ const Container = styled.div`
1818

1919
const Title = styled.h1`
2020
margin-bottom: ${responsiveSize(12, 24)};
21+
font-size: ${responsiveSize(20, 24)};
2122
`;
2223

2324
const DisputeContainer = styled.div`

web/src/components/Verdict/Answer.tsx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ import styled from "styled-components";
33

44
import { Answer } from "@kleros/kleros-sdk/src/dataMappings/utils/disputeDetailsTypes";
55

6+
import { AnswerDescription, AnswerTitle, AnswerTitleAndDescription } from "../DisputePreview/DisputeContext";
7+
68
const Container = styled.div`
79
display: flex;
810
flex-direction: row;
@@ -20,13 +22,10 @@ const AnswerDisplay: React.FC<IAnswer> = ({ answer, currentRuling }) => {
2022
return (
2123
<>
2224
{answer ? (
23-
<Container>
24-
<small>
25-
{answer.title}
26-
{answer.description.trim() ? " -" : null}
27-
</small>
28-
<small>{answer.description.trim()}</small>
29-
</Container>
25+
<AnswerTitleAndDescription>
26+
<AnswerTitle>{answer.title}</AnswerTitle>
27+
<AnswerDescription>{answer.description.trim() ? ` - ${answer.description}` : null}</AnswerDescription>
28+
</AnswerTitleAndDescription>
3029
) : (
3130
<Container>
3231
{currentRuling !== 0 ? <small>Answer 0x{currentRuling}</small> : <small>Refuse to Arbitrate</small>}

web/src/pages/Cases/AttachmentDisplay/Header.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const TitleContainer = styled.div`
2727

2828
const Title = styled.h1`
2929
margin: 0px;
30-
font-size: ${responsiveSize(16, 24)};
30+
font-size: ${responsiveSize(20, 24)};
3131
`;
3232

3333
const StyledPaperClip = styled(PaperClip)`

web/src/pages/Cases/CaseDetails/Appeal/OptionCard.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React, { useMemo } from "react";
22
import styled from "styled-components";
33

4+
import { responsiveSize } from "styles/responsiveSize";
45
import { hoverShortTransitionTiming } from "styles/commonStyles";
56

67
import { useMeasure } from "react-use";
@@ -15,7 +16,7 @@ import { isUndefined } from "utils/index";
1516
const StyledCard = styled(Card)`
1617
${hoverShortTransitionTiming}
1718
width: 100%;
18-
padding: 24px;
19+
padding: ${responsiveSize(12, 24)} ${responsiveSize(8, 24)};
1920
2021
&:hover {
2122
cursor: pointer;

web/src/pages/Cases/CaseDetails/Appeal/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import AppealHistory from "./AppealHistory";
1313
import Classic from "./Classic";
1414

1515
const Container = styled.div`
16-
padding: ${responsiveSize(16, 32)};
16+
padding: ${responsiveSize(16, 32)} ${responsiveSize(8, 32)};
1717
`;
1818

1919
export const AppealHeader = styled.div`
@@ -33,6 +33,7 @@ export const AppealHeader = styled.div`
3333

3434
export const StyledTitle = styled.h1`
3535
margin: 0;
36+
font-size: ${responsiveSize(18, 24)};
3637
`;
3738

3839
const Appeal: React.FC<{ currentPeriodIndex: number }> = ({ currentPeriodIndex }) => {

0 commit comments

Comments
 (0)