HostsEditor.module.scss 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. @import "../../styles/common";
  2. .root {
  3. @include code;
  4. width: 100%;
  5. height: 100%;
  6. }
  7. .editor {
  8. height: calc(100% - var(--swh-status-bar-height));
  9. background: inherit;
  10. &.read_only {
  11. :global {
  12. .CodeMirror, .CodeMirror-gutters {
  13. //background-color: var(--swh-editor-read-only-bg);
  14. }
  15. .CodeMirror-cursor {
  16. display: none !important
  17. }
  18. }
  19. }
  20. textarea {
  21. width: 100%;
  22. height: 100%;
  23. border: none;
  24. padding: 10px;
  25. resize: none;
  26. outline: none;
  27. background: inherit;
  28. }
  29. :global {
  30. .CodeMirror {
  31. font-family: $font-editor;
  32. background: var(--swh-editor-bg-color);
  33. color: var(--swh-editor-text-color);
  34. }
  35. .cm-s-default .cm-comment {
  36. color: var(--swh-editor-comment);
  37. }
  38. .cm-s-default .cm-ip {
  39. color: var(--swh-editor-ip);
  40. font-weight: bold;
  41. }
  42. .cm-s-default .cm-error {
  43. color: var(--swh-editor-error);
  44. }
  45. .cm-s-default .cm-hl {
  46. background: var(--swh-editor-hl-bg);
  47. }
  48. .CodeMirror-gutters {
  49. border-right: none;
  50. padding-right: 6px;
  51. background: var(--swh-editor-gutter-bg);
  52. }
  53. .CodeMirror-linenumber {
  54. cursor: pointer;
  55. font-size: 12px;
  56. }
  57. .CodeMirror-scrollbar-filler{
  58. background: var(--swh-scrollbar-filler);
  59. }
  60. }
  61. }
  62. :global(.theme-dark) {
  63. .editor {
  64. :global {
  65. .CodeMirror-cursor {
  66. border-color: #39c;
  67. }
  68. }
  69. }
  70. }
  71. .status_bar {
  72. height: var(--swh-status-bar-height);
  73. line-height: var(--swh-status-bar-height);
  74. border-top: 1px solid var(--swh-border-color-1);
  75. padding: 0 10px;
  76. font-size: 12px;
  77. display: grid;
  78. grid-template-columns: 1fr 1fr;
  79. color: var(--swh-font-color-weak);
  80. }