michael@0: /* BASICS */ michael@0: michael@0: .CodeMirror { michael@0: /* Set height, width, borders, and global font properties here */ michael@0: font-family: monospace; michael@0: height: 300px; michael@0: } michael@0: .CodeMirror-scroll { michael@0: /* Set scrolling behaviour here */ michael@0: overflow: auto; michael@0: } michael@0: michael@0: /* PADDING */ michael@0: michael@0: .CodeMirror-lines { michael@0: padding: 4px 0; /* Vertical padding around content */ michael@0: } michael@0: .CodeMirror pre { michael@0: padding: 0 4px; /* Horizontal padding of content */ michael@0: } michael@0: michael@0: .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler { michael@0: background-color: white; /* The little square between H and V scrollbars */ michael@0: } michael@0: michael@0: /* GUTTER */ michael@0: michael@0: .CodeMirror-gutters { michael@0: border-right: 1px solid #ddd; michael@0: background-color: #f7f7f7; michael@0: white-space: nowrap; michael@0: } michael@0: .CodeMirror-linenumbers {} michael@0: .CodeMirror-linenumber { michael@0: padding: 0 3px 0 5px; michael@0: min-width: 20px; michael@0: text-align: right; michael@0: color: #999; michael@0: -moz-box-sizing: content-box; michael@0: box-sizing: content-box; michael@0: } michael@0: michael@0: /* CURSOR */ michael@0: michael@0: .CodeMirror div.CodeMirror-cursor { michael@0: border-left: 1px solid black; michael@0: } michael@0: /* Shown when moving in bi-directional text */ michael@0: .CodeMirror div.CodeMirror-secondarycursor { michael@0: border-left: 1px solid silver; michael@0: } michael@0: .CodeMirror.cm-keymap-fat-cursor div.CodeMirror-cursor { michael@0: width: auto; michael@0: border: 0; michael@0: background: #7e7; michael@0: } michael@0: /* Can style cursor different in overwrite (non-insert) mode */ michael@0: div.CodeMirror-overwrite div.CodeMirror-cursor {} michael@0: michael@0: .cm-tab { display: inline-block; } michael@0: michael@0: .CodeMirror-ruler { michael@0: border-left: 1px solid #ccc; michael@0: position: absolute; michael@0: } michael@0: michael@0: /* DEFAULT THEME */ michael@0: michael@0: .cm-s-default .cm-keyword {color: #708;} michael@0: .cm-s-default .cm-atom {color: #219;} michael@0: .cm-s-default .cm-number {color: #164;} michael@0: .cm-s-default .cm-def {color: #00f;} michael@0: .cm-s-default .cm-variable {color: black;} michael@0: .cm-s-default .cm-variable-2 {color: #05a;} michael@0: .cm-s-default .cm-variable-3 {color: #085;} michael@0: .cm-s-default .cm-property {color: black;} michael@0: .cm-s-default .cm-operator {color: black;} michael@0: .cm-s-default .cm-comment {color: #a50;} michael@0: .cm-s-default .cm-string {color: #a11;} michael@0: .cm-s-default .cm-string-2 {color: #f50;} michael@0: .cm-s-default .cm-meta {color: #555;} michael@0: .cm-s-default .cm-qualifier {color: #555;} michael@0: .cm-s-default .cm-builtin {color: #30a;} michael@0: .cm-s-default .cm-bracket {color: #997;} michael@0: .cm-s-default .cm-tag {color: #170;} michael@0: .cm-s-default .cm-attribute {color: #00c;} michael@0: .cm-s-default .cm-header {color: blue;} michael@0: .cm-s-default .cm-quote {color: #090;} michael@0: .cm-s-default .cm-hr {color: #999;} michael@0: .cm-s-default .cm-link {color: #00c;} michael@0: michael@0: .cm-negative {color: #d44;} michael@0: .cm-positive {color: #292;} michael@0: .cm-header, .cm-strong {font-weight: bold;} michael@0: .cm-em {font-style: italic;} michael@0: .cm-link {text-decoration: underline;} michael@0: michael@0: .cm-s-default .cm-error {color: #f00;} michael@0: .cm-invalidchar {color: #f00;} michael@0: michael@0: div.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;} michael@0: div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;} michael@0: .CodeMirror-activeline-background {background: #e8f2ff;} michael@0: michael@0: /* STOP */ michael@0: michael@0: /* The rest of this file contains styles related to the mechanics of michael@0: the editor. You probably shouldn't touch them. */ michael@0: michael@0: .CodeMirror { michael@0: line-height: 1; michael@0: position: relative; michael@0: overflow: hidden; michael@0: background: white; michael@0: color: black; michael@0: } michael@0: michael@0: .CodeMirror-scroll { michael@0: /* 30px is the magic margin used to hide the element's real scrollbars */ michael@0: /* See overflow: hidden in .CodeMirror */ michael@0: margin-bottom: -30px; margin-right: -30px; michael@0: padding-bottom: 30px; michael@0: height: 100%; michael@0: outline: none; /* Prevent dragging from highlighting the element */ michael@0: position: relative; michael@0: -moz-box-sizing: content-box; michael@0: box-sizing: content-box; michael@0: } michael@0: .CodeMirror-sizer { michael@0: position: relative; michael@0: border-right: 30px solid transparent; michael@0: -moz-box-sizing: content-box; michael@0: box-sizing: content-box; michael@0: } michael@0: michael@0: /* The fake, visible scrollbars. Used to force redraw during scrolling michael@0: before actuall scrolling happens, thus preventing shaking and michael@0: flickering artifacts. */ michael@0: .CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler { michael@0: position: absolute; michael@0: z-index: 6; michael@0: display: none; michael@0: } michael@0: .CodeMirror-vscrollbar { michael@0: right: 0; top: 0; michael@0: overflow-x: hidden; michael@0: overflow-y: scroll; michael@0: } michael@0: .CodeMirror-hscrollbar { michael@0: bottom: 0; left: 0; michael@0: overflow-y: hidden; michael@0: overflow-x: scroll; michael@0: } michael@0: .CodeMirror-scrollbar-filler { michael@0: right: 0; bottom: 0; michael@0: } michael@0: .CodeMirror-gutter-filler { michael@0: left: 0; bottom: 0; michael@0: } michael@0: michael@0: .CodeMirror-gutters { michael@0: position: absolute; left: 0; top: 0; michael@0: padding-bottom: 30px; michael@0: z-index: 3; michael@0: } michael@0: .CodeMirror-gutter { michael@0: white-space: normal; michael@0: height: 100%; michael@0: -moz-box-sizing: content-box; michael@0: box-sizing: content-box; michael@0: padding-bottom: 30px; michael@0: margin-bottom: -32px; michael@0: display: inline-block; michael@0: /* Hack to make IE7 behave */ michael@0: *zoom:1; michael@0: *display:inline; michael@0: } michael@0: .CodeMirror-gutter-elt { michael@0: position: absolute; michael@0: cursor: default; michael@0: z-index: 4; michael@0: } michael@0: michael@0: .CodeMirror-lines { michael@0: cursor: text; michael@0: } michael@0: .CodeMirror pre { michael@0: /* Reset some styles that the rest of the page might have set */ michael@0: -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0; michael@0: border-width: 0; michael@0: background: transparent; michael@0: font-family: inherit; michael@0: font-size: inherit; michael@0: margin: 0; michael@0: white-space: pre; michael@0: word-wrap: normal; michael@0: line-height: inherit; michael@0: color: inherit; michael@0: z-index: 2; michael@0: position: relative; michael@0: overflow: visible; michael@0: } michael@0: .CodeMirror-wrap pre { michael@0: word-wrap: break-word; michael@0: white-space: pre-wrap; michael@0: word-break: normal; michael@0: } michael@0: michael@0: .CodeMirror-linebackground { michael@0: position: absolute; michael@0: left: 0; right: 0; top: 0; bottom: 0; michael@0: z-index: 0; michael@0: } michael@0: michael@0: .CodeMirror-linewidget { michael@0: position: relative; michael@0: z-index: 2; michael@0: overflow: auto; michael@0: } michael@0: michael@0: .CodeMirror-widget {} michael@0: michael@0: .CodeMirror-wrap .CodeMirror-scroll { michael@0: overflow-x: hidden; michael@0: } michael@0: michael@0: .CodeMirror-measure { michael@0: position: absolute; michael@0: width: 100%; michael@0: height: 0; michael@0: overflow: hidden; michael@0: visibility: hidden; michael@0: } michael@0: .CodeMirror-measure pre { position: static; } michael@0: michael@0: .CodeMirror div.CodeMirror-cursor { michael@0: position: absolute; michael@0: border-right: none; michael@0: width: 0; michael@0: } michael@0: michael@0: div.CodeMirror-cursors { michael@0: visibility: hidden; michael@0: position: relative; michael@0: z-index: 1; michael@0: } michael@0: .CodeMirror-focused div.CodeMirror-cursors { michael@0: visibility: visible; michael@0: } michael@0: michael@0: .CodeMirror-selected { background: #d9d9d9; } michael@0: .CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; } michael@0: michael@0: .cm-searching { michael@0: background: #ffa; michael@0: background: rgba(255, 255, 0, .4); michael@0: } michael@0: michael@0: /* IE7 hack to prevent it from returning funny offsetTops on the spans */ michael@0: .CodeMirror span { *vertical-align: text-bottom; } michael@0: michael@0: /* Used to force a border model for a node */ michael@0: .cm-force-border { padding-right: .1px; } michael@0: michael@0: @media print { michael@0: /* Hide the cursor when printing */ michael@0: .CodeMirror div.CodeMirror-cursors { michael@0: visibility: hidden; michael@0: } michael@0: }