LayerUI.scss 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. @import "open-color/open-color";
  2. .layer-ui__wrapper {
  3. .encrypted-icon {
  4. position: relative;
  5. margin-inline-start: 15px;
  6. display: flex;
  7. justify-content: center;
  8. align-items: center;
  9. border-radius: var(--space-factor);
  10. color: $oc-green-9;
  11. svg {
  12. width: 1.2rem;
  13. height: 1.2rem;
  14. }
  15. &.tooltip .tooltip-text {
  16. visibility: hidden;
  17. width: 20rem;
  18. bottom: calc(50% + 0.8rem + 6px);
  19. :root[dir="ltr"] & {
  20. left: -5px;
  21. }
  22. :root[dir="rtl"] & {
  23. right: -5px;
  24. }
  25. background-color: $oc-black;
  26. color: $oc-white;
  27. text-align: center;
  28. border-radius: 6px;
  29. padding: 5px;
  30. position: absolute;
  31. z-index: 10;
  32. font-size: 13px;
  33. line-height: 1.5;
  34. white-space: pre-wrap;
  35. &::after {
  36. --size: 6px;
  37. content: "";
  38. border: var(--size) solid transparent;
  39. border-top-color: $oc-black;
  40. position: absolute;
  41. bottom: calc(-2 * var(--size));
  42. :root[dir="ltr"] & {
  43. left: calc(5px + var(--size) / 2);
  44. }
  45. :root[dir="rtl"] & {
  46. right: calc(5px + var(--size) / 2);
  47. }
  48. }
  49. }
  50. // the following 3 rules ensure that the tooltip doesn't show (nor affect
  51. // the cursor) when you drag over when you draw on canvas, but at the same
  52. // time it still works when clicking on the link/shield
  53. body:active &.tooltip:not(:hover) {
  54. pointer-events: none;
  55. }
  56. body:not(:active) &.tooltip:hover .tooltip-text {
  57. visibility: visible;
  58. }
  59. .tooltip-text:hover {
  60. visibility: visible;
  61. }
  62. }
  63. &__github-corner {
  64. top: 0;
  65. right: 0;
  66. position: absolute;
  67. width: 40px;
  68. }
  69. &__footer {
  70. position: absolute;
  71. bottom: 0px;
  72. right: 0;
  73. width: 190px;
  74. }
  75. .zen-mode-transition {
  76. transition: transform 0.5s ease-in-out;
  77. &.transition-left {
  78. transform: translate(-999px, 0);
  79. }
  80. &.transition-right {
  81. transform: translate(999px, 0px);
  82. }
  83. }
  84. .disable-zen-mode {
  85. height: 30px;
  86. position: absolute;
  87. bottom: 10px;
  88. right: 15px;
  89. font-size: 10px;
  90. padding: 10px;
  91. font-weight: 500;
  92. opacity: 0;
  93. visibility: hidden;
  94. transition: visibility 0s linear 0s, opacity 0.5s;
  95. &--visible {
  96. opacity: 1;
  97. visibility: visible;
  98. transition: visibility 0s linear 300ms, opacity 0.5s;
  99. transition-delay: 0.8s;
  100. }
  101. }
  102. }
  103. .disable-pointerEvents {
  104. pointer-events: none !important;
  105. }