Commit b57633f0 authored by Enrique Alcantara's avatar Enrique Alcantara

Style popovers according to the design specs

- Apply new styles for header, padding, border, and fonts
- Remove bootstrap 3 backward compat code
parent 2320e445
...@@ -147,11 +147,6 @@ table { ...@@ -147,11 +147,6 @@ table {
pointer-events: none; pointer-events: none;
} }
.popover,
.popover-header {
font-size: 14px;
}
@each $breakpoint in map-keys($grid-breakpoints) { @each $breakpoint in map-keys($grid-breakpoints) {
@include media-breakpoint-up($breakpoint) { @include media-breakpoint-up($breakpoint) {
$infix: breakpoint-infix($breakpoint, $grid-breakpoints); $infix: breakpoint-infix($breakpoint, $grid-breakpoints);
......
.popover { .popover {
min-width: 300px; max-width: $popover-max-width;
border: 1px solid $gray-200;
.popover-body .user-popover { box-shadow: 0 2px 3px 1px $gray-200;
padding: $gl-padding-8;
font-size: $gl-font-size-small; font-size: $gl-font-size-small;
line-height: $gl-line-height;
.category-icon { .category-icon {
color: $gray-600; color: $gray-600;
} }
}
/**
* Blue popover variation
*/
&.blue { &.blue {
background-color: $blue-600; background-color: $blue-600;
border-color: $blue-600;
.popover-body { .popover-body {
color: $white-light; color: $white-light;
} }
&.bs-popover-bottom { &.bs-popover-bottom {
.arrow::before,
.arrow::after { .arrow::after {
border-bottom-color: $blue-600; border-bottom-color: $blue-600;
} }
} }
&.bs-popover-top { &.bs-popover-top {
.arrow::before,
.arrow::after { .arrow::after {
border-top-color: $blue-600; border-top-color: $blue-600;
} }
} }
&.bs-popover-right {
.arrow::after,
.arrow::before {
border-right-color: $blue-600;
}
}
&.bs-popover-left {
.arrow::before,
.arrow::after {
border-left-color: $blue-600;
}
}
} }
} }
.bs-popover-top {
/* When popover position is top, the arrow is translated 1 pixel
* due to the box-shadow include in our custom styles.
*/
> .arrow::before {
border-top-color: $gray-200;
bottom: 1px;
}
> .arrow::after {
bottom: 2px;
}
}
.bs-popover-bottom {
> .arrow::before {
border-bottom-color: $gray-200;
}
> .popover-header::before {
border-color: $white-light;
}
}
.bs-popover-right > .arrow::before {
border-right-color: $gray-200;
}
.bs-popover-left > .arrow::before {
border-left-color: $gray-200;
}
.popover-header {
background-color: $white-light;
font-size: $gl-font-size-small;
}
.popover-body {
padding: $gl-padding;
> .popover-hr {
margin: $gl-padding 0;
}
}
/**
* mr_popover component
*/
.mr-popover { .mr-popover {
.text-secondary { .text-secondary {
font-size: 12px; font-size: 12px;
...@@ -58,6 +123,14 @@ ...@@ -58,6 +123,14 @@
} }
} }
/**
* user_popover component
*/
.user-popover {
padding: $gl-padding-8;
line-height: $gl-line-height;
}
.onboarding-welcome-page { .onboarding-welcome-page {
.popover { .popover {
min-width: auto; min-width: auto;
......
...@@ -809,6 +809,11 @@ $modal-border-color: #e9ecef; ...@@ -809,6 +809,11 @@ $modal-border-color: #e9ecef;
$priority-label-empty-state-width: 114px; $priority-label-empty-state-width: 114px;
/*
Popovers
*/
$popover-max-width: 384px;
/* /*
Issues Analytics Issues Analytics
*/ */
......
...@@ -136,7 +136,6 @@ ...@@ -136,7 +136,6 @@
> .popover-header, > .popover-header,
> .popover-body { > .popover-body {
padding: 8px; padding: 8px;
font-size: 12px;
white-space: nowrap; white-space: nowrap;
position: relative; position: relative;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment