Skip to content

Latest commit

 

History

History

themes

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Themes

PlantUML supports defining themes which can be used to control color, font, and other values consistently. This folder is intended to contain CarGurus specific PlantUML theme files.

Warning

Themes can be useful for low-level, fine grained control but style files fulfill most use cases that themes offer and are simpler to author and understand. We recommend using style files where possible and only using themes if style files cannot suffice.

Using theme files

To use a theme file, within your plantUML diagram you should use a !theme directive, specify the exact name of the theme, the keyword from, and specify the raw location of the themes folder in this repo. For more details see the PlantUML docs on using Themes from the Internet.

Example

!theme CarGurus-C4-default from https://raw.githubusercontent.com/cargurus/plantuml-common/main/themes

Creating theme files

For how to author theme files, review the C4-PlantUML Themes README file. Note that themes offer low-level, fine grained control but because of that are more complex to understand and get working. Style files fulfill most purposes that themes do and are simpler to author because you can use higher level macros to express your choices. We recommend you use style files if at all possible.

Naming theme files

CarGurus theme files should be named puml-theme-CarGurus-[your-exact-theme-name].puml. Additionally, the theme name within the file must exactly match the CarGurus-[your-exact-theme-name] portion of the file name. So the first line of your theme file should be:

!$THEME = "CarGurus-[your-exact-theme-name]"