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

The color of the texts in lists becomes red in PDF output #5

Closed
Michael-Zhang-07 opened this issue Mar 19, 2019 · 3 comments
Closed

Comments

@Michael-Zhang-07
Copy link

Hi,
I found another small issue, in typora, the color is good, but I am not sure why the color of the texts all become red in the pdf output, like this: 😄
image

Thank you!!!

@zolrath
Copy link

zolrath commented Mar 29, 2019

I am also seeing this behavior running Typora 0.9.68(beta) on Windows 10.

@noatpad
Copy link
Owner

noatpad commented Mar 30, 2019

Sorry about the late response, college really takes a toll on you in the last month or so.

It seems like when it exports to a PDF (or an HTML file), it puts back the regular way how list items are rendered. In Typora, lists are organized like this:

<ul>
	<li>
		<p>Item 1</p>
	</li>
	<li>
		<p>Item 2</p>
	</li>
</ul>

Since there's no real way to style the bullet/numbering directly, this would let me do a workaround (albeit a tad hacky), by styling the list (<li>) with the red/blue color first, & then subsequently style anything in the list item (in this case, <p>) with the text color.

But when exported, it turns into this:

<ul>
	<li>Item 1</li>
	<li>Item 2</li>
</ul>

So now the workaround won't work since it will only take the list styling and not the item styling.

I could replace the bullet and numbering with psuedo-elements like before, and while this would work alright for bullet lists, it'll bring back the same problem from #4 for numbered lists. I'm not sure if there's another way to work around that, so I think the best solution to this is to set the color of the whole item (bullet and text) to the text color. I'll fix that into the next release if that's alright.

TL;DR: Lists exported from Typora bypasses the workaround to color bullets and numbering, so the best option is just make the whole item the same color as the text.

@noatpad
Copy link
Owner

noatpad commented Apr 1, 2019

And the release is up. Exported content should be working fine now

@noatpad noatpad closed this as completed Apr 1, 2019
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

3 participants