diff --git a/src/dropdown/dropdown.scss b/src/dropdown/dropdown.scss index d8c4ce7e64..e72c88e561 100644 --- a/src/dropdown/dropdown.scss +++ b/src/dropdown/dropdown.scss @@ -35,25 +35,6 @@ border-radius: $border-radius; box-shadow: $box-shadow-large; - &::before, - &::after { - position: absolute; - display: inline-block; - content: ""; - } - - &::before { - // stylelint-disable-next-line primer/borders - border: $spacer-2 $border-style transparent; - border-bottom-color: $border-black-fade; - } - - &::after { - // stylelint-disable-next-line primer/borders - border: 7px $border-style transparent; - border-bottom-color: $border-white; - } - // stylelint-disable-next-line selector-max-type > ul { list-style: none; @@ -134,22 +115,6 @@ width: auto; margin-top: 0; margin-right: $spacer-2; - - &::before { - top: 10px; - right: -$spacer-3; - left: auto; - border-color: transparent; - border-left-color: $border-black-fade; - } - - &::after { - top: 11px; - right: -14px; - left: auto; - border-color: transparent; - border-left-color: $border-white; - } } .dropdown-menu-e { @@ -158,20 +123,6 @@ width: auto; margin-top: 0; margin-left: $spacer-2; - - &::before { - top: $spacer-2; - left: -$spacer-3; - border-color: transparent; - border-right-color: $border-black-fade; - } - - &::after { - top: 11px; - left: -14px; - border-color: transparent; - border-right-color: $border-white; - } } .dropdown-menu-ne { @@ -180,83 +131,17 @@ left: 0; // stylelint-disable-next-line primer/spacing margin-bottom: 3px; - - &::before, - &::after { - top: auto; - right: auto; - } - - &::before { - bottom: -$spacer-2; - left: 9px; - // stylelint-disable-next-line primer/borders - border-top: $spacer-2 $border-style $border-black-fade; - // stylelint-disable-next-line primer/borders - border-right: $spacer-2 $border-style transparent; - border-bottom: 0; - // stylelint-disable-next-line primer/borders - border-left: $spacer-2 $border-style transparent; - } - - &::after { - bottom: -7px; - left: 10px; - // stylelint-disable-next-line primer/borders - border-top: 7px $border-style $border-white; - // stylelint-disable-next-line primer/borders - border-right: 7px $border-style transparent; - border-bottom: 0; - // stylelint-disable-next-line primer/borders - border-left: 7px $border-style transparent; - } } .dropdown-menu-s { right: 50%; left: auto; transform: translateX(50%); - - &::before { - top: -$spacer-3; - right: 50%; - transform: translateX(50%); - } - - &::after { - top: -14px; - right: 50%; - transform: translateX(50%); - } } .dropdown-menu-sw { right: 0; left: auto; - - &::before { - top: -$spacer-3; - right: 9px; - left: auto; - } - - &::after { - top: -14px; - right: 10px; - left: auto; - } -} - -.dropdown-menu-se { - &::before { - top: -$spacer-3; - left: 9px; - } - - &::after { - top: -14px; - left: 10px; - } } // Dark dropdowns @@ -267,15 +152,6 @@ border-color: $border-gray-darker; box-shadow: $box-shadow-large; - &::before { - border-bottom-color: $border-gray-darker; - } - - &::after { - // stylelint-disable-next-line primer/borders - border-bottom-color: $gray-800; - } - .dropdown-header { // stylelint-disable-next-line primer/colors color: $gray-300; @@ -288,39 +164,4 @@ .dropdown-item { color: inherit; } - - // Directional classes - - &.dropdown-menu-w { - &::before { - border-color: transparent transparent transparent $border-gray-darker; - } - - &::after { - // stylelint-disable-next-line primer/borders - border-color: transparent transparent transparent $gray-800; - } - } - - &.dropdown-menu-e { - &::before { - border-color: transparent $border-gray-darker transparent transparent; - } - - &::after { - // stylelint-disable-next-line primer/borders - border-color: transparent $gray-800 transparent transparent; - } - } - - &.dropdown-menu-ne { - &::before { - border-color: $border-gray-darker transparent transparent transparent; - } - - &::after { - // stylelint-disable-next-line primer/borders - border-color: $gray-800 transparent transparent transparent; - } - } } diff --git a/src/labels/labels.scss b/src/labels/labels.scss index 769cd0cb6c..3056f24bba 100644 --- a/src/labels/labels.scss +++ b/src/labels/labels.scss @@ -48,9 +48,9 @@ .Label--yellow { // stylelint-disable-next-line primer/colors - color: $yellow-900; + color: var(--color-label-warning-text); // stylelint-disable-next-line primer/borders - border-color: $yellow-800; + border-color: var(--color-label-warning-border); } .Label--orange { diff --git a/src/popover/popover.scss b/src/popover/popover.scss index 7838b89ecb..e99a936903 100644 --- a/src/popover/popover.scss +++ b/src/popover/popover.scss @@ -8,55 +8,6 @@ width: 232px; margin-right: auto; margin-left: auto; - - // Carets - &::before, - &::after { - position: absolute; - left: 50%; - display: inline-block; - content: ""; - } - - &::before { - top: -$spacer-3; - // stylelint-disable-next-line primer/spacing - margin-left: -9px; - // stylelint-disable-next-line primer/borders - border: $spacer-2 $border-style transparent; - border-bottom-color: $border-black-fade; - } - - &::after { - top: -14px; - margin-left: -$spacer-2; - // stylelint-disable-next-line primer/borders - border: 7px $border-style transparent; - // stylelint-disable-next-line primer/borders - border-bottom-color: $bg-white; - } -} - -// Bottom-oriented carets -.Popover-message--bottom, -.Popover-message--bottom-right, -.Popover-message--bottom-left { - &::before, - &::after { - top: auto; - border-bottom-color: transparent; - } - - &::before { - bottom: -$spacer-3; - border-top-color: $border-black-fade; - } - - &::after { - bottom: -14px; - // stylelint-disable-next-line primer/borders - border-top-color: $bg-white; - } } // Top & Bottom: Right-oriented carets @@ -64,20 +15,6 @@ .Popover-message--bottom-right { right: -9px; margin-right: 0; - - &::before, - &::after { - left: auto; - margin-left: 0; - } - - &::before { - right: 20px; - } - - &::after { - right: 21px; - } } // Top & Bottom: Left-oriented carets @@ -85,99 +22,6 @@ .Popover-message--bottom-left { left: -9px; margin-left: 0; - - &::before, - &::after { - left: $spacer-4; - margin-left: 0; - } - - &::after { - left: $spacer-4 + 1; - } -} - -// Right- & Left-oriented carets -.Popover-message--right, -.Popover-message--right-top, -.Popover-message--right-bottom, -.Popover-message--left, -.Popover-message--left-top, -.Popover-message--left-bottom { - &::before, - &::after { - top: 50%; - left: auto; - margin-left: 0; - border-bottom-color: transparent; - } - - &::before { - // stylelint-disable-next-line primer/spacing - margin-top: -($spacer-2 + 1); - } - - &::after { - margin-top: -$spacer-2; - } -} - -// Right-oriented carets -.Popover-message--right, -.Popover-message--right-top, -.Popover-message--right-bottom { - &::before { - right: -$spacer-3; - border-left-color: $border-black-fade; - } - - &::after { - right: -14px; - // stylelint-disable-next-line primer/borders - border-left-color: $bg-white; - } -} - -// Left-oriented carets -.Popover-message--left, -.Popover-message--left-top, -.Popover-message--left-bottom { - &::before { - left: -$spacer-3; - border-right-color: $border-black-fade; - } - - &::after { - left: -14px; - // stylelint-disable-next-line primer/borders - border-right-color: $bg-white; - } -} - -// Right & Left: Top-oriented carets -.Popover-message--right-top, -.Popover-message--left-top { - &::before, - &::after { - top: $spacer-4; - } -} - -// Right & Left: Bottom-oriented carets -.Popover-message--right-bottom, -.Popover-message--left-bottom { - &::before, - &::after { - top: auto; - } - - &::before { - bottom: $spacer-3; - } - - &::after { - bottom: $spacer-3 + 1; - } } .Popover-message--large { diff --git a/src/support/index.scss b/src/support/index.scss index 93f9449de9..a576e27115 100644 --- a/src/support/index.scss +++ b/src/support/index.scss @@ -8,4 +8,3 @@ @import "./mixins/typography.scss"; @import "./mixins/layout.scss"; @import "./mixins/buttons.scss"; -@import "./mixins/misc.scss"; diff --git a/src/support/mixins/misc.scss b/src/support/mixins/misc.scss deleted file mode 100644 index ebdd32d046..0000000000 --- a/src/support/mixins/misc.scss +++ /dev/null @@ -1,29 +0,0 @@ -// Generate a two-color caret for any element. -@mixin double-caret($foreground: $text-white, $background: lighten($gray-300, 5%)) { - &::after, - &::before { - position: absolute; - top: 11px; - right: 100%; - left: -16px; - display: block; - width: 0; - height: 0; - pointer-events: none; - content: " "; - border-color: transparent; - border-style: solid solid outset; - } - - &::after { - margin-top: 1px; - margin-left: 2px; - border-width: 7px; - border-right-color: $foreground; - } - - &::before { - border-width: 8px; - border-right-color: $background; - } -} diff --git a/src/tooltips/tooltips.scss b/src/tooltips/tooltips.scss index 315f5e44a3..f8b42c4535 100644 --- a/src/tooltips/tooltips.scss +++ b/src/tooltips/tooltips.scss @@ -94,16 +94,6 @@ // stylelint-disable-next-line primer/spacing margin-top: 6px; } - - &::before { - top: auto; - right: 50%; - bottom: -7px; - // stylelint-disable-next-line primer/spacing - margin-right: -6px; - // stylelint-disable-next-line primer/borders - border-bottom-color: $bg-black; - } } .tooltipped-se { @@ -128,16 +118,6 @@ // stylelint-disable-next-line primer/spacing margin-bottom: 6px; } - - &::before { - top: -7px; - right: 50%; - bottom: auto; - // stylelint-disable-next-line primer/spacing - margin-right: -6px; - // stylelint-disable-next-line primer/borders - border-top-color: $bg-black; - } } .tooltipped-ne { @@ -167,16 +147,6 @@ margin-right: 6px; transform: translateY(50%); } - - &::before { - top: 50%; - bottom: 50%; - left: -7px; - // stylelint-disable-next-line primer/spacing - margin-top: -6px; - // stylelint-disable-next-line primer/borders - border-left-color: $bg-black; - } } // tooltipped to the right @@ -188,16 +158,6 @@ margin-left: 6px; transform: translateY(50%); } - - &::before { - top: 50%; - right: -7px; - bottom: 50%; - // stylelint-disable-next-line primer/spacing - margin-top: -6px; - // stylelint-disable-next-line primer/borders - border-right-color: $bg-black; - } } // Tooltip align right and left @@ -209,18 +169,6 @@ } } -.tooltipped-align-right-1 { - &::before { - right: 10px; - } -} - -.tooltipped-align-right-2 { - &::before { - right: 15px; - } -} - .tooltipped-align-left-1, .tooltipped-align-left-2, { &::after { @@ -229,18 +177,6 @@ } } -.tooltipped-align-left-1 { - &::before { - left: 5px; - } -} - -.tooltipped-align-left-2 { - &::before { - left: 10px; - } -} - // Multiline tooltips // // `.tooltipped-multiline` Add this class when you have long content.