Pro Code Power Properties


Activate a GitPitch Paid Plan to unlock Pro Code Revealing.

The Pro Code Power Properties feature gives you fine-grained control over how code is rendered on your slides.



Code-NoBlend Property

The Theme Template introduces an automatic convention that is activated for all slides displaying code. When a slide displays code, the slide background color automatically adopts the same background color used by the code block. Here are some sample code slides rendered using this convention:

CODE BLOCKS BLENDED

The code-noblend property can be activated on any fenced code block, source code delimiter, code or GIST widget to disable this theme template convention for individual code slides within your deck.

For example, the code-noblend property can be activated on the @code widget as follows:


@code[golang zoom-21 code-noblend](src/go/sample.go)

Note, given the code-noblend property is provided to disabled a convention of the theme template only, if the theme template is not activated in the PITCHME.yaml for your slide deck, then the code-noblend property has no effect.


Code-Blend Property

The Theme Template introduces an automatic convention that is activated for all slides displaying code. When a slide displays code, the slide background color automatically adopts the same background color used by the code block.

But for slide decks using one of the deprecated themes this automatic convention is not activated. But this convention can be manually activated using the code-blend property on any fenced code block, source code delimiter, code or GIST widget.

Activating this property can result in more visually attractive code slides. For example, the following screenshots shows what a slide might look like with this property first disabled, then enabled:

CODE-BLEND-PROPERTY

CODE-BLEND-PROPERTY



Code-Max Property

The size of the padding and margins surrounding any code-block rendered on a GitPitch slide is determined by the default style-rules defined by the fixed theme in use by the presentation.

The code-max property can be activated on any fenced code block, source code delimiter, code or GIST widget to minimize padding and margins around any code-block. Activating this property helps your code to enjoy the maximum amount of space on your slides which can result in more visually attractive code slides.

For example, the code-max property is activated on the @code widget as follows:


@code[golang zoom-21 code-blend code-max](src/go/sample.go)

The code-max property is activated on the @gist widget as follows:


@gist[groovy zoom-13 code-blend code-max](onetapbeyond/8da53731fd54bab9d5c6)

The code-max property can be used in conjunction with the Code ZOOM properties plus any of the other Power Properties described in this guide.



Code-NoScroll Property

Sometimes the code that you want to present will extend horizontally or vertically beyond the extent of the available space for the code-block on your slide. In such cases, the default behavior is for the code-block to permit horizontal and/or vertical scrolling. And in many cases, this is the desired behavior.

The code-noscroll property can be activated on any fenced code block, source code delimiter, code or GIST widget to prevent horizontal and vertical scrolling. This feature is particularly useful when code presenting as it prevents the temporary flash of scrollbars appearing on your slide as you walk step-by-step through your code.

For example, the code-noscroll property is activated on the @code widget as follows:


@code[golang zoom-21 code-blend code-noscroll](src/go/sample.go)

The code-noscroll property is activated on the @gist widget as follows:


@gist[groovy zoom-13 code-blend code-noscroll](onetapbeyond/8da53731fd54bab9d5c6)

The code-noscroll property can be used in conjunction with the Code ZOOM properties plus any of the other Power Properties described in this guide.



Code-Wrap Property

By default, lines of code do not wrap on GitPitch slides. As described in the Code-NoScroll section this means that sometimes lines of code can be truncated or require scrolling.

The code-wrap property can be activated on any fenced code block, source code delimiter, code or GIST widget to auto-wrap lines of code on your slides. This can be particularly useful when code presenting as it ensures any code you chose to focus on as you step through your code will be fit on the slide.

For example, the code-wrap property is activated on the @code widget as follows:


@code[golang zoom-21 code-blend code-wrap](src/go/sample.go)

The code-wrap property is activated on the @gist widget as follows:


@gist[groovy zoom-13 code-blend code-wrap](onetapbeyond/8da53731fd54bab9d5c6)

The code-wrap property can be used in conjunction with the Code ZOOM properties plus any of the other Power Properties described in this guide.

The following screenshots show the rendering of this sample slide, first with the default rendering, and then with the code-wrap property enabled:

CODE-WRAP-PROPERTY



Code-Power Property

In situations where you might want to activate the full set of Power Properties for a given code slide, you can use the code-power property.

Instead of activating each individual property like this:


@code[golang code-blend code-max code-noscroll code-wrap](src/go/sample.go)

You can simply activate the code-power property and achieve the exact same result:


@code[golang code-power](src/go/sample.go)

The code-power property can be activated on any fenced code block, source code delimiter, code or GIST widget.