summaryrefslogtreecommitdiffstats
path: root/public/css/widget/comment-popup.less
blob: 4012697430433d957d110f79607ca5b0d5d259ba (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
.comment-popup {
  font-size: 1em / .857em; // // default font size / footer font size = 12px
  height: 6em;
  border-radius: 0.25em;
  border: 1px solid;
  border-color: @gray-light;
  background-color: @body-bg-color;
}

.comment-wrapper {
  position: relative;

  .comment-popup {
    position: absolute;
    top: 2.5em;
    left: -1.6em;
    z-index: 1;
    display: none;
    width: 50em;
  }

  .comment-popup:before {
    content: '';
    position: absolute;
    display: inline-block;
    width: 1.5em;
    height: 1.5em;
    left: 1.5em;
    top: ~"calc(-0.75em - 1px)";
    border-left: 1px solid @gray-light;
    border-top: 1px solid @gray-light;
    background-color: @body-bg-color;
    z-index: -1;
    transform: rotate(45deg);
  }
}

ul.item-list li:last-child .comment-wrapper {
  .comment-popup {
    top: -7em;
  }

  .comment-popup:before {
    bottom: ~"calc(-0.75em - 1px)";
    top: unset;
    transform: rotate(225deg);
  }
}

.comment-wrapper:hover .comment-popup {
  display: block
}

#layout {
  &.twocols {
    .comment-popup {
      width: 35em;
    }

    &.poor-layout,
    &.compact-layout {
      .comment-popup {
        width: 25em;
      }
    }
  }

  &.poor-layout,
  &.minimal-layout {
    .comment-popup {
      width: 25em;
    }
  }
}