From 38b286f9896b6371c378a175e3fd5bc7fff8bcb3 Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Mon, 21 Jul 2014 13:50:58 -0700 Subject: [PATCH] Remove 'editor-colors' class from lines and gutter for mini editors Having the editor-colors class on these elements was causing the theme to be applied to lines in mini editors in the settings view, which caused a black inset box to appear with dark syntax themes. This was added to give the lines an opaque background which was supposed to enable sub pixel anti-aliasing despite being on the GPU, but it didn't seem to be working. Perhaps we can revisit this issue after the Chrome 35 upgrade to see if sub pixel antialiasing works with opaque backgrounds afterward. --- src/gutter-component.coffee | 4 +--- src/lines-component.coffee | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/gutter-component.coffee b/src/gutter-component.coffee index 9dc6fb3e7..826723575 100644 --- a/src/gutter-component.coffee +++ b/src/gutter-component.coffee @@ -19,9 +19,7 @@ GutterComponent = React.createClass {scrollHeight, scrollViewHeight, onMouseDown} = @props div className: 'gutter', onClick: @onClick, onMouseDown: onMouseDown, - # The line-numbers div must have the 'editor-colors' class so it has an - # opaque background to avoid sub-pixel anti-aliasing problems on the GPU - div className: 'gutter line-numbers editor-colors', ref: 'lineNumbers', style: + div className: 'gutter line-numbers', ref: 'lineNumbers', style: height: Math.max(scrollHeight, scrollViewHeight) WebkitTransform: @getTransform() diff --git a/src/lines-component.coffee b/src/lines-component.coffee index 9704aaf35..d1b1aba94 100644 --- a/src/lines-component.coffee +++ b/src/lines-component.coffee @@ -26,9 +26,7 @@ LinesComponent = React.createClass width: scrollWidth WebkitTransform: @getTransform() - # The lines div must have the 'editor-colors' class so it has an opaque - # background to avoid sub-pixel anti-aliasing problems on the GPU - div {className: 'lines editor-colors', style}, + div {className: 'lines', style}, div className: 'placeholder-text', placeholderText if placeholderText? HighlightsComponent({editor, highlightDecorations, lineHeightInPixels, defaultCharWidth, scopedCharacterWidthsChangeCount, performedInitialMeasurement})