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.

Does anyone have a solution on how to manage inline style?

See original GitHub issue

Hi,

I have to be able to manage a html like this:

<table style="background-color: #72be58; height: 92px;" width="202">
<tbody>
<tr>
<td style="width: 192px;">
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="https:/image.com" alt="" width="185" height="42" /></p>
<p>&nbsp; <span style="color: #ffffff;"><strong>Powered by MySite</strong></span></p>
</td>
</tr>
</tbody>
</table>

Has anyone found an effective way? Thanks

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:12
  • Comments:5

github_iconTop GitHub Comments

1reaction
peterng014commented, Dec 8, 2018

Same issue, any idea?

0reactions
hamedsoheilicommented, Oct 1, 2019

You sould define renderNode and get node.attribs.style string and split and trim this string for geting key value pair and with a module that i cant remember now, convert css key to rn style key and make a object with key value as styles object. This solution for geting key value from string, needs loop that can be expensive for big inline css styles

Read more comments on GitHub >

github_iconTop Results From Across the Web

Avoiding Inline Styles for CSS Design - ThoughtCo
Instead of using inline styles, use external stylesheets. They give you all the benefits of CSS best practices and are easy to use....
Read more >
Improve site performance by inlining your CSS - LogRocket Blog
One of the ways you can improve the performance of your site is by inlining your CSS. This article explains the “what” and...
Read more >
Avoid using inline css styles - DEV Community ‍ ‍
As our project gets larger if we do not use same class for same type of styles, there is a good possibility of...
Read more >
Inline Styles in HTML - Codecademy
This problem can be created with any CSS, not just inline styles, but it is worth mentioning here. Always look for the right...
Read more >
CSS Best Practices: use inline style or important? [closed]
In the CSS cascade, inline styles will override regular styles, so any undesirable element styling that occurs through generated content will be ...
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