question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Tables with linear gradient background do not render correctly

See original GitHub issue

Hi There!

I am creating a PDF with Shower Framework. There is a table in the HTML file. Only the last row in the table is being rendered when the PDF is viewed on Chrome. The table appears to be fine when the PDF is viewed on a normal viewer. Attached is the image of the issue.

Below is the HTML used

<table>
	<tr>
		<th scope="col">Locavore</th>
		<th>Umami</th>
		<th>Helvetica</th>
		<th>Vegan</th>
	</tr>
	<tr>
		<th scope="row">Fingerstache</th>
		<td>Kale</td>
		<td>Chips</td>
		<td>Keytar</td>
	</tr>
	<tr>
		<th scope="row">Sriracha</th>
		<td>Gluten-free</td>
		<td>Ennui</td>
		<td>Keffiyeh</td>
	</tr>
	<tr>
		<th scope="row">Thundercats</th>
		<td>Jean</td>
		<td>Shorts</td>
		<td>Biodiesel</td>
	</tr>
	<tr>
		<th scope="row">Terry</th>
		<td>Richardson</td>
		<td>Swag</td>
		<td>Blog</td>
	</tr>
</table>

image

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
astefanutticommented, Jul 14, 2017

Thanks a lot for the detailed use case. I’ve been able to reproduce.

It seems it is caused by the linear gradient background in your styles:

.slide table tr:not(:last-of-type) > * {
   background: -webkit-linear-gradient(
      bottom,
      #bdbdbd .055em,
      transparent .055em
    )
    repeat-x;
  background: linear-gradient(to top, #bdbdbd .055em, transparent .055em)
    repeat-x; 
}

Removing it makes the presentation exporting fine.

Linear gradient rendering in PDF is still problematic in PhantomJS and already affects DeckTape (#61).

Let me know if that’s acceptable to change the background style as a work-around solution.

0reactions
astefanutticommented, Jul 14, 2017

I’m glad it works for you!

Read more comments on GitHub >

github_iconTop Results From Across the Web

css - Setting a conditional background linear gradient for ...
I'm trying to stylize a row in my react table so that when a certain row's data changes, the ...
Read more >
linear-gradient() - CSS: Cascading Style Sheets | MDN
The linear-gradient() CSS function creates an image consisting of a progressive transition between two or more colors along a straight line.
Read more >
Setting Backgrounds & Gradients - Learn to Code HTML & CSS
Within CSS, gradient backgrounds are treated as background images. We can create a gradient using the background or background-image properties, just like a ......
Read more >
Table row (TR) background is repeat separately on every cell
What steps will reproduce the problem? 1. Create a table, a row, and some cells. 2. Set a css background image to the...
Read more >
Outlook Email Rendering Issues and How to Solve Them
Outlook emails not displaying HTML emails properly has been a staple in the ... Outlook does not support CSS styles for widths and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found