internetarchive / internetarchive/openlibrary

Make font size consistent throughout the site

Open
#8,692 5 comments 0 reactions 0 assignees View on GitHub
Lead: @cdrini Priority: 3 Team: Front-end Theme: CSS Theme: Design Type: Design Proposal
Dominant language
Python
Stars
6.7k
Forks
2k
Avg merge
2d 19h
Merged PRs (30d)
138

Description

We don't have any real rigor around font-sizes on open library.

Using the font sizes Roya created (note the first number, before the `/` is the font size. The second number is the line-height, but we should ignore that for now).

![image](https://github.com/internetarchive/openlibrary/assets/6251786/69537f28-eebe-4985-b60c-60e2a213341a)

- Also add a `@font-size-caption: 12px`.

We should revisit most places we use `font-size` -- especially on the books page and in `static/css/base` .

Next steps:

- [x] Add to `font-families.less` variables for the different sizes as defined in the graphic above. (eg `@font-size-display-large: 57px;`), and so on.
- [ ] Using your browsers dev tools, investigate the places where different font-sizes are used on the books page. Remove custom configs where not needed (we set the font-size way too much).
- [ ] If a font-size _must_ be set, change it to use the closest font size from the set. If possible, set the font size in `static/css/base` so it applies consistently to all e.g. `h2` elements instead of just a specific `h2`. But if that's not possible, just change the specific font-size to use the `@` less variable for font size.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.