@import "syntax-variables";

.editor-colors {
  background-color: @syntax-background-color;
  color: @syntax-text-color;
}

.editor {
  background-color: @syntax-background-color;
  color: @syntax-text-color;

  .wrap-guide {
    background-color: @syntax-wrap-guide-color;
  }

  .indent-guide {
    color: @syntax-indent-guide-color;
  }

  .invisible-character {
    color: @syntax-invisible-character-color;
  }

  .gutter {
    background-color: @syntax-gutter-background-color;
    color: @syntax-gutter-text-color;

    .line-number {
      &.cursor-line {
        background-color: @syntax-gutter-background-color-selected;
        color: @syntax-gutter-text-color-selected;
      }

      &.cursor-line-no-selection {
        color: @syntax-gutter-text-color-selected;
      }
    }
  }

  .gutter .line-number.folded,
  .gutter .line-number:after,
  .fold-marker:after {
    color: @light-gray;
  }

  .invisible {
    color: @syntax-text-color;
  }

  .cursor {
    color: @syntax-cursor-color;
    background-color: @syntax-cursor-color;

  }

  .selection .region {
    background-color: @syntax-selection-color;
  }
}

.editor .search-results .marker .region {
  background-color: transparent;
  border: 1px solid @syntax-result-marker-color;
}

.editor .search-results .marker.current-result .region {
  border: 1px solid @syntax-result-marker-color-selected;
}

.comment {
  color: @solid-gray;
}

.entity {
  &.name.type {
    color: @light-orange;
  }

  &.other.inherited-class {
    color: @green;
  }
}

.keyword {
  color: @dark-blue;

  &.control {
    color: @dark-blue;
  }

  &.operator {
    color: @syntax-text-color;
  }

  &.other.special-method {
    color: @blue;
  }

  &.other.unit {
    color: @orange;
  }
}

.storage {
  color: @purple;
}

.constant {
  color: @orange;

  &.character.escape {
    color: @magenta;
  }

  &.numeric {
    color: @orange;
  }

  &.other.color {
    color: @cyan;
  }

  &.other.symbol {
    color: @darker-blue;
  }
}

.variable {
  color: @cyan;

  &.interpolation {
    color: darken(@red, 10%);
  }

  &.parameter.function {
    color: @syntax-text-color;
  }
}

.invalid.illegal {
  background-color: @red;
  color: @syntax-background-color;
}

.string {
  color: @green;


  &.regexp {
    color: @dark-magenta;

    .source.ruby.embedded {
      color: @orange;
    }
  }

  &.other.link {
    color: @red;
  }
}

.punctuation {
  &.definition {
    &.comment {
      color: @solid-gray;
    }

    &.variable {
      color: @cyan;
    }

    &.parameters {
      color: @off-white;
    }

    &.string,
    &.array {
      color: @dark-green;
    }

    &.heading,
    &.identity {
      color: @blue;
    }

    &.bold {
      color: @light-orange;
      font-style: bold;
    }

    &.italic {
      color: @purple;
      font-style: italic;
    }
  }

  &.section.embedded {
    color: darken(@red, 10%);
  }

}

.support {
  &.class {
    color: @light-orange;
  }

  &.function  {
    color: @cyan;

    &.any-method {
      color: @blue;
    }
  }
}

.entity {
  &.name.function {
    color: @yellow;
  }

  &.name.class, &.name.type.class {
    color: @light-orange;
  }

  &.name.section {
    color: @blue;
  }

  &.name.tag {
    color: @red;
    text-decoration: underline;
  }

  &.other.attribute-name {
    color: @orange;

    &.id {
      color: @blue;
    }
  }
}

.meta {
  &.class {
    color: @light-orange;
  }

  &.link {
    color: @orange;
  }

  &.require {
    color: @blue;
  }

  &.selector {
    color: @purple;
  }

  &.separator {
    background-color: @gray;
    color: @syntax-text-color;
  }
}

.none {
  color: @syntax-text-color;
}

.markup {
  &.bold {
    color: @orange;
    font-style: bold;
  }

  &.changed {
    color: @purple;
  }

  &.deleted {
    color: @red;
  }

  &.italic {
    color: @purple;
    font-style: italic;
  }

  &.heading .punctuation.definition.heading {
    color: @blue;
  }

  &.inserted {
    color: @green;
  }

  &.list {
    color: @red;
  }

  &.quote {
    color: @orange;
  }

  &.raw.inline {
    color: @green;
  }
}

.source.gfm .markup {
  -webkit-font-smoothing: auto;
  &.heading {
    color: @green;
  }
}

.editor.mini .scroll-view {
  padding-left: 1px;
}
