_slate_editor.scss 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. .slate-query-field {
  2. font-size: $font-size-base;
  3. font-family: $font-family-monospace;
  4. height: auto;
  5. word-break: break-word;
  6. // Affects only placeholder in query field. Adds scrollbar only if content is cropped.
  7. overflow: auto;
  8. }
  9. .slate-query-field__wrapper {
  10. position: relative;
  11. display: inline-block;
  12. padding: 6px 8px;
  13. min-height: $input-height;
  14. width: 100%;
  15. color: $text-color;
  16. background-color: $input-bg;
  17. background-image: none;
  18. border: $input-border;
  19. border-radius: $border-radius;
  20. transition: all 0.3s;
  21. line-height: $input-line-height;
  22. }
  23. .slate-query-field__wrapper--disabled {
  24. background-color: inherit;
  25. cursor: not-allowed;
  26. }
  27. .slate-typeahead {
  28. .typeahead {
  29. position: relative;
  30. z-index: $zindex-typeahead;
  31. border-radius: $border-radius;
  32. border: $panel-border;
  33. max-height: calc(66vh);
  34. overflow-y: scroll;
  35. overflow-x: hidden;
  36. outline: none;
  37. list-style: none;
  38. background: $panel-bg;
  39. color: $text-color;
  40. box-shadow: $typeahead-shadow;
  41. }
  42. .typeahead-group__title {
  43. color: $text-color-weak;
  44. font-size: $font-size-sm;
  45. line-height: $line-height-base;
  46. padding: $space-sm;
  47. }
  48. .typeahead-item {
  49. height: auto;
  50. font-family: $font-family-monospace;
  51. padding: $space-sm $space-sm $space-sm $space-md;
  52. font-size: $font-size-sm;
  53. text-overflow: ellipsis;
  54. overflow: hidden;
  55. z-index: 1;
  56. display: block;
  57. white-space: nowrap;
  58. cursor: pointer;
  59. transition: color 0.3s cubic-bezier(0.645, 0.045, 0.355, 1), border-color 0.3s cubic-bezier(0.645, 0.045, 0.355, 1),
  60. background 0.3s cubic-bezier(0.645, 0.045, 0.355, 1), padding 0.15s cubic-bezier(0.645, 0.045, 0.355, 1);
  61. }
  62. .typeahead-item__selected {
  63. background-color: $typeahead-selected-bg;
  64. .typeahead-item-hint {
  65. font-size: $font-size-xs;
  66. color: $text-color;
  67. white-space: normal;
  68. }
  69. }
  70. .typeahead-match {
  71. color: $typeahead-selected-color;
  72. border-bottom: 1px solid $typeahead-selected-color;
  73. // Undoing mark styling
  74. padding: inherit;
  75. background: inherit;
  76. }
  77. }
  78. /* SYNTAX */
  79. .slate-query-field,
  80. .prism-syntax-highlight {
  81. .token.comment,
  82. .token.block-comment,
  83. .token.prolog,
  84. .token.doctype,
  85. .token.cdata {
  86. color: $text-color-weak;
  87. }
  88. .token.variable,
  89. .token.entity {
  90. color: $text-color;
  91. }
  92. .token.property,
  93. .token.tag,
  94. .token.constant,
  95. .token.symbol,
  96. .token.deleted {
  97. color: $query-red;
  98. }
  99. .token.attr-value,
  100. .token.selector,
  101. .token.string,
  102. .token.char,
  103. .token.builtin,
  104. .token.inserted {
  105. color: $query-green;
  106. }
  107. .token.boolean,
  108. .token.number,
  109. .token.operator,
  110. .token.url {
  111. color: $query-purple;
  112. }
  113. .token.function,
  114. .token.attr-name,
  115. .token.function-name,
  116. .token.atrule,
  117. .token.keyword,
  118. .token.class-name {
  119. color: $text-blue;
  120. }
  121. .token.punctuation,
  122. .token.regex,
  123. .token.important {
  124. color: $query-orange;
  125. }
  126. .token.important {
  127. font-weight: normal;
  128. }
  129. .token.bold {
  130. font-weight: bold;
  131. }
  132. .token.italic {
  133. font-style: italic;
  134. }
  135. .token.entity {
  136. cursor: help;
  137. }
  138. .namespace {
  139. opacity: 0.7;
  140. }
  141. }