_slate_editor.scss 3.1 KB

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