_code_editor.sass 2.39 KB
Newer Older
1 2
@use "./abstract/_members" as *

3 4 5 6 7 8 9 10 11 12 13 14
@mixin font-inherit()
  font-family: inherit
  font-size: inherit
  font-style: inherit
  font-variant-ligatures: inherit
  font-weight: inherit
  letter-spacing: inherit
  line-height: inherit
  text-indent: inherit
  text-rendering: inherit
  text-transform: inherit

15 16 17 18 19 20 21 22 23
@mixin common-overlay-props()
  box-sizing: inherit
  display: inherit
  margin: 0px
  padding: 10px
  overflow-wrap: break-word
  white-space: pre-wrap
  word-break: keep-all

24 25
.code-editor
  .editor
26
    .code-area
27
      flex-grow: 1
28
      max-height: 200px
29
      min-width: 25%
30 31 32 33
      overflow: auto
      .code-container
        background-color: #fafafa
        box-sizing: border-box
34
        position: relative
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
        font-family: Fira code,Fira Mono,Consolas,Menlo,Courier,monospace
        font-size: 12px
        font-variant-ligatures: common-ligatures
        line-height: 1.5
        overflow: hidden
        padding: 0px
        text-align: left
        textarea
          border: 0px
          color: inherit
          position: absolute
          left: 0px
          top: 0px
          resize: none
          height: 100%
          overflow: hidden
          width: 100%
          -webkit-text-fill-color: transparent
          @include common-overlay-props()
          @include font-inherit()
        pre
          background: rgba(0, 0, 0, 0) none repeat scroll 0% 0%
          border: 0px none
          color: #000
          pointer-events: none
          position: relative
          @include common-overlay-props()
          @include font-inherit()
63 64 65 66 67 68 69
    .v-divider
      border-left: 1px solid gray
      cursor: sw-resize
      height: 100%
      margin-left: 5px
      margin-right: 5px
      width: 1px
70 71
    .html
      flex-grow: 2
72 73 74 75
      margin-left: 8px
      margin-right: 8px
      padding-left: 8px
      padding-right: 8px
76 77 78
      &.language-haskell
        font-family: Fira code,Fira Mono,Consolas,Menlo,Courier,monospace
        white-space: pre
79 80 81
      &.language-python
        font-family: Fira code,Fira Mono,Consolas,Menlo,Courier,monospace
        white-space: pre
82 83 84
      &.language-json
        font-family: Fira code,Fira Mono,Consolas,Menlo,Courier,monospace
        white-space: pre
85 86 87 88 89 90 91
      &.language-md
        ul
          li
            list-style: disc !important
        ol
          li
            list-style: decimal !important
92 93 94 95 96 97

  &__toolbar
    margin-bottom: space-x(2.5)

    &__type
      width: 200px