Skip to content

Commit

Permalink
fix(lib-react-components): inconsistent text sizing in markdown (#6362)
Browse files Browse the repository at this point in the history
Style markdown tables and lists with a font size of 1rem, so that they match the default paragraph size.
  • Loading branch information
eatyourgreens authored Oct 17, 2024
1 parent 06eb381 commit 0fe1237
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions packages/lib-react-components/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- refactor `AnimatedNumber` to fix a bug where deferred values are displayed as 0.
- Style RegisterForm as one column for `small` screensize.
- Project card badges are now circular in Safari.
- Inconsistent text sizes for Markdown tables and lists.

## [1.13.0] 2024-05-17

Expand Down
10 changes: 7 additions & 3 deletions packages/lib-react-components/src/Markdownz/Markdownz.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,17 @@ const StyledHorizontalRule = styled.hr`
width: 100%;
`
const StyledOrderedList = styled.ol`
font-size: 14px;
font-size: 1rem;
margin-top: 0;
`
const StyledUnorderedList = styled.ul`
font-size: 14px;
font-size: 1rem;
margin-top: 0;
`
const StyledTable = styled(Table)`
font-size: 1rem;
`

const StyledVideo = styled.video`
max-width: 100%;
`
Expand All @@ -68,7 +72,7 @@ const componentMappings = {
img: renderMedia,
p: Paragraph,
span: Text,
table: Table,
table: StyledTable,
tfoot: TableFooter,
thead: TableHeader,
tbody: TableBody,
Expand Down

0 comments on commit 0fe1237

Please sign in to comment.