Markwon/docs/docs/v3/core/theme.md
2019-08-06 19:27:20 +03:00

5.0 KiB

Theme

Here is the list of properties that can be configured via MarkwonTheme.Builder class.

:::tip Starting with there is no need to manually construct a MarkwonTheme. Instead a Plugin should be used:

final Markwon markwon = Markwon.builder(context)
        .usePlugin(new AbstractMarkwonPlugin() {
            @Override
            public void configureTheme(@NonNull MarkwonTheme.Builder builder) {
                builder
                        .codeTextColor(Color.BLACK)
                        .codeBackgroundColor(Color.GREEN);
            }
        })
        .build();

:::

Controls the color of a link

* TextPaint#linkColor will be used to determine linkColor of a context

Block margin

Starting margin before text content for the:

  • lists
  • blockquotes
  • task lists

Block quote

Customizations for the blockquote stripe

Quote

Stripe width

Width of a blockquote stripe

Stripe color

Color of a blockquote stripe

List

List item color

Controls the color of a list item. For ordered list: leading number, for unordered list: bullet.

  • UL
  1. OL

Bullet item stroke width

Border width of a bullet list item (level 2)

  • First
    • Second
      • Third

Bullet width

The width of the bullet item

  • First
    • Second
      • Third

Code

Inline code text color

The color of the code content

Inline code background color

The color of background of a code content

Block code text color

The color of code block text

Block code background color

The color of background of code block text

Block code leading margin

Leading margin for the block code content

Code typeface

Typeface of code content

Block code typeface

Typeface of block code content

Code text size

Text size of code content

Block code text size

Text size of block code content

Heading

Break height

The height of a brake under H1 & H2

Break color

The color of a brake under H1 & H2

Typeface

The typeface of heading elements

Text size

Array of heading text sizes ratio that is applied to text size

Thematic break

Color

Color of a thematic break

Height

Height of a thematic break