aboutsummaryrefslogtreecommitdiff
path: root/src/components/mention_link/mention_link.scss
blob: 5f5da98f4982e21fd758e5c1d632c96bd76ca9ea (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
.MentionLink {
  position: relative;
  white-space: normal;
  display: inline-block;
  color: var(--link);

  & .new,
  & .original {
    display: inline-block;
    border-radius: 2px;
  }

  .original {
    margin-right: 0.25em;
  }

  .full {
    position: absolute;
    display: inline-block;
    pointer-events: none;
    opacity: 0;
    top: 100%;
    left: 0;
    height: 100%;
    word-wrap: normal;
    white-space: nowrap;
    transition: opacity 0.2s ease;
    z-index: 1;
    margin-top: 0.25em;
    padding: 0.5em;
    user-select: all;
  }

  .short {
    user-select: none;
  }

  & .short,
  & .full {
    white-space: nowrap;
  }

  .new {
    margin-right: 0.25em;

    &.-you {
      & .shortName,
      & .full {
        font-weight: 600;
      }
    }

    .at {
      color: var(--link);
      opacity: 0.8;
      display: inline-block;
      height: 50%;
      line-height: 1;
      padding: 0 0.1em;
      vertical-align: -25%;
      margin: 0;
    }

    &:not(.-oldStyle) {
      .short {
        padding-left: 0.25em;
        padding-right: 0;
        padding-top: 0;
        padding-bottom: 0;
        line-height: 1.5;
        font-size: inherit;

        .at {
          color: var(--faint);
          opacity: 0.8;
          padding-right: 0.25em;
          vertical-align: -20%;
        }
      }

      .you {
        padding-right: 0.25em;
      }

      .userName {
        display: inline-block;
        color: var(--link);
        line-height: inherit;
        margin-left: 0;
        padding-left: 0.125em;
        padding-right: 0.25em;
        padding-top: 0;
        padding-bottom: 0;
        border-top-right-radius: var(--btnRadius);
        border-bottom-right-radius: var(--btnRadius);
      }
    }

    &.-striped {
      & .userName,
      & .full {
        background-image:
          repeating-linear-gradient(
            135deg,
            var(--____highlight-tintColor),
            var(--____highlight-tintColor) 5px,
            var(--____highlight-tintColor2) 5px,
            var(--____highlight-tintColor2) 10px
          );
      }
    }

    &.-solid {
      & .userName,
      & .full {
        background-image: linear-gradient(var(--____highlight-tintColor2), var(--____highlight-tintColor2));
      }
    }

    &.-side {
      & .userName,
      & .userNameFull {
        box-shadow: 0 -5px 3px -4px inset var(--____highlight-solidColor);
      }
    }
  }

  &:hover .new .full {
    opacity: 1;
    pointer-events: initial;
  }
}