_slate_editor.scss 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  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;
  11. min-height: $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: $space-sm;
  51. }
  52. .typeahead-item {
  53. height: auto;
  54. font-family: $font-family-monospace;
  55. padding: $space-sm $space-sm $space-sm $space-md;
  56. font-size: $font-size-sm;
  57. text-overflow: ellipsis;
  58. overflow: hidden;
  59. z-index: 1;
  60. display: block;
  61. white-space: nowrap;
  62. cursor: pointer;
  63. 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),
  64. background 0.3s cubic-bezier(0.645, 0.045, 0.355, 1), padding 0.15s cubic-bezier(0.645, 0.045, 0.355, 1);
  65. }
  66. .typeahead-item__selected {
  67. background-color: $typeahead-selected-bg;
  68. .typeahead-item-hint {
  69. font-size: $font-size-xs;
  70. color: $text-color;
  71. white-space: normal;
  72. }
  73. }
  74. .typeahead-match {
  75. color: $typeahead-selected-color;
  76. border-bottom: 1px solid $typeahead-selected-color;
  77. // Undoing mark styling
  78. padding: inherit;
  79. background: inherit;
  80. }
  81. }
  82. /* SYNTAX */
  83. .slate-query-field {
  84. .token.comment,
  85. .token.block-comment,
  86. .token.prolog,
  87. .token.doctype,
  88. .token.cdata {
  89. color: $text-color-weak;
  90. }
  91. .token.variable,
  92. .token.entity {
  93. color: $text-color;
  94. }
  95. .token.property,
  96. .token.tag,
  97. .token.constant,
  98. .token.symbol,
  99. .token.deleted {
  100. color: $query-red;
  101. }
  102. .token.attr-value,
  103. .token.selector,
  104. .token.string,
  105. .token.char,
  106. .token.builtin,
  107. .token.inserted {
  108. color: $query-green;
  109. }
  110. .token.boolean,
  111. .token.number,
  112. .token.operator,
  113. .token.url {
  114. color: $query-purple;
  115. }
  116. .token.function,
  117. .token.attr-name,
  118. .token.function-name,
  119. .token.atrule,
  120. .token.keyword,
  121. .token.class-name {
  122. color: $query-keyword;
  123. }
  124. .token.punctuation,
  125. .token.regex,
  126. .token.important {
  127. color: $query-orange;
  128. }
  129. .token.important {
  130. font-weight: normal;
  131. }
  132. .token.bold {
  133. font-weight: bold;
  134. }
  135. .token.italic {
  136. font-style: italic;
  137. }
  138. .token.entity {
  139. cursor: help;
  140. }
  141. .namespace {
  142. opacity: 0.7;
  143. }
  144. }