pages-themes / slate

Slate is a Jekyll theme for GitHub Pages
https://pages-themes.github.io/slate/
Creative Commons Zero v1.0 Universal
303 stars 981 forks source link

Make usage of <code> in headers *not* ugly on small device screens #85

Open toughengineer opened 1 year ago

toughengineer commented 1 year ago

This is similar to Make usage of \<code> in headers not ugly #34 and fixes the issue for small screens.

The base font size is 14px, the size of code and pre elements is supposed to be 11px. 11/14 = 0.7(857142857142), 0.7857 seems to be the good place to truncate it. So for 14px base size code and pre size will be 14px*0.7857 = 10,9998px which is very close to 11px.

Before the fix: toughengineer github io_talks_2023_C++%20Russia_(Samsung Galaxy S8+)

After the fix: toughengineer github io_talks_2023_C++%20Russia_(Samsung Galaxy S8+) (1)

koppor commented 11 months ago

@toughengineer I stumbled on this PR and saw that there were failing checks, but I could not check. Maybe, you can add a commit to rigger the checks again?

Update: Maybe the errors are because of https://github.com/pages-themes/slate/issues/60#issuecomment-811567432?

toughengineer commented 11 months ago

@koppor, here you go. No idea about the failing checks.

koppor commented 11 months ago

For the record, this is the error:

HTML-Proofer finished successfully.
Inspecting 3 files
..W

Offenses:

script/validate-html:23:40: W: [Correctable] Lint/RedundantStringCoercion: Redundant use of Object#to_s in puts.
  results.errors.each { |err| puts err.to_s }
                                       ^^^^

3 files inspected, 1 offense detected, 1 offense autocorrectable