Skip to content

Commit

Permalink
fix(popovers): Fix color issue with bottom popover (#1026)
Browse files Browse the repository at this point in the history
Fix the bottom popover styling issue where the triangle is white, rather than grey to match the title background.

fixes patternfly/patternfly#1014

Co-authored-by: Matthew Carleton <mcarleton@redhat.com>
  • Loading branch information
2 people authored and jeff-phillips-18 committed May 22, 2018
1 parent 09b5aa2 commit 0fdd467
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/less/popovers.less
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,20 @@
.popover {
.box-shadow(0 2px 2px fade(@color-pf-black, 8%));
padding: 0;
&.bottom {
.popover-title:before {
content:"";
position: absolute;
top: @popover-position-top;
left: 50%;
transform: translateX(-50%);
border-top-width: @popover-border-top-width;
border-width: @popover-border-width;
border-color: transparent;
border-bottom-color: @popover-border-bottom-color;
border-style: solid;
}
}
}

.popover-content {
Expand Down
4 changes: 4 additions & 0 deletions src/less/variables.less
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,11 @@
@popover-arrow-color: @color-pf-white;
@popover-arrow-outer-color: @color-pf-black-400;
@popover-border-color: @color-pf-black-400;
@popover-border-bottom-color: @color-pf-black-150;
@popover-border-width: 10px;
@popover-border-top-width: 0;
@popover-max-width: 220px;
@popover-position-top: -20px;
@popover-title-bg: @color-pf-black-150;
@pre-bg: @color-pf-black-100;
@progress-bg: @color-pf-black-200;
Expand Down
14 changes: 14 additions & 0 deletions src/sass/converted/patternfly/_popovers.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,20 @@
.popover {
@include box-shadow(0 2px 2px rgba($color-pf-black, (8/100)));
padding: 0;
&.bottom {
.popover-title:before {
content:"";
position: absolute;
top: $popover-position-top;
left: 50%;
transform: translateX(-50%);
border-top-width: $popover-border-top-width;
border-width: $popover-border-width;
border-color: transparent;
border-bottom-color: $popover-border-bottom-color;
border-style: solid;
}
}
}

.popover-content {
Expand Down
4 changes: 4 additions & 0 deletions src/sass/converted/patternfly/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,11 @@ $panel-inner-border: $color-pf-bl
$popover-arrow-color: $color-pf-white !default;
$popover-arrow-outer-color: $color-pf-black-400 !default;
$popover-border-color: $color-pf-black-400 !default;
$popover-border-bottom-color: $color-pf-black-150 !default;
$popover-border-width: 10px !default;
$popover-border-top-width: 0 !default;
$popover-max-width: 220px !default;
$popover-position-top: -20px !default;
$popover-title-bg: $color-pf-black-150 !default;
$pre-bg: $color-pf-black-100 !default;
$progress-bg: $color-pf-black-200 !default;
Expand Down

0 comments on commit 0fdd467

Please sign in to comment.