From f7acb278e2cfbe3cce461c5091852340a1abf734 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Tue, 10 Oct 2017 16:46:43 +0300 Subject: [PATCH] Refactor a few selectors so that the least specific ones are first. (#24310) --- scss/_card.scss | 8 ++++---- scss/_dropdown.scss | 26 +++++++++++++------------- scss/_tooltip.scss | 12 ++++++------ 3 files changed, 23 insertions(+), 23 deletions(-) diff --git a/scss/_card.scss b/scss/_card.scss index 25c511a90b3d..b4d4950dc984 100644 --- a/scss/_card.scss +++ b/scss/_card.scss @@ -213,6 +213,10 @@ } } + &:only-child { + @include border-radius($card-border-radius); + } + &:not(:first-child):not(:last-child):not(:only-child) { border-radius: 0; @@ -221,10 +225,6 @@ border-radius: 0; } } - - &:only-child { - @include border-radius($card-border-radius); - } } } } diff --git a/scss/_dropdown.scss b/scss/_dropdown.scss index 32657167f54d..1782d5b9f17a 100644 --- a/scss/_dropdown.scss +++ b/scss/_dropdown.scss @@ -9,19 +9,6 @@ @include caret; } -// Allow for dropdowns to go bottom up (aka, dropup-menu) -// Just add .dropup after the standard .dropdown class and you're set. -.dropup { - .dropdown-menu { - margin-top: 0; - margin-bottom: $dropdown-spacer; - } - - .dropdown-toggle { - @include caret(up); - } -} - // The dropdown menu .dropdown-menu { position: absolute; @@ -44,6 +31,19 @@ @include box-shadow($dropdown-box-shadow); } +// Allow for dropdowns to go bottom up (aka, dropup-menu) +// Just add .dropup after the standard .dropdown class and you're set. +.dropup { + .dropdown-menu { + margin-top: 0; + margin-bottom: $dropdown-spacer; + } + + .dropdown-toggle { + @include caret(up); + } +} + // Dividers (basically an `
`) within the dropdown .dropdown-divider { @include nav-divider($dropdown-divider-bg); diff --git a/scss/_tooltip.scss b/scss/_tooltip.scss index fe97fbbbd0d7..7b5db1cf2a5f 100644 --- a/scss/_tooltip.scss +++ b/scss/_tooltip.scss @@ -21,6 +21,12 @@ height: $tooltip-arrow-height; } + .arrow::before { + position: absolute; + border-color: transparent; + border-style: solid; + } + &.bs-tooltip-top { padding: $tooltip-arrow-width 0; .arrow { @@ -88,12 +94,6 @@ @extend .bs-tooltip-left; } } - - .arrow::before { - position: absolute; - border-color: transparent; - border-style: solid; - } } // Wrapper for the tooltip content