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

Indicate wrapped lines #75

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

dbaynard
Copy link
Contributor

I've added some css that introduces a discreet, linear gradient where lines wrap (in print css, only). The second commit restricts it to the case without line numbers, only. The image shows an example.

no-line-nos-cont

I tried to use a continuation character (with an svg background image), but it gets quite complicated to repeat the character without it appearing on the first line, too.

I'm not entirely convinced with the appearance, but the principle seems to work — and for print css it at least indicates line wrapping.

@dbaynard
Copy link
Contributor Author

The code is missing comments — I'll add them if you want to merge.

@dbaynard dbaynard force-pushed the feat/line-continuation branch from f19daa6 to 74ef450 Compare May 30, 2019 00:10
@mb21
Copy link

mb21 commented May 30, 2019

I like the idea! I did some quick testing:

I needed to remove the background-size to see anything. And I'd probably do the following:

background: linear-gradient(to right, #e4e4e4, #ffffff) no-repeat;
background-position: 3.5em 1.25em;

The grey is on the left, because that's where the "virtual" line starts, then fades to the right into the background.

btw. the left: -4em; on the pre.numberSource code > span has the apparent effect of creating a margin to the right of the code blocks (you see it on small screens), so maybe add a margin-right: -4em; there?

@jgm
Copy link
Owner

jgm commented Jun 3, 2019

I like this too. @dbaynard - want to add comments and take into account @mb21's comments? (The gradient is a stylistic issue, I don't really have an opinion on it but would be happy to leave it to your judgment, but the issue about background-size seems more serious, as does the margin issue.)

@jgm
Copy link
Owner

jgm commented Jun 4, 2019

I'd like to get these changes figured out soon, since I just fixed a major parsing bug and I'd like to push out a new release...want to make sure the CSS issues are fixed first.

@mb21
Copy link

mb21 commented Jun 4, 2019

@jgm fairly certain you can also ship the release without this pull request. This just adds a new feature (line-wrapping) when printing the HTML doc.

@dbaynard
Copy link
Contributor Author

dbaynard commented Jun 6, 2019

Yes, I'll make the changes. But I agree with @mb21 — better not to rush this?

@jgm
Copy link
Owner

jgm commented Jun 6, 2019 via email

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.

3 participants