Skip to content
Mottie edited this page Sep 19, 2014 · 18 revisions

Build a Custom Theme

Getting Started

  • Download or fork or clone this repository locally
  • Run npm install within the directory (you'll need to have node.js installed)
  • Add build options:
    • Open up your editor, then copy and paste the following code into it:

      {
        "theme"  : "GitHub-Dark",
        "color"  : "#008080",
        "image"  : "url(https://raw.githubusercontent.com/StylishThemes/GitHub-Dark/master/images/backgrounds/bg-tile1.png)",
        "tiled"  : true,
        "attach" : "scroll",
        "tab"    : 4,
        "chrome" : false
      }
    • Save that file into the GitHub-Dark root directory as build.json.

    • These options allow you to customize the github dark build.

  • Now run grunt to build your custom file.
  • The file will be named as follows github-dark-{theme}-{color}.build.css.
  • Open the newly created file and copy & paste the contents into your browser's Stylish editor.

Build Options

theme

  • Add an available syntax highlighting theme.
  • A full list can be found here.
  • The name is case insensitive & any spaces in the name will be replaced with a dash (-).

color

  • Add your desired base color
  • This value can any value css color (hex, rgb, or hsl)
  • Any non-alphanumeric characters will be replaced when added to the build file name

image

  • Add any image url, base64 encoding that must be wrapped within a url()
  • Please refer to the Image wiki page for specifics on getting around the Content Security Policy.
  • Set this to none for no image

tiled

  • When true, the background image is set to repeat repeat auto left top
  • When false, the background image is centered & resized no-repeat cover center top

attach

  • When set to "scroll" the background image is set to scroll with the page.
  • When not set to scroll, the background image will be fixed.

tab

  • This value sets the code size tabs.

chrome

  • When false, the resulting css file will include the outer @-moz-document ... { ... } wrapper for Firefox.
  • When true, the resulting css file will not include the outer wrapper to make it easier to copy & paste the style into the chrome Stylish editor.

-- Customizing

-- Testing

  • Emoji (All GitHub Emoji)

-- Outdated Pages

Clone this wiki locally