_notif.scss 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. ._notif, %notif {
  2. position: absolute;
  3. z-index: 2;
  4. top: 1rem;
  5. right: 1rem;
  6. width: 25rem;
  7. max-width: 90%;
  8. padding: .625rem 1rem;
  9. font-size: .75rem;
  10. color: var(--notifColor);
  11. background: var(--notifBackground);
  12. border: var(--notifBorder);
  13. border-radius: .25rem;
  14. transition: opacity .2s;
  15. opacity: 0;
  16. cursor: default;
  17. @extend %border-box, %user-select-none;
  18. &._in { opacity: 1; }
  19. }
  20. ._notif-title {
  21. margin: 0 0 .5rem;
  22. line-height: 1rem;
  23. font-size: inherit;
  24. }
  25. ._notif-text { margin-bottom: 0; }
  26. ._notif-text + ._notif-text { margin-top: .25rem; }
  27. ._notif-info {
  28. float: right;
  29. color: var(--notifColorLight);
  30. }
  31. ._notif-link,
  32. ._notif-link:hover {
  33. color: inherit;
  34. text-decoration: underline;
  35. cursor: pointer;
  36. }
  37. ._notif-close {
  38. position: absolute;
  39. top: 0;
  40. right: 0;
  41. width: 2.25rem;
  42. height: 2.25rem;
  43. opacity: .9;
  44. @extend %hide-text;
  45. > svg {
  46. position: absolute;
  47. top: .625rem;
  48. left: .625rem;
  49. fill: white;
  50. @extend %svg-icon;
  51. }
  52. &:hover { opacity: 1; }
  53. }
  54. ._notif-content {
  55. max-height: calc(50vh - 4.5rem);
  56. margin: 0 -.25rem 0 0;
  57. padding-right: .75rem;
  58. overflow-y: auto;
  59. &::-webkit-scrollbar { width: 10px !important; }
  60. &::-webkit-scrollbar-track {
  61. background: var(--notifBackground) !important;
  62. border: 0 !important;
  63. border-radius: 5px !important;
  64. }
  65. &::-webkit-scrollbar-thumb {
  66. border: 3px solid var(--notifBackground) !important;
  67. &:hover, &:active { border-width: 2px !important; }
  68. }
  69. > ._notif-title {
  70. margin-bottom: .5rem;
  71. text-align: center;
  72. }
  73. }
  74. ._notif-news {
  75. > ._news-row {
  76. line-height: 1.125rem;
  77. font-size: .6875rem;
  78. color: var(--notifColorLight);
  79. margin-bottom: .25rem;
  80. + ._news-row { margin-top: .625rem; }
  81. }
  82. ._news-title {
  83. display: block;
  84. margin-bottom: .25rem;
  85. font-size: .75rem;
  86. font-weight: normal;
  87. color: white;
  88. }
  89. ._news-date {
  90. float: right;
  91. margin-left: 1rem;
  92. font-weight: var(--boldFontWeight);
  93. }
  94. code {
  95. display: inline-block;
  96. vertical-align: baseline;
  97. line-height: 0;
  98. margin: 0 .25rem;
  99. padding: 0;
  100. color: inherit;
  101. background: none;
  102. border: 0;
  103. }
  104. }
  105. ._notif-list {
  106. margin: 0;
  107. padding-left: 1rem;
  108. }
  109. ._notif-tip {
  110. color: var(--textColor);
  111. background: var(--tipBackground);
  112. border: var(--tipBorder);
  113. ._notif-info { color: var(--textColorLight); }
  114. }
  115. ._notif-right {
  116. float: right;
  117. }