From 01c4fe53403978f077d7b43bff8fb2cfec65fd17 Mon Sep 17 00:00:00 2001 From: Ben Ogle Date: Tue, 29 Jul 2014 14:32:46 -0700 Subject: [PATCH] Merge the react and non-react editor styles --- static/editor.less | 84 ++++++++++++++-------------------------------- 1 file changed, 25 insertions(+), 59 deletions(-) diff --git a/static/editor.less b/static/editor.less index 1bd877f1a..e3d4d9743 100644 --- a/static/editor.less +++ b/static/editor.less @@ -2,7 +2,18 @@ @import "octicon-utf-codes"; @import "octicon-mixins"; -.editor.react { +.editor, .editor-contents { + overflow: hidden; + cursor: text; + display: -webkit-flex; + -webkit-user-select: none; + position: relative; +} + +.editor { + font-family: Inconsolata, Monaco, Consolas, 'Courier New', Courier; + line-height: 1.3; + .editor-contents { width: 100%; } @@ -71,9 +82,19 @@ } .gutter { + overflow: hidden; + text-align: right; + cursor: default; + min-width: 1em; + box-sizing: border-box; + + .line-numbers { + position: relative; + } .line-number { white-space: nowrap; padding-left: .5em; + opacity: 0.6; .icon-right { padding: 0 .4em; @@ -82,6 +103,9 @@ } } } + .line-number.cursor-line { + opacity: 1; + } } } @@ -96,45 +120,6 @@ } } -.editor { - z-index: 0; - font-family: Inconsolata, Monaco, Consolas, 'Courier New', Courier; - line-height: 1.3; -} - -.editor, .editor-contents { - overflow: hidden; - cursor: text; - display: -webkit-flex; - -webkit-user-select: none; - position: relative; -} - -.editor .gutter .line-number.cursor-line { - opacity: 1; -} - -.editor .gutter { - overflow: hidden; - text-align: right; - cursor: default; - min-width: 1em; - box-sizing: border-box; -} - -.editor .gutter .line-number { - padding-left: .5em; - opacity: 0.6; -} - -.editor .gutter .line-numbers { - position: relative; -} - -.editor .gutter .line-number.folded.cursor-line { - opacity: 1; -} - .editor .gutter .line-number .icon-right { .octicon(chevron-down, 0.8em); display: inline-block; @@ -289,22 +274,3 @@ pointer-events: none; z-index: -1; } - -.editor.mini:not(.react) { - height: auto; - line-height: 25px; - - .cursor { - width: 2px; - line-height: 20px; - margin-top: 2px; - } - - .gutter { - display: none; - } - - .scroll-view { - overflow: hidden; - } -}