From 35500510aa88ec5b128017e70bdc1a41dd943472 Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Sat, 7 Dec 2019 06:08:16 +0100 Subject: [PATCH] Documented more style elements --- styles/README.md | 167 +++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 161 insertions(+), 6 deletions(-) diff --git a/styles/README.md b/styles/README.md index 9046488..f3dc966 100644 --- a/styles/README.md +++ b/styles/README.md @@ -28,6 +28,82 @@ The `document` element defines the markdown's body. } ``` +### paragraph + +The `paragraph` element defines a paragraph in the document. + +#### Attributes + +| Attribute | Value | Description | +| ---------------- | ------ | --------------------------------------------------- | +| prefix | string | Printed before the first element in a paragraph | +| suffix | string | Printed after the last element in a paragraph | +| indent | number | Specifies the indentation of paragraphs | +| margin | number | Specifies the margin around paragraphs | +| color | color | Defines the default text color for paragraphs | +| background_color | color | Defines the default background color for paragraphs | + +#### Example + +``` +"paragraph": { + "margin": 4, + "color": "15", + "background_color": "235" +} +``` + +### heading + +The `heading` element defines a heading. + +### h1 - h6 + +The `h1` to `h6` elements define headings. `h1` defines the most important +heading, `h6` the least important heading. Undefined attributes are inherited +from the `heading` element. + +#### Attributes + +| Attribute | Value | Description | +| ---------------- | ------ | ------------------------------------------------- | +| prefix | string | Printed before a heading | +| suffix | string | Printed after a heading | +| indent | number | Specifies the indentation of headings | +| margin | number | Specifies the margin around headings | +| color | color | Defines the default text color for headings | +| background_color | color | Defines the default background color for headings | +| bold | bool | Increases text intensity | +| faint | bool | Decreases text intensity | +| italic | bool | Prints the text in italic | +| crossed_out | bool | Enables strikethrough as text decoration | +| underline | bool | Enables underline as text decoration | +| overlined | bool | Enables overline as text decoration | +| blink | bool | Enables blinking text | +| conceal | bool | Conceals / hides the text | +| inverse | bool | Swaps fore- & background colors | + +#### Example + +``` +"heading": { + "prefix": "\n", + "margin": 4, + "color": "15", + "background_color": "57" +}, +"h1": { + "prefix": "\n=> ", + "suffix": " <=", + "margin": 2, + "bold": true, + "background_color": "69" +}, +"h2": { + "prefix": "\n# " +} +``` + ### text The `text` element defines a block of text. @@ -36,8 +112,8 @@ The `text` element defines a block of text. | Attribute | Value | Description | | ---------------- | ------ | ----------------------------------------------------- | -| prefix | string | Printed before the text gets printed | -| suffix | string | Printed after the text got printed | +| prefix | string | Printed before a text gets printed | +| suffix | string | Printed after a text got printed | | color | color | Defines the default text color for the document | | background_color | color | Defines the default background color for the document | | bold | bool | Increases text intensity | @@ -60,13 +136,92 @@ The `text` element defines a block of text. } ``` -### block_quote ### list + +The `list` element defines a list in the document. + +#### Attributes + +| Attribute | Value | Description | +| ---------------- | ------ | ---------------------------------------------- | +| prefix | string | Printed before a list | +| suffix | string | Printed after a list | +| indent | number | Specifies the indentation of lists | +| margin | number | Specifies the margin around lists | +| color | color | Defines the default text color for lists | +| background_color | color | Defines the default background color for lists | + +#### Example + +``` +"list": { + "margin": 4, + "color": "15", + "background_color": "52" +} +``` + ### item + +The `item` element defines an item in lists. + +#### Attributes + +| Attribute | Value | Description | +| ---------------- | ------ | ---------------------------------------------- | +| prefix | string | Printed before an item | +| suffix | string | Printed after an item | +| color | color | Defines the default text color for items | +| background_color | color | Defines the default background color for items | +| bold | bool | Increases text intensity | +| faint | bool | Decreases text intensity | +| italic | bool | Prints the text in italic | +| crossed_out | bool | Enables strikethrough as text decoration | +| underline | bool | Enables underline as text decoration | +| overlined | bool | Enables overline as text decoration | +| blink | bool | Enables blinking text | +| conceal | bool | Conceals / hides the text | +| inverse | bool | Swaps fore- & background colors | + +#### Example + +``` +"item": { + "prefix": "• " +} +``` + ### enumeration -### paragraph -### heading -### h1 - h6 + +The `enumeration` element defines an item in ordered lists. + +#### Attributes + +| Attribute | Value | Description | +| ---------------- | ------ | ---------------------------------------------- | +| prefix | string | Printed before an item | +| suffix | string | Printed after an item | +| color | color | Defines the default text color for items | +| background_color | color | Defines the default background color for items | +| bold | bool | Increases text intensity | +| faint | bool | Decreases text intensity | +| italic | bool | Prints the text in italic | +| crossed_out | bool | Enables strikethrough as text decoration | +| underline | bool | Enables underline as text decoration | +| overlined | bool | Enables overline as text decoration | +| blink | bool | Enables blinking text | +| conceal | bool | Conceals / hides the text | +| inverse | bool | Swaps fore- & background colors | + +#### Example + +``` +"enumeration": { + "prefix": ". " +} +``` + +### block_quote ### hr ### emph ### strong