The Pygments online demo at http://pygments.org/demo/ serves a CSS file that contains rules for the
friendly style with selector prefix
pre, as well as the selected style with selector prefix
If the selected style does not contain some style rule (e.g. Monokai does not define a color for Generic prompt (class
.gp)), the rule from
friendly is used instead.
- Enter the following code in the online demo:
$ echo "hello"
- Set language to Bash session
- When viewing the highlighted code, select the monokai style
- The prompt
$is colored because it matches
.pre .gpdefined by the
$ is not colored because the requested style it did not define a color.