_code_editor.sass 2.36 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12
@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

13 14 15 16 17 18 19 20 21
@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

22 23
.code-editor
  .editor
24
    .code-area
25
      flex-grow: 1
26
      max-height: 200px
27
      min-width: 25%
28 29 30 31
      overflow: auto
      .code-container
        background-color: #fafafa
        box-sizing: border-box
32
        position: relative
33 34 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
        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()
61 62 63 64 65 66 67
    .v-divider
      border-left: 1px solid gray
      cursor: sw-resize
      height: 100%
      margin-left: 5px
      margin-right: 5px
      width: 1px
68 69
    .html
      flex-grow: 2
70 71 72 73
      margin-left: 8px
      margin-right: 8px
      padding-left: 8px
      padding-right: 8px
74 75 76
      &.language-haskell
        font-family: Fira code,Fira Mono,Consolas,Menlo,Courier,monospace
        white-space: pre
77 78 79
      &.language-python
        font-family: Fira code,Fira Mono,Consolas,Menlo,Courier,monospace
        white-space: pre
80 81 82
      &.language-json
        font-family: Fira code,Fira Mono,Consolas,Menlo,Courier,monospace
        white-space: pre
83 84 85 86 87 88 89
      &.language-md
        ul
          li
            list-style: disc !important
        ol
          li
            list-style: decimal !important
90 91 92 93 94 95

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

    &__type
      width: 200px