summaryrefslogtreecommitdiff
path: root/vendor/bundle/ruby/3.4.0/gems/rouge-4.5.2/lib/rouge/themes/bw.rb
blob: 779359a1a3271fd5b7318ed2f7d933e9dd99ba10 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# -*- coding: utf-8 -*- #
# frozen_string_literal: true

module Rouge
  module Themes
    # A port of the bw style from Pygments.
    # See https://bitbucket.org/birkenfeld/pygments-main/src/default/pygments/styles/bw.py
    class BlackWhiteTheme < CSSTheme
      name 'bw'

      style Text,                        :fg => '#000000', :bg => '#ffffff'

      style Comment,                     :italic => true
      style Comment::Preproc,            :italic => false

      style Keyword,                     :bold => true
      style Keyword::Pseudo,             :bold => false
      style Keyword::Type,               :bold => false

      style Operator,                    :bold => true

      style Name::Class,                 :bold => true
      style Name::Namespace,             :bold => true
      style Name::Exception,             :bold => true
      style Name::Entity,                :bold => true
      style Name::Tag,                   :bold => true

      style Literal::String,             :italic => true
      style Literal::String::Affix,      :bold => true
      style Literal::String::Interpol,   :bold => true
      style Literal::String::Escape,     :bold => true

      style Generic::Heading,            :bold => true
      style Generic::Subheading,         :bold => true
      style Generic::Emph,               :italic => true
      style Generic::EmphStrong,         :italic => true, :bold => true
      style Generic::Strong,             :bold => true
      style Generic::Prompt,             :bold => true

      style Error,                       :fg => '#FF0000'
    end
  end
end