Skip to content

Commit

Permalink
✨ (grapher) make title wider on smaller screens (#3676)
Browse files Browse the repository at this point in the history
  • Loading branch information
sophiamersmann authored Jun 3, 2024
1 parent bc19dbc commit 2584c37
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/@ourworldindata/grapher/src/header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,16 @@ export class Header<
}

@computed get title(): TextWrap {
const logoPadding = this.manager.isNarrow
? 12
: this.manager.isSmall
? 16
: 24

const makeTitle = (fontSize: number): TextWrap =>
new TextWrap({
text: this.titleText,
maxWidth: this.maxWidth - this.logoWidth - 24,
maxWidth: this.maxWidth - this.logoWidth - logoPadding,
fontWeight: this.titleFontWeight,
lineHeight: this.titleLineHeight,
fontSize,
Expand Down

0 comments on commit 2584c37

Please sign in to comment.