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.

"styles" is not handled properly

See original GitHub issue

Reproduce:

ReactDOM.render(
  <Iframe url='https://www.test-cors.org/'
                  width='100%'
                  height='100%'
                  styles={{ borderWidth: '0' }}
                  position='relative'/>,
  root
)

The result is an iframe with no “border-width” set, with an extra attribute styles=“[object Object]”

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:10
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
robbestadcommented, Sep 27, 2022

Fixed now thanks to @nagamejun

1reaction
jQwotoscommented, Nov 6, 2019

One workaround would be to use emotion and style the Iframe component

import styled from 'react-emotion';

const BorderLessIframe = styled(Iframe)`
    border-width: 0;
`;

ReactDOM.render(
    <BorderLessIframe url='https://www.test-cors.org/'
                  width='100%'
                  height='100%'
                  position='relative'/>,
  root
);
Read more comments on GitHub >

github_iconTop Results From Across the Web

style` is not handled correctly · Issue #92 · jwiegley/alert - GitHub
The parameter :style isn't handled correctly, so the behavior of #'alert is overwritten by the default style for some users.
Read more >
css style does not applied properly in chrome for bootstrap ...
My web application uses bootstrap 3.3.7, and I accidentally used the bootstrap-switch files for bootstrap 2, instead of 3. As soon as I...
Read more >
Handling common HTML and CSS problems - MDN Web Docs
CSS has a similar story — you need to check that your property names are spelled correctly, property values are spelled correctly and...
Read more >
CSS Inheritance, Cascade, and Specificity
Styles that are not inherited are usually related to the appearance of elements. For example, the border property is not inherited, because it...
Read more >
Google C++ Style Guide
Note that this guide is not a C++ tutorial: we assume that the reader is ... work properly when your code is consistent...
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