CodeEditor.sass 2.55 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 24 25 26 27 28 29 30 31 32
.code-editor-heading
  display: flex
  //justify-content: space-between
  .renameable
    flex-grow: 2
    .text
      padding-right: 10px
  .buttons-right
    display: flex
    justify-content: flex-end

33 34 35 36 37 38 39 40
.code-editor
  .toolbar
    display: flex
    justify-content: flex-start
    width: 100%
  .editor
    display: flex
    width: 100%
41
    .code-area
42
      flex-grow: 1
43
      max-height: 200px
44
      min-width: 25%
45 46 47 48
      overflow: auto
      .code-container
        background-color: #fafafa
        box-sizing: border-box
49
        position: relative
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77
        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()
78 79 80 81 82 83 84
    .v-divider
      border-left: 1px solid gray
      cursor: sw-resize
      height: 100%
      margin-left: 5px
      margin-right: 5px
      width: 1px
85 86 87 88
    .html
      flex-grow: 2
      margin-left: 25px
      padding-left: 25px
89 90 91
      &.language-haskell
        font-family: Fira code,Fira Mono,Consolas,Menlo,Courier,monospace
        white-space: pre
92 93 94
      &.language-python
        font-family: Fira code,Fira Mono,Consolas,Menlo,Courier,monospace
        white-space: pre
95 96 97
      &.language-json
        font-family: Fira code,Fira Mono,Consolas,Menlo,Courier,monospace
        white-space: pre
98 99 100 101 102 103 104
      &.language-md
        ul
          li
            list-style: disc !important
        ol
          li
            list-style: decimal !important