Skip to content

Editing

the-j0k3r edited this page Jun 20, 2019 · 8 revisions

Follow these steps if you don't plan on using the Build instructions to have grunt perform all the following edits automatically for you.

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]]*/ can be replaced with the background-size, background-repeat and background-position settings, as desired.
  • Replace the /*[[bg-attachment]]*/ fixed with the desired background attachment setting, either "fixed" or "scroll".
  • When encountering /*[[base-color]]*/ #4f8cc9, 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