Skip to content

Editing

Mottie edited this page Jan 10, 2015 · 8 revisions

Editing

Open the GitHub-Dark.css & your desired minified syntax highlighting theme (found in the themes folder) files in your favorite editor, then:

  • Start a search in your editor for ]]*/ (it's the end of the userstyles placeholder).

  • When you find /*[[bg-choice]]*/, replace that entire line with

    background-image: url() !important;

then insert the URL of your selected background image (please see Image wiki page for more details).

  • The /*[[bg-options]]*/ and /*[[bg-options2]]*/ can be replaced with the background-size, background-repeat, background-position and background-attachment settings, as desired.
  • When encountering /*[[base-color]]*/ #4183C4, replace that entire selection with the desired base color which is essentially applied to all links and selected panels.
  • Then the /*[[tab-size]]*/ 4 placeholder can get replaced if you want to change the pre code tab size.
  • Lastly, the /*[[syntax-theme]]*/ will require you to remove everything from that placeholder to just before the closing bracket } at the end of the file, then replace it with the style from your selected syntax highlighting theme.

A little bit more detail is provided on the Update wiki page, see steps 2 through 5. The rest of the steps are instructions for the other admins on how to update the style at userstyles.org.

Webkit browser

  • One additional editing step is necessary for webkit browsers.

  • Because webkit does not use @-moz-document, you will need to remove the entire first line of css

    @-moz-document regexp("^https?://((gist|guides|help|status|developer)\.)?github\.com((?!generated_pages\/preview).)*$"), domain("render.githubusercontent.com") {
  • This will leave the comment at the top /*! Github Dark Theme...

  • Then remove the closing bracket } from the end of the file.

  • Now the style is ready to Install or be updated.

-- Customizing

-- Testing

  • Emoji (All GitHub Emoji)

-- Outdated Pages

Clone this wiki locally