IconPicker.scss 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. @import "../css/variables.module";
  2. .excalidraw {
  3. .picker-container {
  4. display: inline-block;
  5. box-sizing: border-box;
  6. margin-right: 0.25rem;
  7. }
  8. .picker {
  9. background: var(--popup-bg-color);
  10. border: 0 solid transparentize($oc-white, 0.75);
  11. box-shadow: transparentize($oc-black, 0.75) 0 1px 4px;
  12. border-radius: 4px;
  13. position: absolute;
  14. }
  15. .picker-container button,
  16. .picker button {
  17. position: relative;
  18. display: flex;
  19. align-items: center;
  20. justify-content: center;
  21. &:focus {
  22. outline: transparent;
  23. background-color: var(--button-gray-2);
  24. & svg {
  25. opacity: 1;
  26. }
  27. }
  28. &:hover {
  29. background-color: var(--button-gray-2);
  30. }
  31. &:active {
  32. background-color: var(--button-gray-3);
  33. }
  34. &:disabled {
  35. cursor: not-allowed;
  36. }
  37. svg {
  38. margin: 0;
  39. width: 36px;
  40. height: 18px;
  41. opacity: 0.6;
  42. pointer-events: none;
  43. }
  44. }
  45. .picker button {
  46. padding: 0.25rem 0.28rem 0.35rem 0.25rem;
  47. }
  48. .picker-triangle {
  49. width: 0;
  50. height: 0;
  51. position: relative;
  52. top: -10px;
  53. :root[dir="ltr"] & {
  54. left: 12px;
  55. }
  56. :root[dir="rtl"] & {
  57. right: 12px;
  58. }
  59. z-index: 10;
  60. &:before {
  61. content: "";
  62. position: absolute;
  63. border-style: solid;
  64. border-width: 0 9px 10px;
  65. border-color: transparent transparent transparentize($oc-black, 0.9);
  66. top: -1px;
  67. }
  68. &:after {
  69. content: "";
  70. position: absolute;
  71. border-style: solid;
  72. border-width: 0 9px 10px;
  73. border-color: transparent transparent var(--popup-bg-color);
  74. }
  75. }
  76. .picker-content {
  77. padding: 0.5rem;
  78. display: grid;
  79. grid-auto-flow: column;
  80. grid-gap: 0.5rem;
  81. border-radius: 4px;
  82. :root[dir="rtl"] & {
  83. padding: 0.4rem;
  84. }
  85. }
  86. .picker-keybinding {
  87. position: absolute;
  88. bottom: 2px;
  89. font-size: 0.7em;
  90. color: var(--keybinding-color);
  91. :root[dir="ltr"] & {
  92. right: 2px;
  93. }
  94. :root[dir="rtl"] & {
  95. left: 2px;
  96. }
  97. @include isMobile {
  98. display: none;
  99. }
  100. }
  101. .picker-type-canvasBackground .picker-keybinding {
  102. color: #aaa;
  103. }
  104. .picker-type-elementBackground .picker-keybinding {
  105. color: $oc-white;
  106. }
  107. .picker-swatch[aria-label="transparent"] .picker-keybinding {
  108. color: #aaa;
  109. }
  110. .picker-type-elementStroke .picker-keybinding {
  111. color: #d4d4d4;
  112. }
  113. &.theme--dark {
  114. .picker-type-elementBackground .picker-keybinding {
  115. color: $oc-black;
  116. }
  117. .picker-swatch[aria-label="transparent"] .picker-keybinding {
  118. color: $oc-black;
  119. }
  120. }
  121. }