_slate_editor.scss 3.2 KB

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