summaryrefslogtreecommitdiff
path: root/app/assets/stylesheets/components/popover.scss
blob: 6654553aaa296c6e77c728eec1d27704a0ad2423 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
.popover {
  max-width: $popover-max-width;
  border: 1px solid $gray-200;
  box-shadow: 0 2px 3px 1px $gray-200;
  font-size: $gl-font-size-small;

  /**
  * Blue popover variation
  */
  &.blue {
    background-color: $blue-600;
    border-color: $blue-600;

    .popover-body {
      color: $white-light;
    }

    &.bs-popover-bottom {
      .arrow::before,
      .arrow::after {
        border-bottom-color: $blue-600;
      }
    }

    &.bs-popover-top {
      .arrow::before,
      .arrow::after {
        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 $gl-padding-12;

  > .popover-hr {
    margin: $gl-padding 0;
  }
}

/**
* mr_popover component
*/
.mr-popover {
  .text-secondary {
    font-size: 12px;
    line-height: 1.33;
  }
}

.onboarding-popover {
  box-shadow: 0 2px 4px $dropdown-shadow-color;
  max-width: 280px;

  .popover-body {
    font-size: $gl-font-size;
    line-height: $gl-line-height;
    padding: $gl-padding;
  }

  .popover-header {
    display: none;
  }

  .accept-mr-label {
    background-color: $accepting-mr-label-color;
    color: $white-light;
  }
}

/**
* user_popover component
*/
.user-popover {
  padding: $gl-padding-8;
  line-height: $gl-line-height;

  .category-icon {
    color: $gray-600;
  }
}

.onboarding-welcome-page {
  .popover {
    min-width: auto;
    max-width: 40%;
  }
}