Skip to content
Snippets Groups Projects
SimpleEditor.scss 5.47 KiB
Newer Older
// Font Awesome
john's avatar
john committed
$fa-font-path: '~font-awesome/fonts';
@import '~font-awesome/scss/font-awesome';
john's avatar
john committed
@import '~substance/substance.css';
@import './elements/elements';
@import './panes/panes';

john's avatar
john committed
// grays
$border: #ccc;
$dark-gray: #999;
$light-gray: #ddd;
$primary: #eee;
$ultra-light-gray: #fafafa;
john's avatar
john committed

$black: #000;
$shadow: rgba(0, 0, 0, .05);
$teal: #46b9ba;
john's avatar
john committed
$toolbar-active-bg: rgba(204, 204, 204, .75);
$transparent-black: rgba(0, 0, 0, .75);
$white: #fff;
// track changes
$inactive-grey: #404040;
$active-blue: #4a90e2;

.editor-wrapper {
  height: 90vh;
  position: relative;

  .view-mode {
    height: 44px;
    position: fixed;
    text-align: center;
    z-index: 9999;

    span {
      font-size: 14px;
      position: relative;
      top: 10px;
    }
  }
    .se-content:first-child {

    .sc-prose-editor-overlay-tools .se-active-tools .sc-comment-icon {
      top: 0;
    }

    .sc-comment-pane-list li .comment-list .single-comment-row {
      padding: 3px 12px;
    }
}

.sc-prose-editor {
  bottom: 0;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;

john's avatar
john committed
  .sc-toolbar {
    background-color: $primary;
    border: 1px solid $border;
    border-right: 0;
john's avatar
john committed
    padding-left: 0;
chris's avatar
chris committed
    vertical-align: middle;
    @-moz-document url-prefix() {
      .sc-tool-group > .sc-switch-text-type {
        margin: 0;
        position: relative;
        top: 8px;
      }
john's avatar
john committed
    }

    .sm-target-text {
chris's avatar
chris committed
      height: 100%;
chris's avatar
chris committed
      position: relative;
      .sc-switch-text-type {
        margin-left: 1px;
        width: 150px;
        button {
          color: $transparent-black;
          height: inherit;
          position: relative;
          top: 5px;
        }
        .se-toggle {
          background: transparent;
          border: 0;
          font-family: 'Fira Sans';
          font-size: 14px;
          outline: none;
        }

        .se-options {
          top: 36px;
        }

        .se-option {
          background-color: $white;
          border: 0;
          font-family: 'Fira Sans';
        }
      }
    } // end dropdown
    .sm-target-track-change-enable {
      border-right: 1px solid $border;
        background-color: $inactive-grey;
        border-radius: 0;
chris's avatar
chris committed
        color: $white;
        // cursor: pointer;
chris's avatar
chris committed
        padding: 0 19px;
chris's avatar
chris committed
        content: 'Record Changes';
      .track-changes-active {
        background-color: $active-blue;
        color: $white;
chris's avatar
chris committed
        padding: 0 10px;
chris's avatar
chris committed
           content: 'Recording Changes';
    }

    .sm-target-track-change-toggle-view {
      cursor: pointer;
chris's avatar
chris committed
      button {
        background-color: $inactive-grey;
        border-radius: 0;
        color: $white;
        cursor: pointer;
        padding: 0 19px;
        position: relative;
chris's avatar
chris committed
      button::after {
        content: 'Changes View Off';
      }
      .track-changes-view-active {
        background-color: #228b46;
        color: $white;
        padding: 0 19px
      }
      .track-changes-view-active::after {
chris's avatar
chris committed
        content: 'Changes View On';
    .sm-target-document {
      border-left: 1px solid $border;
    }

    .sm-target-track-change-enable,
    .sm-target-track-change-toggle-view {
chris's avatar
chris committed
      padding: 0 9px;
    }

    .sm-target-document,
    .sm-target-annotations,
    .sm-target-insert {
      border-right: 1px solid $border;
chris's avatar
chris committed
      padding: 0px 9px;
john's avatar
john committed
      .sc-button {
        background: transparent;
        border: 0;
        border-radius: 0;
        font-size: 14px;
        outline: none;
        padding: 0 12px;

        &:hover {
          background: $toolbar-active-bg;

          &:disabled {
            background: transparent;
          }
        }
chris's avatar
chris committed
     }
chris's avatar
chris committed
    .sm-active {
      background: $toolbar-active-bg;
      color: $black;
      margin: 0;
      outline: none;
      padding: 0;
chris's avatar
chris committed
      &:after {
        bottom: 17px;
        color: $black;
        content: 'x';
        font-size: 8px;
        left: 21px;
        position: absolute;
chris's avatar
chris committed
  } // End sc-toolbar

  .se-scrollable {
    background-color: $primary;
    border-right: 1px solid $light-gray;
    margin-top: 1px;
  }


  .se-content {
john's avatar
john committed
    color: $transparent-black;
    font-family: 'Fira Sans';
john's avatar
john committed
    word-wrap: break-word;

    ::selection {
      background: $light-gray;
    }

    ::-moz-selection {
      background: $light-gray;
    }

john's avatar
john committed
    .se-selection-fragment {
chris's avatar
chris committed
      background: none;
    &:first-child {
      background-color: $white;
      box-shadow: 0 0 8px $dark-gray;
chris's avatar
chris committed
      margin: 1.5% 14% 7%;
      min-height: 100vh;
      padding: 3% 4% 1%;
      transition: .3s;
    }

    .sc-split-pane {
      position: relative;
    }

john's avatar
john committed
    .sc-surface {
      outline: none;
    }

    .sc-prose-editor-overlay-tools {
      .se-active-tools {
        background: transparent;
        border: 0;
        padding: 0;
      }
    }

    .sc-prose-editor-overlay-tools::before {
      border-style: none;
      border-width: 0;
  }
chris's avatar
chris committed
} // end sc-content

  .sc-has-comments {
    .se-content {
      &:first-child {
john's avatar
john committed
        margin: 1.5% 27% 5% 1%;
        transition: .3s;
      }
    }
  }

  .se-context-section {
    background-color: $ultra-light-gray;
    border-left: 1px solid $light-gray;
    box-shadow: inset 0 0 10px $shadow;
  }

  .sc-comments-pane {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    margin-left: 8%;
  }
}