提交 64bd1b64 编写于 作者: A Alex Dima

Clean up editor css around current line highlight

上级 3027f1a4
......@@ -2,9 +2,23 @@
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
.monaco-editor .current-line {
display: block;
position: absolute;
left: 0;
top: 0;
}
\ No newline at end of file
box-sizing: border-box;
}
.monaco-editor.vs.focused .current-line {
border: 2px solid #EEE;
}
.monaco-editor.vs-dark.focused .current-line {
border: 2px solid #282828;
}
.monaco-editor.hc-black.focused .current-line {
border: 2px solid #f38518;
}
......@@ -25,13 +25,6 @@
color: white; /* opposite of black */
}
/* Current line */
.monaco-editor .current-line {
background: #eaeaf2;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
/* Line Numbers */
.monaco-editor .line-numbers {
color: #2B91AF;
......
......@@ -42,12 +42,6 @@
top: 0;
}
.monaco-editor .view-overlays > .static {
position: absolute;
top: 0;
}
/* ---------- Lines Content ---------- */
.monaco-editor .inputarea {
......@@ -89,15 +83,6 @@
background: rgba(255, 255, 255, 0.85);
}
.monaco-editor .accessibility-output {
position: absolute;
top: 0;
left: 0;
width: 0;
height: 0;
overflow: hidden;
}
.monaco-editor .lines-content {
position: absolute;
top: 0;
......@@ -140,7 +125,7 @@
width: 100%;
}
.margin-view-overlays > .view-line {
.monaco-editor .margin-view-overlays > .view-line {
width: 100%;
}
......@@ -160,10 +145,6 @@
background: url("green-squiggly.svg") repeat-x bottom left;
}
.monaco-editor .linked-editing {
box-shadow: inset 0 0 0 1px #B9B9B9;
}
/* ----------- bracket Match ------ */
......@@ -185,34 +166,6 @@
color: inherit;
}
/* ----------- BEGIN VS THEME ----------- */
/* Current line */
.monaco-editor.vs .current-line {
background: none;
border: 2px solid #EEE;
box-sizing: border-box;
}
.monaco-editor.vs.focus .current-line {
border-color: #EAEAF2;
}
/* ----------- END VS THEME ----------- */
/* ----------- BEGIN VS-DARK THEME ----------- */
/* The editor */
.monaco-editor.vs-dark,
......@@ -249,13 +202,6 @@
color: #51504f; /* opposite of #AEAFAD */
}
/* Current line */
.monaco-editor.vs-dark .current-line {
background: none;
border: 2px solid #282828;
box-sizing: border-box;
}
/* Highlight a line */
.monaco-editor.vs-dark .lineHighlight {
background-color: rgba(243, 240, 245, 0.2);
......@@ -333,9 +279,6 @@
@-ms-keyframes monaco-editor-dark-word-highlight-strong { from { background-color: inherit; } to { background-color: rgba(0, 73, 114, 0.72); } }
@keyframes monaco-editor-dark-word-highlight-strong { from { background-color: inherit; } to { background-color: rgba(0, 73, 114, 0.72); } }
/* Linked Editing */
.monaco-editor.vs-dark .linked-editing { box-shadow: inset 0 0 0 1px #555; }
/* Snippets */
.monaco-editor.vs-dark .new-snippet { background-color: rgba(100, 105, 110, 0.1); }
.monaco-editor.vs-dark .snippet-placeholder { background-color: rgba(124, 124, 124, 0.1); }
......@@ -390,18 +333,6 @@
color: #000; /* opposite of #fff */
}
/* Current line */
.monaco-editor.hc-black .current-line {
background: none;
border: none;
box-sizing: border-box;
}
.monaco-editor.hc-black.focused .current-line {
background: none;
border: 2px solid #f38518;
box-sizing: border-box;
}
/* Highlight a line */
.monaco-editor.hc-black .lineHighlight {
background-color: rgba(243, 240, 245, 0.2);
......@@ -458,10 +389,6 @@
opacity: 0.8;
}
.monaco-editor.hc-black .linked-editing {
box-shadow: inset 0 0 0 1px #B9B9B9;
}
/* Glyph Margin */
.monaco-editor.hc-black .glyph-margin {
background: #000;
......@@ -501,9 +428,6 @@
box-shadow: none;
}
/* Linked Editing */
.monaco-editor.hc-black .linked-editing { box-shadow: inset 0 0 0 1px #fff; }
/* Snippets */
.monaco-editor.hc-black .new-snippet { background-color: rgba(100, 105, 110, 0.1); }
.monaco-editor.hc-black .snippet-placeholder { background-color: rgba(124, 124, 124, 0.1); }
......
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
/* No highlight for current line when editor is inactive */
.monaco-workbench > .editor > .content .inactive .monaco-editor .current-line {
border-width: 0;
}
\ No newline at end of file
......@@ -5,7 +5,6 @@
'use strict';
import 'vs/css!./media/texteditor';
import {TPromise} from 'vs/base/common/winjs.base';
import {Dimension, Builder} from 'vs/base/browser/builder';
import objects = require('vs/base/common/objects');
......
......@@ -338,7 +338,7 @@ function _processThemeObject(themeId: string, themeDocument: ThemeDocument): str
}
if (editorSettings.lineHighlight) {
let lineHighlight = new Color(editorSettings.lineHighlight);
cssRules.push(`.monaco-editor.${themeSelector} .current-line { background-color: ${lineHighlight}; border:0; }`);
cssRules.push(`.monaco-editor.${themeSelector}.focused .current-line { background-color: ${lineHighlight}; border:0; }`);
}
if (editorSettings.caret) {
let caret = new Color(editorSettings.caret);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册