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 inline line highlight padding, wrapping, and gutter background #1501

Merged
merged 5 commits into from
Mar 12, 2020

Conversation

facelessuser
Copy link
Contributor

@facelessuser facelessuser commented Mar 10, 2020

  • Line highlight pad should match the parent
  • Float the gutter left to force code and numbers not to wrap
  • Provide a background for the gutter

Fixes #1499

- Line highlight pad should match the parent
- Float the gutter left to force code and numbers not to wrap
- Provide a background for the gutter
@facelessuser
Copy link
Contributor Author

How do you want to handle the coloring of the gutter background? I basically eye balled it, but it would be nice to derive it

@netlify
Copy link

netlify bot commented Mar 10, 2020

Deploy preview for mkdocs-material-preview ready!

Built with commit 3d40a65

https://deploy-preview-1501--mkdocs-material-preview.netlify.com

@squidfunk
Copy link
Owner

How do you want to handle the coloring of the gutter background? I basically eye balled it, but it would be nice to derive it

That is a good question, as the code background has alpha transparency which will not have the intended effect when used on the line numbers. I think we should switch to an opaque background. I removed code background in admonition titles in a recent commit, so I think the transparency is of no use anymore, or am I missing something?

@facelessuser
Copy link
Contributor Author

Results:

aZUgB9HVus

@squidfunk
Copy link
Owner

Thanks for providing the visual aid. Unfortunately the gutter doesn't match the background color, but that should be resolved when switching to opaque colors and CSS variables.

@facelessuser
Copy link
Contributor Author

Root level, stretched code blocks use a different padding, so we have to stretch the highlighting differently for this that case as well. Last commit accounts for this case.

@facelessuser
Copy link
Contributor Author

Sorry for the churn, but I think I got them all:

7kV0SLCo7E

@squidfunk
Copy link
Owner

LGTM, thanks for taking the time to investigate and fix this!

@squidfunk squidfunk merged commit 4044ce1 into squidfunk:refactor/rxjs-typescript Mar 12, 2020
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