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

Default rendering with newlines and ins/del/mark #8

Closed
zachleat opened this issue Sep 27, 2018 · 4 comments
Closed

Default rendering with newlines and ins/del/mark #8

zachleat opened this issue Sep 27, 2018 · 4 comments
Assignees
Milestone

Comments

@zachleat
Copy link
Member

After #5 and #7 were merged, I’m now thinking about the best way to style the line highlighter to make it render how it used to with full width background colors.

Previous behavior on eleventy-base-blog:

image

New behavior:

This is what it renders like without CSS (this is showing default styles for ins/del/mark, which are okay). I’ve added a few newlines in there just to see how #5 would look too (those were not in the previous behavior screenshot):
image

This is what it looks like on eleventy-base-blog after removing the ins/del/mark styles:
image

The display: block Problem:

When using .highlight-line { display: block; } to get full width highlights, the problem exhibits itself:
image

image

If I move the <br> inside of the highlight-line elements, I get what I want with display: block;
image

image

Would it be better to move the <br>? Or to use CSS to hide the <br> altogether when using display: block;

@zachleat
Copy link
Member Author

cc @mathiasbynens

@zachleat zachleat added this to the v2.0.0 milestone Sep 27, 2018
@zachleat
Copy link
Member Author

@mathiasbynens
Copy link
Contributor

mathiasbynens commented Sep 27, 2018

Hmm… E.g. <mark>foo bar<br></mark> is weird to me, since the line break isn’t really part of what you’re trying to highlight.

IMHO CSS is the right layer to solve this. It’s a styling issue. The current HTML is correct.

@zachleat
Copy link
Member Author

Alright yeah, that makes sense to me. The line highlighting CSS (which is what needs display: block anyway) can package all this stuff together.

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

No branches or pull requests

2 participants