I’m a big fan of Looker, but I’m not a fan of code editors with a white background. I’m sure I’m not the only one 😄 And the default font size is a bit small on my 4K monitor. Unfortunately, Looker does not have any feature yet to customize the IDE. But hey, good news, this is a web app. We can easily override CSS!
As I didn’t find anyone sharing this previously, I thought I would. The customized styles are based on the popular Solarized Dark color scheme with a bit of customization. I also set Inconsolata as the default font (my favorite development font), and increased the font size to 18px.
Note: This was done quickly, it’s not perfect… Feel free to refine, and post your thoughts/improvements here.
1- If you don’t have one already, install a browser extension that allows you to override styles (such as Stylebot for Chrome).
2- Add a rule for your Looker instance URL, copy the styles found on the Github repo, and customize to your liking!
POST EDIT 05/24/18: Updated stylesheet to reflect changes discussed below.
POST EDIT 04/04/19: Updated post to link to Github repo.
Thank you for sharing
@mguindon! You’re definitely not the only one with this preference, a few of our engineers threw together some CSS themes like this as a “hackday” project.
Doesn’t look like there are any committed timelines to releasing this type of thing in product (documenting this and passing it to the product team though), so I’m glad you found a workaround that does it for you!
FYI I worked with a customer to get line visualizations to read well on office monitors and stylebot was the path of least resistance to get a dark background and increase the font/line weight in case anyone else comes across this and is curious about other CSS browser extension use cases.
I’ll say though that I had some issues with the text cursor spacing (with each letter, the cursor would move further from the text while typing, although the text would appear in the right spot).
I’m not super familiar with CSS, but it appears the font-family was the source of the issue for me and I had to comment it out in order for it to work.
Glad you like it! As for your issue I assume it’s because you didn’t have Inconsolata or Menlo installed on your system, so the browser reverted to a weird font. You can download the font on Google’s Github here if you’d like:
Removing the font-family class, as you’ve done, allows Looker’s default font to be applied. Or you can modify it to use whatever fixed-width font you prefer for coding.
Generally speaking, yes the styles are not perfect yet… I’ve encountered a few issues myself but I hope to resolve them in the coming weeks. Stay tuned. 🙂
Also, shared with our BI team here and everyone’s swapped over and trying out new aesthetics!
Thanks again for sharing! Based on our team’s reception I think this is definitely something valuable that Looker should invest some time in standardizing for the platform.
I must admit I did not test the SQL Runner very much. It seems to use a different style class for some of the formatting. I’ll need to dig deeper.
Adding the following style will fix the parentheses in the SQL Runner:
That did the trick! Thank you for looking into that
I did not, but I do now 😄
This is pretty amazing — thanks for sharing!
Small thing, but I can’t for the life of me figure out how to change the background of the text line I’m currently editing. Any ideas?
Glad you like it!
The selector for the line currently being edited is the following:
Notice that in this example, an opacity is being set (0.1).
Thanks for the reply!
Oddly, I’ve switched the the css for that block now to
#232323and I’m still getting the same light-colored background on my cursor line 🤔Is anyone else having this problem?
Full Stylus CSS pasted below:
I tried your CSS and I don’t have that issue (Chrome 73 + Stylebot 2.2). Which browser / extension are you using?
That said, changing this CSS selector to black, on a black background breaks the highlight of selected text so it’s probably not a good idea.
Thanks for the quick reply
I’ve been using Chrome 73 with Stylus 1.5.3, but after seeing your post I installed Stylebot to try it out using that extension, and everything looks good now! I guess it was something weird with Stylus 🤔
At any rate, thanks again for your help!
This is great, but there’s one thing driving me crazy…what controls the color of the vertical indentation lines?
Are you using the latest version of the code that I published on Github? I added the following class which fixes the indent line that was way too bright, which basically just reduces its opacity:
Oh, thanks – no, I was using the updated code snippet from your original post.
I edited the original post for clarity 🙂
!importanteverywhere, at least in FireFox.
I’m hevig some issus with my cursor, it is showing in od placeses.
did any one had the same isue?
I haven’t experienced that. Which browser are you using, and on which platform?
And did you modify the CSS or are you using it as-is?
i’m Using google chrome , css 2.2. and runnig the code as is.