Uploaded image for project: 'Compass '
  1. Compass
  2. COMPASS-6910

compass-shell selection color invisible

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 1.38.0
    • Affects Version/s: None
    • Component/s: Editor
    • None
    • Environment:
      OS:
      node.js / npm versions:
      Additional info:
    • 1
    • Iteration Dreadnoughtus
    • Not Needed

      In the compass-shell component, text selection color has not enough contrast compared to the background color when the editor is in focus, not sure whether this is intentional or a bug.

      The text selection color is: #233 while the background color is: #112733 (gray.dark4)

      I have tried to look where the selection color is defined but couldn't find within the compass repo (maybe in codemirror?).

      Anyway, it seems that in compass-editor/json-editor.tsx there is a definition for the selection color, which provides a good contrast, but that is only active when the shell is not in focus, a possible fix would be to add this rule in getStylesForTheme:

      '&.cm-focused .cm-selectionBackground': {
          background: editorPalette[theme].selectionBackgroundColor
      }, 

       

      Thanks.

       

            Assignee:
            rhys.howell@mongodb.com Rhys Howell
            Reporter:
            yuval@cupixel.com Yuval Weizman
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: