Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Atom editor scrollbar size/color

Tags:

atom-editor

I'm using Atom to develop in php but for me, but I have an issue with the editor, I use One Dark theme but I try to change the color and the size of right scrollbar of the opened file because is small and hard to see for me

I try this info Change atom-text-editor pane scrollbar colours

But I don't see any changes.

Any ideas? Thanks

like image 237
Ruben Avatar asked Jan 28 '16 12:01

Ruben


People also ask

How do I change the size of my scrollbar?

Double-click/tap on ScrollHeight. The Edit String window will open with the default value of -255. That is the standard size of the scrollbars you see on Windows. To change the Scrollbars height to your liking, enter a value between -120 (smaller) to -1500 (larger) for the size you want, and click/tap on OK.

How do you scroll in an atom?

The keyboard shortcut Ctrl-Alt-S also toggles scroll-sync on/off. Scroll either editor pane and the other editor pane will scroll to match. When sections of the files don't match, the editor pane you are directly controlling will scroll through the entire file as normal.


2 Answers

UPDATE: The below answer applies to Atom < 1.13. Starting with Atom 1.13 the shadow dom was abondoned and the example should work as the original poster had put it (that is without the ::shadow selector.

For Atom up to version 1.12: Atom uses shadow DOM for the editor, that might be the reason it does not work for you. To style the scrollbar for both the editor and the tree view try this:

.tree-view-resizer, atom-text-editor::shadow  {
  ::-webkit-scrollbar {
    background-color: #262626;

    &-track {}

    &-thumb {
      background-color: #404040;

      &:window-inactive {
        background-color: rgb(116, 115, 105);
      }
    }

    &-corner {
      background-color: #262626;
    }
  }
}
like image 67
phw Avatar answered Sep 29 '22 16:09

phw


  1. Select "File" -> "Stylesheet...".
  2. Add code to below and save.
.scrollbars-visible-always {
  ::-webkit-scrollbar {
    width: 35px;
    height: 12px;
  }
}

 // has to be bigger than webkit-scrollbar
.vertical-scrollbar {
  width: 35px !important;
}

// has to be bigger than webkit-scrollbar
.horizontal-scrollbar {
  height: 30px !important;
}
like image 44
Khai Vu Avatar answered Sep 29 '22 17:09

Khai Vu