internetarchive / bookreader

The Internet Archive BookReader
https://openlibrary.org/dev/docs/bookreader
GNU Affero General Public License v3.0
996 stars 418 forks source link

Ensure bookreader buttons inherit body font stack #1337

Closed rebecca-shoptaw closed 2 months ago

rebecca-shoptaw commented 3 months ago

Problem

Currently, the "Add bookmark" button in the side panel is defaulting to Arial for its font, when it should use the same Helvetica Neue font stack as the other buttons.

It seems that this is because other buttons such as the "Login" button are actually a elements styled as buttons, so they correctly inherit the body font-stack:

Login button

Whereas the default button styles for the "Add bookmark" button seem to be overriding the inheritance and defaulting to Arial:

Incorrect font image

Solution

Very simple! I just added font-family: inherit to the ia-button class, which should ensure this and any other button.ia-button elements in the side panel retain the correct inherited font:

Button with correct font

Testing

Option 1 - demo from PR

Option 2 - dev tools in prod context Since this is a one-line fix, it can also easily be tested via the dev tools in the production site:

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 69.30%. Comparing base (2d19d55) to head (ad1b546). Report is 7 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1337 +/- ## ======================================= Coverage 69.30% 69.30% ======================================= Files 59 59 Lines 5082 5082 Branches 1069 1069 ======================================= Hits 3522 3522 Misses 1533 1533 Partials 27 27 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.