﻿@import url(theme.css);

@set editor < theme
{
  :root {
    overflow-x: scroll-indicator;
    overflow-y: hidden;
    border:1px solid black;
    background: var(editor-paper); //paper
    width: 100*;
    height: max-content;
    min-height: 100%;
    min-width: max-content;
    margin: 24dip 25* 24dip 25*;
    box-shadow: 0px 2dip 4dip rgba(0,0,0,0.40);     

    font-family: monospace;
    font-size: 18px;
    //color: transparent;
    color: var(editor-text);
    tab-size: 1;

    padding: 25px;
    stroke: rgba(215, 215, 193, 50%);
    stroke-width: 1px;
  }

  :root[word-wrap=true] {
    min-width: auto;    
  }

  @media window-width < 800dip {
    :root {
      margin: 24dip 1* 24dip 1*;
    }
  }
  
  :root {
    background-size: 800px 25dip;
    background-image: url(path:m0 0 800 0m0 -25);
    background-repeat: repeat;
    background-attachment: local;
  }
  
  :root[word-wrap=true] > text {
    white-space: pre-wrap;
    word-wrap: break-word;
    height: auto;
    line-height: 25dip;
  }

  :root > text {
    white-space: pre;
    word-wrap: normal;
    height: 25dip;
    line-height: 25dip;
  }
  
  :root > text[Seperator=true] {
    white-space: nowrap;
    overflow-x: hidden;
    text-overflow: clip;
  }
  
  text[Error] {
    background: rgba(255, 0, 0, 10%);
    //can't see caret without this
    text-selection-caret-color: currentcolor;
  }

  /*text::highlight(Text) {
    font-style: italic;
    color: #636363;
    font-weight: bold;
  }*/

  text::highlight(Annotation) {
    font-style: italic;
    color: var(editor-annotation); 
  }

  text::highlight(Equal), 
  text::highlight(Variable),
  text::highlight(Identifier), 
  text::highlight(SuffixIdentifier) { 
    color: var(editor-variable);
    text-decoration: none;
    font-weight: normal;
  }

  text::highlight(Variable){
    font-weight: bold;
  }

  text::highlight(DefinedIdentifier), 
  text::highlight(UndefinedIdentifier), 
  text::highlight(Error) { 
    text-decoration: wavy underline var(editor-errors);
    color: var(editor-errors);
  }

  text::highlight(NumberLiteral),
  text::highlight(Operator) {
    font-style: normal;
    color: var(editor-number); 
  }

  text::highlight(ErrorLiteral){
    color: var(editor-errors);
  }

  text::highlight(NegetiveLiteral) {
    font-style: normal;
    color: var(editor-negation); 
  }

  text::highlight(Seperator),
  text::highlight(Result) {
    color: var(editor-result); 
  }

  popup.tooltip {
    cursor: default;
    color: #000;
    font-family: monospace;
    font-size: 18px;
    width: max-content;
    max-width: 25em;
    padding-left: 0.5em;
    padding-right: 0.5em;
    padding-top: *;
    padding-bottom: *;
    margin: 8px 0;
    background: var(editor-tooltip);
    border-color: var(editor-tooltip);
    border-radius: 0 8dip 8dip 8dip;
    white-space: pre-wrap;
    word-break: break-all;
    text-overflow: epsillon;
    overflow-y: scroll-indicator;
    content-vertical-align: middle;
  }
}  