mention_link.scss 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. @import "../../variables";
  2. .MentionLink {
  3. position: relative;
  4. white-space: normal;
  5. display: inline;
  6. color: var(--link);
  7. word-break: normal;
  8. & .new,
  9. & .original {
  10. display: inline;
  11. border-radius: 2px;
  12. }
  13. .mention-avatar {
  14. border-radius: var(--avatarAltRadius, $fallback--avatarAltRadius);
  15. width: 1.5em;
  16. height: 1.5em;
  17. vertical-align: middle;
  18. user-select: none;
  19. margin-right: 0.2em;
  20. }
  21. .full {
  22. position: absolute;
  23. display: inline-block;
  24. pointer-events: none;
  25. opacity: 0;
  26. top: 100%;
  27. left: 0;
  28. height: 100%;
  29. word-wrap: normal;
  30. white-space: nowrap;
  31. transition: opacity 0.2s ease;
  32. z-index: 1;
  33. margin-top: 0.25em;
  34. padding: 0.5em;
  35. user-select: all;
  36. }
  37. & .short.-with-tooltip,
  38. & .you {
  39. user-select: none;
  40. }
  41. & .short,
  42. & .full {
  43. white-space: nowrap;
  44. }
  45. .shortName {
  46. white-space: normal;
  47. }
  48. .new {
  49. &.-you {
  50. .shortName {
  51. font-weight: 600;
  52. }
  53. }
  54. &.-has-selection {
  55. color: var(--alertNeutralText, $fallback--text);
  56. background-color: var(--alertNeutral, $fallback--fg);
  57. }
  58. .at {
  59. color: var(--link);
  60. opacity: 0.8;
  61. display: inline-block;
  62. line-height: 1;
  63. padding: 0 0.1em;
  64. vertical-align: -25%;
  65. margin: 0;
  66. }
  67. &.-striped {
  68. & .shortName {
  69. background-image:
  70. repeating-linear-gradient(
  71. 135deg,
  72. var(--____highlight-tintColor),
  73. var(--____highlight-tintColor) 5px,
  74. var(--____highlight-tintColor2) 5px,
  75. var(--____highlight-tintColor2) 10px
  76. );
  77. }
  78. }
  79. &.-solid {
  80. .shortName {
  81. background-image: linear-gradient(var(--____highlight-tintColor2), var(--____highlight-tintColor2));
  82. }
  83. }
  84. &.-side {
  85. .shortName {
  86. box-shadow: 0 -5px 3px -4px inset var(--____highlight-solidColor);
  87. }
  88. }
  89. }
  90. .serverName.-faded {
  91. color: var(--faintLink, $fallback--link);
  92. }
  93. }
  94. .mention-link-popover {
  95. max-width: 70ch;
  96. max-height: 20rem;
  97. overflow: hidden;
  98. }