_slate_editor.scss 3.1 KB

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