Barba: Typography looks transparent on code samples

Created on 26 Feb 2020  路  13Comments  路  Source: barbajs/barba

the font styles for the code examples in the docs are really light and a bit hard to read. maybe bump the font weight up one? other than that, love the awesome new site!

Screen Shot 2020-02-25 at 4 12 13 PM

documentation

All 13 comments

Hi @trevasco,

Thanks for getting in touch.
Unfortunately, it depends on the web browser you are using and how it is configured.

On Google Chrome with the default settings, the font weight looks good:
fdef

What browser do you use?

hmm strange.. I'm on the latest Google Chrome, and don't recall ever messing with any settings

@trevasco,

Can you try on another browser, or just reset your Chrome settings, then restart, then test and show the result. Thanks :wink:

yeah I just reset them and same issue 馃し鈥嶁檪

looks the same on firefox / safari as well

MacOS or Windows? (or Linux? ... :smile:)

macOS Sierra. I checked it on browserstack with same settings and it looks fine, so definitely something specific with my machine, just not sure what 馃槃

The site is using monospace, so probably something wrong with the typo file on your machine. Or probably something about font smoothing. Sorry to be unable to help you with that :disappointed:

I am closing the issue :wink:

This shouldn't be closed. I have to increase the font-weight in the inspector every time i visit the site. It's near impossible to read otherwise. I'm using Chrome on the latest MacOS.

Hi @gitgudcameron,

This is something we will look into and check. Thanks for the feedback.

@gitgudcameron some people reported this issue, can you please share a screenshort of the rendering you got on MacOS/Chome?

Thanks a lot!

Hey @xavierfoucrier,

Hopefully some of this is useful. It's rendering 'Source Code Pro ExtraLight'.

Adding this font-weight does the trick for me:

.code {
    font-weight: 400;
}

Screen Shot 2020-04-06 at 9 26 16 pm
Screen Shot 2020-04-06 at 9 31 48 pm
Screen Shot 2020-04-06 at 9 30 48 pm

@gitgudcameron thanks for the share.

This is probably because Chrome resolves the font using your local files through the name "Source Code Pro". I am on Windows and doesn't have those typos installed, that's why I haven't seen this bug.

I close the issue, and will push a fix with the next documentation update.

EDIT: I finally found that the typo "Source Code Pro" is not properly added to the main stylesheet, that was the browser use the local typo in certain cases where the typo is available, fallback to monospace or consolas instead.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Mexikaner9 picture Mexikaner9  路  3Comments

ershad989 picture ershad989  路  4Comments

shanewmurphy picture shanewmurphy  路  3Comments

EmilyChews picture EmilyChews  路  3Comments

shanewmurphy picture shanewmurphy  路  3Comments