Skip to content

Commit

Permalink
new type scale (#91)
Browse files Browse the repository at this point in the history
* increase font size on progress bar and attempts left

* increase font size

* update snaps

---------

Co-authored-by: Beth Shook <es66@rice.edu>
  • Loading branch information
bethshook and Beth Shook authored Feb 19, 2025
1 parent bea6052 commit df20459
Show file tree
Hide file tree
Showing 12 changed files with 67 additions and 67 deletions.
2 changes: 1 addition & 1 deletion src/components/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ const StepCardHeader = styled.div`
`}
${breakpoints.mobile`
font-size: 1.4rem;
font-size: 1.6rem;
line-height: 2rem;
padding: 10px 8px;
Expand Down
2 changes: 1 addition & 1 deletion src/components/ExerciseHeaderIcons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const Popover = styled.div`
top: 3rem;
width: 20rem;
position: absolute;
font-size: 1.2rem;
font-size: 1.4rem;
line-height: 1.8rem;
`;

Expand Down
2 changes: 1 addition & 1 deletion src/components/ExerciseToolbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export const StyledToolbar = styled.div<{
span {
display: block;
font-size: 1rem;
font-size: 1.4rem;
margin-top: 0.2rem;
color: ${colors.palette.neutral};
text-align: center;
Expand Down
2 changes: 1 addition & 1 deletion src/components/ProgressBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export const StyledItem = styled.button<{ variant: ProgressBarItemVariant, isAct
border: 0;
border-radius: 50%;
margin: ${props => props.isActive ? '0' : '0 0.3rem'};
font-size: 1.4rem;
font-size: 1.6rem;
font-weight: bold;
cursor: pointer;
color: ${colors.palette.neutralDarker};
Expand Down
2 changes: 1 addition & 1 deletion src/components/StepCardFooter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export const StepCardFooter = styled.div`
display: flex;
flex-wrap: wrap;
justify-content: space-between;
font-size: calc(1.4rem * var(--content-text-scale));
font-size: calc(1.6rem * var(--content-text-scale));
line-height: calc(2rem * var(--content-text-scale));
background: ${colors.card.body.background};
overflow: auto;
Expand Down
10 changes: 5 additions & 5 deletions src/components/__snapshots__/Card.spec.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ exports[`StepCard matches snapshot 1`] = `
className="sc-bczRLJ eAXREJ"
>
<div
className="sc-dkzDqf ihThJf"
className="sc-dkzDqf iertSZ"
>
<div>
<h2
Expand Down Expand Up @@ -55,7 +55,7 @@ exports[`StepCard matches snapshot with more than one question 1`] = `
className="sc-bczRLJ eAXREJ"
>
<div
className="sc-dkzDqf ihThJf"
className="sc-dkzDqf iertSZ"
>
<div>
<h2
Expand Down Expand Up @@ -109,7 +109,7 @@ exports[`TaskStepCard can optionally provide task 1`] = `
className="sc-bczRLJ eAXREJ exercise-step"
>
<div
className="sc-dkzDqf ihThJf"
className="sc-dkzDqf iertSZ"
>
<div>
<h2
Expand Down Expand Up @@ -148,7 +148,7 @@ exports[`TaskStepCard can optionally provide type 1`] = `
className="sc-bczRLJ eAXREJ exercise-step"
>
<div
className="sc-dkzDqf ihThJf"
className="sc-dkzDqf iertSZ"
>
<div>
<h2
Expand Down Expand Up @@ -187,7 +187,7 @@ exports[`TaskStepCard matches snapshot 1`] = `
className="sc-bczRLJ eAXREJ exercise-step"
>
<div
className="sc-dkzDqf ihThJf"
className="sc-dkzDqf iertSZ"
>
<div>
<h2
Expand Down
34 changes: 17 additions & 17 deletions src/components/__snapshots__/Exercise.spec.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ exports[`Exercise using step data matches snapshot 1`] = `
className="sc-bczRLJ eAXREJ exercise-step sc-evZas dPJYxI sc-ksZaOG kmSAkY"
>
<div
className="sc-dkzDqf ihThJf"
className="sc-dkzDqf iertSZ"
>
<div>
<h2
Expand Down Expand Up @@ -157,7 +157,7 @@ exports[`Exercise using step data matches snapshot 1`] = `
</div>
</div>
<div
className="sc-iBkjds kLYXXQ step-card-footer"
className="sc-iBkjds gVkNEK step-card-footer"
>
<div
className="step-card-footer-inner"
Expand Down Expand Up @@ -203,7 +203,7 @@ exports[`Exercise with question state data matches snapshot 1`] = `
className="sc-bczRLJ eAXREJ exercise-step sc-evZas dPJYxI sc-ksZaOG kmSAkY"
>
<div
className="sc-dkzDqf ihThJf"
className="sc-dkzDqf iertSZ"
>
<div>
<h2
Expand Down Expand Up @@ -342,7 +342,7 @@ exports[`Exercise with question state data matches snapshot 1`] = `
</div>
</div>
<div
className="sc-iBkjds kLYXXQ step-card-footer"
className="sc-iBkjds gVkNEK step-card-footer"
>
<div
className="step-card-footer-inner"
Expand Down Expand Up @@ -381,7 +381,7 @@ exports[`Exercise with question state data renders header icons with multiple ch
className="sc-breuTD uXhmp"
>
<div
className="sc-ftvSup jndYKm"
className="sc-ftvSup eUSUwo"
>
<a
href="https://openstax.org"
Expand Down Expand Up @@ -442,7 +442,7 @@ exports[`Exercise with question state data renders header icons with multiple ch
className="sc-bczRLJ eAXREJ exercise-step sc-evZas dPJYxI sc-ksZaOG kmSAkY"
>
<div
className="sc-dkzDqf ihThJf"
className="sc-dkzDqf iertSZ"
>
<div>
<h2
Expand Down Expand Up @@ -495,7 +495,7 @@ exports[`Exercise with question state data renders header icons with multiple ch
/>
</svg>
<div
className="sc-kDDrLX fBhBLm popover right"
className="sc-kDDrLX cCjffY popover right"
>
<div
className="arrow"
Expand Down Expand Up @@ -535,7 +535,7 @@ exports[`Exercise with question state data renders header icons with multiple ch
/>
</svg>
<div
className="sc-kDDrLX fBhBLm popover right"
className="sc-kDDrLX cCjffY popover right"
>
<div
className="arrow"
Expand Down Expand Up @@ -667,7 +667,7 @@ exports[`Exercise with question state data renders header icons with multiple ch
</div>
</div>
<div
className="sc-iBkjds kLYXXQ step-card-footer"
className="sc-iBkjds gVkNEK step-card-footer"
>
<div
className="step-card-footer-inner"
Expand Down Expand Up @@ -706,7 +706,7 @@ exports[`Exercise with question state data renders header icons with two-step ex
className="sc-breuTD uXhmp"
>
<div
className="sc-ftvSup jndYKm"
className="sc-ftvSup eUSUwo"
>
<a
href="https://openstax.org"
Expand Down Expand Up @@ -767,7 +767,7 @@ exports[`Exercise with question state data renders header icons with two-step ex
className="sc-bczRLJ eAXREJ exercise-step sc-evZas dPJYxI sc-ksZaOG kmSAkY"
>
<div
className="sc-dkzDqf ihThJf"
className="sc-dkzDqf iertSZ"
>
<div>
<h2
Expand Down Expand Up @@ -820,7 +820,7 @@ exports[`Exercise with question state data renders header icons with two-step ex
/>
</svg>
<div
className="sc-kDDrLX fBhBLm popover right"
className="sc-kDDrLX cCjffY popover right"
>
<div
className="arrow"
Expand Down Expand Up @@ -860,7 +860,7 @@ exports[`Exercise with question state data renders header icons with two-step ex
/>
</svg>
<div
className="sc-kDDrLX fBhBLm popover right"
className="sc-kDDrLX cCjffY popover right"
>
<div
className="arrow"
Expand Down Expand Up @@ -900,7 +900,7 @@ exports[`Exercise with question state data renders header icons with two-step ex
/>
</svg>
<div
className="sc-kDDrLX fBhBLm popover right"
className="sc-kDDrLX cCjffY popover right"
>
<div
className="arrow"
Expand Down Expand Up @@ -1032,7 +1032,7 @@ exports[`Exercise with question state data renders header icons with two-step ex
</div>
</div>
<div
className="sc-iBkjds kLYXXQ step-card-footer"
className="sc-iBkjds gVkNEK step-card-footer"
>
<div
className="step-card-footer-inner"
Expand Down Expand Up @@ -1078,7 +1078,7 @@ exports[`Exercise with question state data shows a detailed solution 1`] = `
className="sc-bczRLJ eAXREJ exercise-step sc-evZas dPJYxI sc-ksZaOG kmSAkY"
>
<div
className="sc-dkzDqf ihThJf"
className="sc-dkzDqf iertSZ"
>
<div>
<h2
Expand Down Expand Up @@ -1217,7 +1217,7 @@ exports[`Exercise with question state data shows a detailed solution 1`] = `
</div>
</div>
<div
className="sc-iBkjds kLYXXQ step-card-footer"
className="sc-iBkjds gVkNEK step-card-footer"
>
<div
className="step-card-footer-inner"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ exports[`ExerciseIcons matches snapshot 1`] = `
/>
</svg>
<div
className="sc-dkzDqf dhyzaB popover right"
className="sc-dkzDqf iulbST popover right"
>
<div
className="arrow"
Expand Down Expand Up @@ -71,7 +71,7 @@ exports[`ExerciseIcons matches snapshot 1`] = `
/>
</svg>
<div
className="sc-dkzDqf dhyzaB popover right"
className="sc-dkzDqf iulbST popover right"
>
<div
className="arrow"
Expand Down Expand Up @@ -111,7 +111,7 @@ exports[`ExerciseIcons matches snapshot 1`] = `
/>
</svg>
<div
className="sc-dkzDqf dhyzaB popover right"
className="sc-dkzDqf iulbST popover right"
>
<div
className="arrow"
Expand Down
20 changes: 10 additions & 10 deletions src/components/__snapshots__/ExerciseQuestion.spec.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ exports[`ExerciseQuestion matches snapshot 1`] = `
</div>
</div>
<div
className="sc-hKMtZM IyIWE step-card-footer"
className="sc-hKMtZM iGTyMe step-card-footer"
>
<div
className="step-card-footer-inner"
Expand Down Expand Up @@ -252,7 +252,7 @@ exports[`ExerciseQuestion renders Re-submit button 1`] = `
</div>
</div>
<div
className="sc-hKMtZM IyIWE step-card-footer"
className="sc-hKMtZM iGTyMe step-card-footer"
>
<div
className="step-card-footer-inner"
Expand Down Expand Up @@ -399,7 +399,7 @@ exports[`ExerciseQuestion renders Save button 1`] = `
</div>
</div>
<div
className="sc-hKMtZM IyIWE step-card-footer"
className="sc-hKMtZM iGTyMe step-card-footer"
>
<div
className="step-card-footer-inner"
Expand Down Expand Up @@ -546,7 +546,7 @@ exports[`ExerciseQuestion renders Submit & continue button 1`] = `
</div>
</div>
<div
className="sc-hKMtZM IyIWE step-card-footer"
className="sc-hKMtZM iGTyMe step-card-footer"
>
<div
className="step-card-footer-inner"
Expand Down Expand Up @@ -687,7 +687,7 @@ exports[`ExerciseQuestion renders all attempts remaining 1`] = `
</div>
</div>
<div
className="sc-hKMtZM IyIWE step-card-footer"
className="sc-hKMtZM iGTyMe step-card-footer"
>
<div
className="step-card-footer-inner"
Expand Down Expand Up @@ -840,7 +840,7 @@ exports[`ExerciseQuestion renders continue button (unused?) 1`] = `
</div>
</div>
<div
className="sc-hKMtZM IyIWE step-card-footer"
className="sc-hKMtZM iGTyMe step-card-footer"
>
<div
className="step-card-footer-inner"
Expand Down Expand Up @@ -992,7 +992,7 @@ exports[`ExerciseQuestion renders detailed solution and published comments 1`] =
</div>
</div>
<div
className="sc-hKMtZM IyIWE step-card-footer"
className="sc-hKMtZM iGTyMe step-card-footer"
>
<div
className="step-card-footer-inner"
Expand Down Expand Up @@ -1156,7 +1156,7 @@ exports[`ExerciseQuestion renders free response 1`] = `
</div>
</div>
<div
className="sc-hKMtZM IyIWE step-card-footer"
className="sc-hKMtZM iGTyMe step-card-footer"
>
<div
className="step-card-footer-inner"
Expand Down Expand Up @@ -1302,7 +1302,7 @@ exports[`ExerciseQuestion renders no attempts remaining 1`] = `
</div>
</div>
<div
className="sc-hKMtZM IyIWE step-card-footer"
className="sc-hKMtZM iGTyMe step-card-footer"
>
<div
className="step-card-footer-inner"
Expand Down Expand Up @@ -1448,7 +1448,7 @@ exports[`ExerciseQuestion renders some attempts remaining 1`] = `
</div>
</div>
<div
className="sc-hKMtZM IyIWE step-card-footer"
className="sc-hKMtZM iGTyMe step-card-footer"
>
<div
className="step-card-footer-inner"
Expand Down
6 changes: 3 additions & 3 deletions src/components/__snapshots__/ExerciseToolbar.spec.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

exports[`ExerciseToolbar conditionally renders icons 2`] = `
<div
className="sc-bczRLJ hhNxoz"
className="sc-bczRLJ cYbzQJ"
>
<a
href="https://openstax.org"
Expand Down Expand Up @@ -34,7 +34,7 @@ exports[`ExerciseToolbar conditionally renders icons 2`] = `

exports[`ExerciseToolbar conditionally renders icons 3`] = `
<div
className="sc-bczRLJ hhNxoz"
className="sc-bczRLJ cYbzQJ"
>
<a
href="https://openstax.org"
Expand Down Expand Up @@ -66,7 +66,7 @@ exports[`ExerciseToolbar conditionally renders icons 3`] = `

exports[`ExerciseToolbar matches snapshot 1`] = `
<div
className="sc-bczRLJ hhNxoz"
className="sc-bczRLJ cYbzQJ"
>
<a
href="https://openstax.org"
Expand Down
Loading

0 comments on commit df20459

Please sign in to comment.