Ignored Styles prop doesn't seem to work!
See original GitHub issueHi @Exilz, great work!
I’m having an issue, with style ‘display: block’ app just stops.
I tried
ignoredStyles={['display']}
but this prop doesn’t seem to work, thanks!
“react-native”: “0.50.4” “react-native-render-html”: “^3.5.2”
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Ignored Styles prop doesn't seem to work! · Issue #69 - GitHub
I'm having an issue, with style 'display: block' app just stops. I tried ignoredStyles={['display']} but this prop doesn't seem to work, thanks!
Read more >Inline style is not working ReactJS - Stack Overflow
The style prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using ...
Read more >How to Troubleshoot CSS Not Working - WPForms
In this tutorial, we'll walk through options to troubleshoot why your CSS is not working and offer possible solutions. Browser Caching.
Read more >Widget - CSS properties ignored - ServiceNow Community
Solved: Hi, I have a problem with my CSS on a custom widget. When I write this CSS code to my widget :...
Read more >Cascade, specificity, and inheritance - Learn web development
At some point, you will be working on a project and you will find that the CSS you thought should be applied to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I just had a similar problem with this code inside the HTML:
</p>\n<blockquote class=\"instagram-media\" data-instgrm-captioned data-instgrm-permalink=\"https://www.instagram.com/p/BcECNjNlCJc/\" data-instgrm-version=\"8\" style=\" background:#FFF; border:0; border-radius:3px; box-shadow:0 0 1px 0 rgba(0,0,0,0.5),0 1px 10px 0 rgba(0,0,0,0.15); margin: 1px; max-width:658px; padding:0; width:99.375%; width:-webkit-calc(100% - 2px); width:calc(100% - 2px);\">\n<div style=\"padding:8px;\">\n<div style=\" background:#F8F8F8; line-height:0; margin-top:40px; padding:50% 0; text-align:center; width:100%;\">\n<div style=\" background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAMAAAApWqozAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAMUExURczMzPf399fX1+bm5mzY9AMAAADiSURBVDjLvZXbEsMgCES5/P8/t9FuRVCRmU73JWlzosgSIIZURCjo/ad+EQJJB4Hv8BFt+IDpQoCx1wjOSBFhh2XssxEIYn3ulI/6MNReE07UIWJEv8UEOWDS88LY97kqyTliJKKtuYBbruAyVh5wOHiXmpi5we58Ek028czwyuQdLKPG1Bkb4NnM+VeAnfHqn1k4+GPT6uGQcvu2h2OVuIf/gWUFyy8OWEpdyZSa3aVCqpVoVvzZZ2VTnn2wU8qzVjDDetO90GSy9mVLqtgYSy231MxrY6I2gGqjrTY0L8fxCxfCBbhWrsYYAAAAAElFTkSuQmCC); display:block; height:44px; margin:0 auto -44px; position:relative; top:-22px; width:44px;\"></div>\n</div>\n<p style=\" margin:8px 0 0 0; padding:0 4px;\"> <a href=\"https://www.instagram.com/p/BcECNjNlCJc/\" style=\" color:#000; font-family:Arial,sans-serif; font-size:14px; font-style:normal; font-weight:normal; line-height:17px; text-decoration:none; word-wrap:break-word;\" target=\"_blank\">#avengersinfinitywar #infinitywar #infinitystones #ironspider #ironman #spiderman #spidermanhomecoming #captainamericacivilwar #vingadores #guerrainfinita #peterparker #tonystark #tomholland #robertdowneyjr #marvelcomics #marvel</a></p>\n<p style=\" color:#c9c8cd; font-family:Arial,sans-serif; font-size:14px; line-height:17px; margin-bottom:0; margin-top:8px; overflow:hidden; padding:8px 0 7px; text-align:center; text-overflow:ellipsis; white-space:nowrap;\">Ein Beitrag geteilt von <a href=\"https://www.instagram.com/superhero_world1996/\" style=\" color:#c9c8cd; font-family:Arial,sans-serif; font-size:14px; font-style:normal; font-weight:normal; line-height:17px;\" target=\"_blank\"> Gabriel Rock</a> (@superhero_world1996) am <time style=\" font-family:Arial,sans-serif; font-size:14px; line-height:17px;\" datetime=\"2017-11-29T02:51:34+00:00\">Nov 28, 2017 um 6:51 PST</time></p>\n</div>\n</blockquote>\n<p><script async defer src=\"//platform.instagram.com/en_US/embeds.js\"></script></p>\n<p>
To make it work I had to additionally add padding to the ignored styles:
ignoredStyles={['display', 'width', 'height', 'font-family', 'padding']}
I can render your HTML if I ignore the following styles :
display
, because ofblock
width
andheight
because ofcalc()
not being supported at allfont-family
because I’m missing those fonts