_slate_editor.scss 2.9 KB

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