browser/devtools/sourceeditor/codemirror/codemirror.css

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

michael@0 1 /* BASICS */
michael@0 2
michael@0 3 .CodeMirror {
michael@0 4 /* Set height, width, borders, and global font properties here */
michael@0 5 font-family: monospace;
michael@0 6 height: 300px;
michael@0 7 }
michael@0 8 .CodeMirror-scroll {
michael@0 9 /* Set scrolling behaviour here */
michael@0 10 overflow: auto;
michael@0 11 }
michael@0 12
michael@0 13 /* PADDING */
michael@0 14
michael@0 15 .CodeMirror-lines {
michael@0 16 padding: 4px 0; /* Vertical padding around content */
michael@0 17 }
michael@0 18 .CodeMirror pre {
michael@0 19 padding: 0 4px; /* Horizontal padding of content */
michael@0 20 }
michael@0 21
michael@0 22 .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
michael@0 23 background-color: white; /* The little square between H and V scrollbars */
michael@0 24 }
michael@0 25
michael@0 26 /* GUTTER */
michael@0 27
michael@0 28 .CodeMirror-gutters {
michael@0 29 border-right: 1px solid #ddd;
michael@0 30 background-color: #f7f7f7;
michael@0 31 white-space: nowrap;
michael@0 32 }
michael@0 33 .CodeMirror-linenumbers {}
michael@0 34 .CodeMirror-linenumber {
michael@0 35 padding: 0 3px 0 5px;
michael@0 36 min-width: 20px;
michael@0 37 text-align: right;
michael@0 38 color: #999;
michael@0 39 -moz-box-sizing: content-box;
michael@0 40 box-sizing: content-box;
michael@0 41 }
michael@0 42
michael@0 43 /* CURSOR */
michael@0 44
michael@0 45 .CodeMirror div.CodeMirror-cursor {
michael@0 46 border-left: 1px solid black;
michael@0 47 }
michael@0 48 /* Shown when moving in bi-directional text */
michael@0 49 .CodeMirror div.CodeMirror-secondarycursor {
michael@0 50 border-left: 1px solid silver;
michael@0 51 }
michael@0 52 .CodeMirror.cm-keymap-fat-cursor div.CodeMirror-cursor {
michael@0 53 width: auto;
michael@0 54 border: 0;
michael@0 55 background: #7e7;
michael@0 56 }
michael@0 57 /* Can style cursor different in overwrite (non-insert) mode */
michael@0 58 div.CodeMirror-overwrite div.CodeMirror-cursor {}
michael@0 59
michael@0 60 .cm-tab { display: inline-block; }
michael@0 61
michael@0 62 .CodeMirror-ruler {
michael@0 63 border-left: 1px solid #ccc;
michael@0 64 position: absolute;
michael@0 65 }
michael@0 66
michael@0 67 /* DEFAULT THEME */
michael@0 68
michael@0 69 .cm-s-default .cm-keyword {color: #708;}
michael@0 70 .cm-s-default .cm-atom {color: #219;}
michael@0 71 .cm-s-default .cm-number {color: #164;}
michael@0 72 .cm-s-default .cm-def {color: #00f;}
michael@0 73 .cm-s-default .cm-variable {color: black;}
michael@0 74 .cm-s-default .cm-variable-2 {color: #05a;}
michael@0 75 .cm-s-default .cm-variable-3 {color: #085;}
michael@0 76 .cm-s-default .cm-property {color: black;}
michael@0 77 .cm-s-default .cm-operator {color: black;}
michael@0 78 .cm-s-default .cm-comment {color: #a50;}
michael@0 79 .cm-s-default .cm-string {color: #a11;}
michael@0 80 .cm-s-default .cm-string-2 {color: #f50;}
michael@0 81 .cm-s-default .cm-meta {color: #555;}
michael@0 82 .cm-s-default .cm-qualifier {color: #555;}
michael@0 83 .cm-s-default .cm-builtin {color: #30a;}
michael@0 84 .cm-s-default .cm-bracket {color: #997;}
michael@0 85 .cm-s-default .cm-tag {color: #170;}
michael@0 86 .cm-s-default .cm-attribute {color: #00c;}
michael@0 87 .cm-s-default .cm-header {color: blue;}
michael@0 88 .cm-s-default .cm-quote {color: #090;}
michael@0 89 .cm-s-default .cm-hr {color: #999;}
michael@0 90 .cm-s-default .cm-link {color: #00c;}
michael@0 91
michael@0 92 .cm-negative {color: #d44;}
michael@0 93 .cm-positive {color: #292;}
michael@0 94 .cm-header, .cm-strong {font-weight: bold;}
michael@0 95 .cm-em {font-style: italic;}
michael@0 96 .cm-link {text-decoration: underline;}
michael@0 97
michael@0 98 .cm-s-default .cm-error {color: #f00;}
michael@0 99 .cm-invalidchar {color: #f00;}
michael@0 100
michael@0 101 div.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;}
michael@0 102 div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
michael@0 103 .CodeMirror-activeline-background {background: #e8f2ff;}
michael@0 104
michael@0 105 /* STOP */
michael@0 106
michael@0 107 /* The rest of this file contains styles related to the mechanics of
michael@0 108 the editor. You probably shouldn't touch them. */
michael@0 109
michael@0 110 .CodeMirror {
michael@0 111 line-height: 1;
michael@0 112 position: relative;
michael@0 113 overflow: hidden;
michael@0 114 background: white;
michael@0 115 color: black;
michael@0 116 }
michael@0 117
michael@0 118 .CodeMirror-scroll {
michael@0 119 /* 30px is the magic margin used to hide the element's real scrollbars */
michael@0 120 /* See overflow: hidden in .CodeMirror */
michael@0 121 margin-bottom: -30px; margin-right: -30px;
michael@0 122 padding-bottom: 30px;
michael@0 123 height: 100%;
michael@0 124 outline: none; /* Prevent dragging from highlighting the element */
michael@0 125 position: relative;
michael@0 126 -moz-box-sizing: content-box;
michael@0 127 box-sizing: content-box;
michael@0 128 }
michael@0 129 .CodeMirror-sizer {
michael@0 130 position: relative;
michael@0 131 border-right: 30px solid transparent;
michael@0 132 -moz-box-sizing: content-box;
michael@0 133 box-sizing: content-box;
michael@0 134 }
michael@0 135
michael@0 136 /* The fake, visible scrollbars. Used to force redraw during scrolling
michael@0 137 before actuall scrolling happens, thus preventing shaking and
michael@0 138 flickering artifacts. */
michael@0 139 .CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
michael@0 140 position: absolute;
michael@0 141 z-index: 6;
michael@0 142 display: none;
michael@0 143 }
michael@0 144 .CodeMirror-vscrollbar {
michael@0 145 right: 0; top: 0;
michael@0 146 overflow-x: hidden;
michael@0 147 overflow-y: scroll;
michael@0 148 }
michael@0 149 .CodeMirror-hscrollbar {
michael@0 150 bottom: 0; left: 0;
michael@0 151 overflow-y: hidden;
michael@0 152 overflow-x: scroll;
michael@0 153 }
michael@0 154 .CodeMirror-scrollbar-filler {
michael@0 155 right: 0; bottom: 0;
michael@0 156 }
michael@0 157 .CodeMirror-gutter-filler {
michael@0 158 left: 0; bottom: 0;
michael@0 159 }
michael@0 160
michael@0 161 .CodeMirror-gutters {
michael@0 162 position: absolute; left: 0; top: 0;
michael@0 163 padding-bottom: 30px;
michael@0 164 z-index: 3;
michael@0 165 }
michael@0 166 .CodeMirror-gutter {
michael@0 167 white-space: normal;
michael@0 168 height: 100%;
michael@0 169 -moz-box-sizing: content-box;
michael@0 170 box-sizing: content-box;
michael@0 171 padding-bottom: 30px;
michael@0 172 margin-bottom: -32px;
michael@0 173 display: inline-block;
michael@0 174 /* Hack to make IE7 behave */
michael@0 175 *zoom:1;
michael@0 176 *display:inline;
michael@0 177 }
michael@0 178 .CodeMirror-gutter-elt {
michael@0 179 position: absolute;
michael@0 180 cursor: default;
michael@0 181 z-index: 4;
michael@0 182 }
michael@0 183
michael@0 184 .CodeMirror-lines {
michael@0 185 cursor: text;
michael@0 186 }
michael@0 187 .CodeMirror pre {
michael@0 188 /* Reset some styles that the rest of the page might have set */
michael@0 189 -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0;
michael@0 190 border-width: 0;
michael@0 191 background: transparent;
michael@0 192 font-family: inherit;
michael@0 193 font-size: inherit;
michael@0 194 margin: 0;
michael@0 195 white-space: pre;
michael@0 196 word-wrap: normal;
michael@0 197 line-height: inherit;
michael@0 198 color: inherit;
michael@0 199 z-index: 2;
michael@0 200 position: relative;
michael@0 201 overflow: visible;
michael@0 202 }
michael@0 203 .CodeMirror-wrap pre {
michael@0 204 word-wrap: break-word;
michael@0 205 white-space: pre-wrap;
michael@0 206 word-break: normal;
michael@0 207 }
michael@0 208
michael@0 209 .CodeMirror-linebackground {
michael@0 210 position: absolute;
michael@0 211 left: 0; right: 0; top: 0; bottom: 0;
michael@0 212 z-index: 0;
michael@0 213 }
michael@0 214
michael@0 215 .CodeMirror-linewidget {
michael@0 216 position: relative;
michael@0 217 z-index: 2;
michael@0 218 overflow: auto;
michael@0 219 }
michael@0 220
michael@0 221 .CodeMirror-widget {}
michael@0 222
michael@0 223 .CodeMirror-wrap .CodeMirror-scroll {
michael@0 224 overflow-x: hidden;
michael@0 225 }
michael@0 226
michael@0 227 .CodeMirror-measure {
michael@0 228 position: absolute;
michael@0 229 width: 100%;
michael@0 230 height: 0;
michael@0 231 overflow: hidden;
michael@0 232 visibility: hidden;
michael@0 233 }
michael@0 234 .CodeMirror-measure pre { position: static; }
michael@0 235
michael@0 236 .CodeMirror div.CodeMirror-cursor {
michael@0 237 position: absolute;
michael@0 238 border-right: none;
michael@0 239 width: 0;
michael@0 240 }
michael@0 241
michael@0 242 div.CodeMirror-cursors {
michael@0 243 visibility: hidden;
michael@0 244 position: relative;
michael@0 245 z-index: 1;
michael@0 246 }
michael@0 247 .CodeMirror-focused div.CodeMirror-cursors {
michael@0 248 visibility: visible;
michael@0 249 }
michael@0 250
michael@0 251 .CodeMirror-selected { background: #d9d9d9; }
michael@0 252 .CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }
michael@0 253
michael@0 254 .cm-searching {
michael@0 255 background: #ffa;
michael@0 256 background: rgba(255, 255, 0, .4);
michael@0 257 }
michael@0 258
michael@0 259 /* IE7 hack to prevent it from returning funny offsetTops on the spans */
michael@0 260 .CodeMirror span { *vertical-align: text-bottom; }
michael@0 261
michael@0 262 /* Used to force a border model for a node */
michael@0 263 .cm-force-border { padding-right: .1px; }
michael@0 264
michael@0 265 @media print {
michael@0 266 /* Hide the cursor when printing */
michael@0 267 .CodeMirror div.CodeMirror-cursors {
michael@0 268 visibility: hidden;
michael@0 269 }
michael@0 270 }

mercurial