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

Unable to scroll modal when bootstrap is namespaced #26742

Closed
jdanil opened this issue Jun 22, 2018 · 0 comments
Closed

Unable to scroll modal when bootstrap is namespaced #26742

jdanil opened this issue Jun 22, 2018 · 0 comments

Comments

@jdanil
Copy link
Contributor

jdanil commented Jun 22, 2018

Our app currently namespaces bootstrap so that our styles don't affect other areas.
Something like this...

.app {
  @import '~bootstrap/scss/bootstrap';
}

The style in _modal.scss that displays the scrollbar is this.

.modal {
  .modal-open & {
    overflow-x: hidden;
    overflow-y: auto;
  }
}

In our app, this evaluates to .modal-open .app .modal, so the style is not applied.
On top of that, it is unintuitive to read.
@mdo pointed out this could be a potential issue when it was submitted.

Testing in SassMeister with this block of code...

.app {
  .modal {
    .modal-open & {
      overflow-x: hidden;
      overflow-y: auto;
    }
  }
}

...outputs the following compiled css.

.modal-open .app .modal {
  overflow-x: hidden;
  overflow-y: auto;
}
jdanil added a commit to jdanil/bootstrap that referenced this issue Jun 22, 2018
Nest `.modal` styling directly under `.modal-open`
to avoid issues when bootstrap is nested.
@mdo mdo added this to Inbox in v4.1.3 via automation Jun 23, 2018
@mdo mdo moved this from Inbox to Needs review in v4.1.3 Jul 16, 2018
v4.1.3 automation moved this from Needs review to Shipped Jul 20, 2018
mdo pushed a commit that referenced this issue Jul 20, 2018
Nest `.modal` styling directly under `.modal-open`
to avoid issues when bootstrap is nested.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
v4.1.3
  
Shipped
Development

No branches or pull requests

2 participants