lxndrblz/anatole

Font size conflicts within gist code blocks

Closed this issue · 2 comments

Describe the bug

When we use gist shortcode to display GitHub Gist codes, e.g.

{{< gist jmooring 50a7482715eac222e230d1e64dd9a89b >}}

In current version (38de0c9), it shows like this:

Screenshot 2023-04-19 at 5 54 49 PM

Some letters are bigger and some are smaller. And it applies to all desktop/mobile browsers.

Additional context

I believe this issue is similar to #406, which causes by the wildcard font-size setting.

* {
@include ltr {
font-family: 'PingHei', 'PingFang SC', 'Helvetica Neue', 'Work Sans', 'Hiragino Sans GB', sans-serif;
font-size: 1.6rem;
}

To temporarily fix this problem, put this code into your custom.css file:

* {
    font-size: inherit;
}

body {
    font-size: 1.6rem;
}

Also, there is a giant font size bug in Gist code blocks with iOS Safari view:

Screenshot 2023-04-20 at 12 09 47 AM

And it cannot be reproduced in Chrome/Firefox Desktop or even iPad. Adding this code to the custom css file will fix this problem, but still, I don't know why... 😂

html {
    -webkit-text-size-adjust: 100%;
}