1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-19 03:41:19 +02:00

Refactor a few selectors. (#24404)

1. move a couple of them before the more specific ones.
2. change nesting to be under the same parent selector
3. use the ampersand more
This commit is contained in:
XhmikosR
2017-10-23 00:17:28 +03:00
committed by GitHub
parent 29d58fb758
commit 52d99a887e
5 changed files with 151 additions and 134 deletions

View File

@@ -26,16 +26,10 @@
// gnarly iOS Safari bug: https://bugs.webkit.org/show_bug.cgi?id=158342
// See also https://github.com/twbs/bootstrap/issues/17695
// When fading in the modal, animate it to slide down
&.fade .modal-dialog {
@include transition($modal-transition);
transform: translate(0, -25%);
.modal-open & {
overflow-x: hidden;
overflow-y: auto;
}
&.show .modal-dialog { transform: translate(0, 0); }
}
.modal-open .modal {
overflow-x: hidden;
overflow-y: auto;
}
// Shell div to position the modal with bottom padding
@@ -45,6 +39,15 @@
margin: $modal-dialog-margin;
// allow clicks to pass through for custom click handling to close modal
pointer-events: none;
// When fading in the modal, animate it to slide down
.modal.fade & {
@include transition($modal-transition);
transform: translate(0, -25%);
}
.modal.show & {
transform: translate(0, 0);
}
}
// Actual modal