/*
 *  syntax coloring rules
 *
 *  these rules correspond to the rules you define
 *  for syntax highlighting. in our javascript demos
 *  we provide rules for locating keywords, strings,
 *  comments, and numbers (these rules are located in
 *  the rules/javascript.js file and are designed to
 *  be easily modified or replaced).
 */
::highlight(keywords) { color:white; } 
::highlight(strings)  { color:white; }
::highlight(comments) { background-color:#333; }

/* main editor class */
.bitty-editor { 
  /* choose font and size */
  font-family:   'Roboto Mono', monospace; 
  font-size:     14px;
  /* fill viewport with editor */
  height:        100vh;
  /* provide scrollbars if needed */
  overflow-y:    auto;
  /* preserve whitespace */
  white-space:   pre-wrap;
}

.bitty-editor div { 
  /* ensure all divs are block elements to prevent collapse when empty*/
  display:  block; 
  position: relative; 
}

/* remove next two rules if you don't want line numbers */
.bitty-editor {
  padding-left:  4rem; 
  counter-reset: line; 
}
.bitty-editor div::before {
  content:           counter(line); 
  counter-increment: line; 
  position:          absolute; 
  /* should accommodate up to 999 lines, otherwise tweak as needed */
  right:             calc(100% + .75rem); 
  opacity:           0.5; 
}

body { 
  background:black;
  padding:0;
  margin:0;
  /* the body color property determines default text color */
  color:#bbb;
  /* measured in character length (not pixels/ems etc) */
  tab-size:2;
}

/* for when text is selected */
::selection {
  background:#444;
  color:white;
}

/* 
 * fancy pseudo-selector to not color numbers when they are inside
 * coments or strings
 */
.bitty-numbers:not( .bitty-strings > span, .bitty-comments > span )  { 
  color:#faa; 
}

/* active line highlight, requires plugin */
.bitty-active { background:#222 }
