Search code examples
colorsgitpitch

Gitpitch creating custom colors


I am starting and creating a gitpitch presentation and it works great. I want to create a custom color so that I can use it in the presentation but it does not work.

In the custom.css file, which I now is added correctly since other stuff in there are being displayed I add...

.myblue {
    color: #65656c;
}

Then in PITCHME.md I add...

@snap[west]
Create container<br>
@color[#65656c](singularity build)<br>
@color[myblue](Install software)<br>
@snapend

in this example "singularity build" gets the right color, but "install software" does not.

Does anyone have a suggestion?


Solution

  • When you declare a custom style, such as myblue, you can make use of that style by referencing the class as follows:

    @snap[west]
    Create container<br>
    @color[#65656c](singularity build)<br>
    @css[myblue](Install software)<br>
    @snapend
    

    Note how I used the @css shortcut syntax to activate the myblue class on the Install software text. You can learn about all of the available GitPitch markdown shortcuts in the docs here. And you find specific examples using the @css shortcut syntax right here.