Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXhmikosR <xhmikosr@gmail.com>2017-10-23 00:17:28 +0300
committerGitHub <noreply@github.com>2017-10-23 00:17:28 +0300
commit52d99a887e610ce9be9c94e17d6aba2f6277dd39 (patch)
treeebe9b8818d19ba06b2125ad8b51b4c23b238604b /scss/_modal.scss
parent29d58fb758683db42c2d716ac654dea3ab6063c7 (diff)
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
Diffstat (limited to 'scss/_modal.scss')
-rw-r--r--scss/_modal.scss21
1 files changed, 12 insertions, 9 deletions
diff --git a/scss/_modal.scss b/scss/_modal.scss
index e655850e38..5fabc83f46 100644
--- a/scss/_modal.scss
+++ b/scss/_modal.scss
@@ -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