Open dbaynard opened 5 years ago
The code is missing comments — I'll add them if you want to merge.
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?
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.)
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.
@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.
Yes, I'll make the changes. But I agree with @mb21 — better not to rush this?
David Baynard notifications@github.com writes:
Yes, I'll make the changes. But I agree with @mb21 — better not to rush this?
Thanks: I already released my changes, so there's no longer any urgency on this.
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.
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.