_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: 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. transition: opacity 0.75s;
  33. border: $panel-border;
  34. max-height: calc(66vh);
  35. overflow-y: scroll;
  36. max-width: calc(66%);
  37. overflow-x: hidden;
  38. outline: none;
  39. list-style: none;
  40. background: $panel-bg;
  41. color: $text-color;
  42. transition: opacity 0.4s ease-out;
  43. box-shadow: $typeahead-shadow;
  44. }
  45. .typeahead-group__title {
  46. color: $text-color-weak;
  47. font-size: $font-size-sm;
  48. line-height: $line-height-base;
  49. padding: $input-padding-y $input-padding-x;
  50. }
  51. .typeahead-item {
  52. height: auto;
  53. font-family: $font-family-monospace;
  54. padding: $input-padding-y $input-padding-x;
  55. padding-left: $input-padding-x-lg;
  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. }