Markwon/docs/docs/theme.md
2019-03-02 14:41:01 +03:00

6.1 KiB

Theme

Here is the list of properties that can be configured via SpannableTheme. If you wish to control what is out of this list, you can use SpannableFactory abstraction which lets you to gather full control of Spans that are used to display markdown.

  • SpannableTheme#create(Context) - creates a default instance of `SpannableBuilder (with defaults registered)
  • SpannableTheme#builder - creates empty builder with no defaults registered
  • SpannableTheme#builderWithDefaults(Context) - create a default instance of builder (with default values registered)

:::warning SpannbleTheme#builder method has an unfortunate naming. It should've been emptyBuilder or builderNoDefaults because #builder method returns a builder with no default theme values registered. To create a builder with default values registered use SpannableBuilder#builderWithDefaults(Context) :::

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

Code text size

Text size of 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

Script ratio

Ratio to be applied for sup (super script) & sub (sub script)

Thematic break

Color

Color of a thematic break

Height

Height of a thematic break

Table

Cell padding

Padding inside a table cell

Border color

The color of table borders

Border width

The width of table borders

Odd row background

Background of an odd table row

Even row background

Background of an even table row

Header row background

Background of header table row

Task list drawable

Drawable of task list item