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

Position of background stripes are not synchronized to lines(Coy theme) #1670

Open
tousei-seiso opened this issue Dec 22, 2018 · 2 comments
Open

Comments

@tousei-seiso
Copy link

The Coy theme draws striped background color for improve visibility.

These striped backgrounds should have same height to the line height. But, it seems to have a little different value from line height, and it gradually shifts the position the stripes are drawn.

Sample post is below(it reproduced in both upper and lower source code boxes) :
http://red-souls.jp/ichounoki/rnote/software/20181216_042333932863.htm

Initially (first row, second row, ...), the light color background is in even row, the dark color background is in odd row, but it gradually deviates in the lower rows, the position is reversed.

@RunDevelopment
Copy link
Member

RunDevelopment commented Dec 22, 2018

This bug seems to be specific to Chrome. FF and Edge do not show this bug.


prettify.css overwrites the font-size property of code elements which causes this drift.
Removing line 80 in prettify.css or adding a line font-size: inherit; in line 38 in prism.css will solve your problem.

This is not a general fix.

It seems like every font-size which is not a multiple of 8px will cause this behavior.


Update:
This is definitely a bug of Chrome. The font sizes at which the lines will go out of sync depend on both your current zoom-level and your system's DPI scaling settings.

But it seems that choosing a multiple of 2px will hide this bug on 100% DPI scaling with no zoom.

@tousei-seiso
Copy link
Author

tousei-seiso commented Dec 22, 2018

This is definitely a bug of Chrome. The font sizes at which the lines will go out of sync depend on both >your current zoom-level and your system's DPI scaling settings.

But it seems that choosing a multiple of 2px will hide this bug on 100% DPI scaling with no zoom.

Thanks to the comment. I confirmed that IE11, Edge, Fire Fox shows the stripe correctly.

Removing line 80 in prettify.css or adding a line font-size: inherit; in line 38 in prism.css will solve your problem.

Unfortunately, I tried both of above but nothing changed with Chrome. I sent the feedback to Chrome developer from Chrome/menu/help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants