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

z-index value not handled correctly #98

Closed
phaedryx opened this issue Nov 5, 2015 · 4 comments
Closed

z-index value not handled correctly #98

phaedryx opened this issue Nov 5, 2015 · 4 comments

Comments

@phaedryx
Copy link

phaedryx commented Nov 5, 2015

Consider:

class Foo extends Component {
  render() {
    var modalStyles = {overlay: {}};
    modalStyles.overlay["z-index"] = 10;

    return(
      <Modal style={ modalStyles }>
        Hello World!
      </Modal>
    )
  }
}

This will produce a modal with a z-index of "10px", which is not a valid z-index value.

@deiga
Copy link

deiga commented Nov 8, 2015

As a workaround set modalStyles.overlay["z-index"] = '10;';

@marbemac
Copy link

It should follow react conventions:

class Foo extends Component {
  render() {
    var modalStyles = {overlay: {zIndex: 10}};

    return(
      <Modal style={ modalStyles }>
        Hello World!
      </Modal>
    )
  }
}

@kendagriff
Copy link

@marbemac Thanks for the tip!

@phaedryx
Copy link
Author

@marbemac I should have realized that. Thanks for the example.

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

4 participants