Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code snippets in the Documentation without a monospace fallback #1802

Closed
penge opened this issue Apr 7, 2020 · 5 comments · Fixed by #1803
Closed

Code snippets in the Documentation without a monospace fallback #1802

penge opened this issue Apr 7, 2020 · 5 comments · Fixed by #1803
Assignees
Labels
design Visual appearance of the built documentation

Comments

@penge
Copy link
Contributor

penge commented Apr 7, 2020

🐛 Bug Report

Code snippets in the Documentation at https://www.elastic.co/guide/index.html don't have a correct fallback font - font that would be used if none of the monospaced fonts is present. Right now, the fallback is sans-serif, but should be monospace.

To Reproduce

Open:

In the case of Chrome OS, the code snippet would have sans-serif font. It would look like:

before

Expected behavior

Expected is to have a monospace fallback. It would look like this:

after

This is easy to fix. Change the style from:

#guide .prettyprint span {
    font-family: Consolas,Menlo,DejaVu Sans Mono,Bitstream Vera Sans Mono,Lucida Console;
}

To:

#guide .prettyprint span {
    font-family: Consolas,Menlo,DejaVu Sans Mono,Bitstream Vera Sans Mono,Lucida Console,monospace;
}

This would use a Fixed-width font (monospace) based on the OS. In the case of Chrome OS, it would be Cousine. Elsewhere it could be Courier New. Right now, the fallback is sans-serif because that's how it's defined in:

guide * {
  font-family: Inter,sans-serif;
}

Your Environment

  • os: Chrome OS, Version 80
@delvedor
Copy link
Member

delvedor commented Apr 9, 2020

@elastic/webteam could you take a look at this?

@cnbishop
Copy link

cnbishop commented Apr 9, 2020

Hi @delvedor - the docs team would handle this - I dropped a message in #techpubs and will update you. Thanks!

@jrodewig jrodewig transferred this issue from elastic/elasticsearch-js Apr 9, 2020
@jrodewig
Copy link
Contributor

jrodewig commented Apr 9, 2020

Transferring this to the elastic/docs repo as that's where these styles are stored. I'll work on raising a PR to address.

@jrodewig jrodewig self-assigned this Apr 9, 2020
@jrodewig jrodewig added the design Visual appearance of the built documentation label Apr 9, 2020
@delvedor
Copy link
Member

delvedor commented Apr 9, 2020

Thanks!

cc @penge if you are wondering where the issue has been moved :)

@penge
Copy link
Contributor Author

penge commented Apr 11, 2020

found the issue, thanks for handling it so quickly :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design Visual appearance of the built documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants