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

Fix unreadable code blocks chrome.css #1659

Closed
wants to merge 1 commit into from

Conversation

pickfire
Copy link
Contributor

@pickfire pickfire commented Oct 3, 2021

I am not sure cases .hljs is used so I can't specifically enable this so I added a few other whitelisted stuff.

Before

image

After

image

Screenshots taken from helix editor. https://github.com/helix-editor/helix although the styles are a bit custom but these parts are not customized.

@ehuss
Copy link
Contributor

ehuss commented Oct 3, 2021

Thanks for the PR! Can you provide some background here? What does the original markdown look like? Why is it being rendered in such a strange way? Why add td and p to this rule?

I wouldn't expect this change to be needed. Inline code is intended to be highlighted except for exceptionally rare circumstances (like a tags).

@pickfire
Copy link
Contributor Author

pickfire commented Oct 8, 2021

The blockquote parts seemed to have the same background and foreground.

## Normal mode                                                                  

### Movement                                                                    

> NOTE: Unlike vim, `f`, `F`, `t` and `T` are not confined to the current line. 
| Key          | Description                                        | Command                     |
| -----        | -----------                                        | -------                     |                                                             
| `h`, `Left`  | Move left                                          | `move_char_left`            |                                                             
| `j`, `Down`  | Move down                                          | `move_char_right`           |                                                             
| `k`, `Up`    | Move up                                            | `move_line_up`              |

Not sure why is it being rendered in such as strange way. So I had to add td and p to those .hljs that was being generated here to fix the issue.

@ehuss
Copy link
Contributor

ehuss commented Oct 11, 2021

I don't see that when built locally:

image

It looks like they have a custom theme. Perhaps there is an issue in their theme? Maybe it is using an out-of-date copy?

@pickfire
Copy link
Contributor Author

pickfire commented Oct 14, 2021

It looks like they have a custom theme. Perhaps there is an issue in their theme? Maybe it is using an out-of-date copy?

I updated the copy using the new css, maybe will try again, only some parts are different from what I see which likely won't affect it. I almost compared it one by one.

@ehuss
Copy link
Contributor

ehuss commented Oct 14, 2021

It is unlikely the CSS, but the fonts. mdbook no longer loads fonts from google's CDN, and uses a particular version of source code pro to avoid a problem with firefox on macos (#1307).

@pickfire
Copy link
Contributor Author

Oh weird, I tried doing a new mdbook and can't seemed to reproduce this, probably something funny we did with our css.

@pickfire pickfire closed this Oct 17, 2021
@pickfire pickfire deleted the patch-2 branch October 17, 2021 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants