From 42baa0e074695d4711f93878d45531f5a46f03bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodrigo=20Gir=C3=A3o=20Serr=C3=A3o?= <5621605+rodrigogiraoserrao@users.noreply.github.com> Date: Fri, 6 Jan 2023 14:41:13 +0000 Subject: [PATCH] Remove redundant values subsections. [skip ci] --- docs/styles/align.md | 11 ----------- docs/styles/background.md | 13 +------------ docs/styles/border.md | 10 ---------- docs/styles/color.md | 12 ------------ docs/styles/content_align.md | 10 ---------- docs/styles/height.md | 4 ---- docs/styles/layer.md | 4 ---- docs/styles/layers.md | 4 ---- docs/styles/margin.md | 4 ---- docs/styles/max_height.md | 4 ---- docs/styles/max_width.md | 4 ---- docs/styles/min_height.md | 4 ---- docs/styles/min_width.md | 4 ---- docs/styles/offset.md | 4 ---- docs/styles/opacity.md | 12 ------------ docs/styles/outline.md | 10 ---------- docs/styles/overflow.md | 4 ---- docs/styles/text_align.md | 4 ---- docs/styles/text_opacity.md | 12 ------------ docs/styles/text_style.md | 4 ---- 20 files changed, 1 insertion(+), 137 deletions(-) diff --git a/docs/styles/align.md b/docs/styles/align.md index 0f3121f01..f2a42cb4a 100644 --- a/docs/styles/align.md +++ b/docs/styles/align.md @@ -21,17 +21,6 @@ To specify alignment on a single axis, use the respective style and type: - `align-horizontal` takes a [``](../../css_types/horizontal) and does alignment along the horizontal axis; and - `align-vertical` takes a [``](../../css_types/vertical) and does alignment along the vertical axis. -### Values - -#### <horizontal> - ---8<-- "docs/snippets/type_syntax/horizontal.md" - -#### <vertical> - ---8<-- "docs/snippets/type_syntax/vertical.md" - - ## Examples This example contains a simple app with two labels centered on the screen with `align: center middle;`: diff --git a/docs/styles/background.md b/docs/styles/background.md index d22581a57..c10baa28e 100644 --- a/docs/styles/background.md +++ b/docs/styles/background.md @@ -8,18 +8,7 @@ The `background` rule sets the background color of a widget. background: <color> [<percentage>]; --8<-- "docs/snippets/syntax_block_end.md" -The style `background` needs a [``](../../css_types/color) followed by an optional [``](../../css_types/percentage) to specify the color transparency. - -### Values - -#### <color> - ---8<-- "docs/snippets/type_syntax/color.md" - -#### <percentage> - ---8<-- "docs/snippets/type_syntax/percentage.md" -This is clamped between `0%` and `100%`. +The style `background` needs a [``](../../css_types/color) followed by an optional [``](../../css_types/percentage) to specify the color transparency (clamped between `0%` and `100%`). ## Examples diff --git a/docs/styles/border.md b/docs/styles/border.md index 15013f650..5439b3ec7 100644 --- a/docs/styles/border.md +++ b/docs/styles/border.md @@ -17,16 +17,6 @@ The style `border` accepts an optional [``](../../css_types/border) that Borders may also be set individually for the four edges of a widget with the `border-top`, `border-right`, `border-bottom` and `border-left` rules. -### Values - -#### <border> - ---8<-- "docs/snippets/type_syntax/border.md" - -#### <color> - ---8<-- "docs/snippets/type_syntax/color.md" - ### Multiple edge rules If multiple border rules target the same edge, the last rule that targets a specific edge is the one that is applied to that edge. diff --git a/docs/styles/color.md b/docs/styles/color.md index 4db2eccb4..508e47c18 100644 --- a/docs/styles/color.md +++ b/docs/styles/color.md @@ -12,18 +12,6 @@ The style `color` needs a [``](../../css_types/color) followed by an opti Instead of a [``](../../css_types/color), one can use the special value `"auto"` to choose automatically the color with the best contrast for readability purposes. -### Values - -#### <color> - ---8<-- "docs/snippets/type_syntax/color.md" - -The alternative value `"auto"` picks the color that provides the best contrast for readability purposes. - -#### <percentage> - ---8<-- "docs/snippets/type_syntax/percentage.md" - ## Examples This example sets a different text color for each of three different widgets. diff --git a/docs/styles/content_align.md b/docs/styles/content_align.md index bdf073199..b459009c6 100644 --- a/docs/styles/content_align.md +++ b/docs/styles/content_align.md @@ -22,16 +22,6 @@ To specify content alignment on a single axis, use the respective style and type - `content-align-horizontal` takes a [``](../../css_types/horizontal) and does alignment along the horizontal axis; and - `content-align-vertical` takes a [``](../../css_types/vertical) and does alignment along the vertical axis. -### Values - -#### <horizontal> - ---8<-- "docs/snippets/type_syntax/horizontal.md" - -#### <vertical> - ---8<-- "docs/snippets/type_syntax/vertical.md" - ## Examples This first example shows three labels stacked vertically, each with different content alignments. diff --git a/docs/styles/height.md b/docs/styles/height.md index a4858a95f..97dd82524 100644 --- a/docs/styles/height.md +++ b/docs/styles/height.md @@ -11,10 +11,6 @@ height: <scalar>; The style `height` needs a [``](../../css_types/scalar) to determine the vertical length of the widget. By default, it sets the height of the content area, but if [`box-sizing`](./box_sizing) is set to `border-box` it sets the height of the border area. -### Values - ---8<-- "docs/snippets/type_syntax/scalar.md" - ## Examples This examples creates a widget with a height of 50% of the screen. diff --git a/docs/styles/layer.md b/docs/styles/layer.md index 6e6f02476..851a02eb3 100644 --- a/docs/styles/layer.md +++ b/docs/styles/layer.md @@ -13,10 +13,6 @@ This [``](../../css_types/name) must correspond to a [``](../../css_ More information on layers can be found in the [guide](../guide/layout.md#layers). -### Values - ---8<-- "docs/snippets/type_syntax/name.md" - !!! warning Using a `` that hasn't been defined in a [`layers`](./layers.md) declaration of an ancestor of this widget has no effect. diff --git a/docs/styles/layers.md b/docs/styles/layers.md index 427d2761e..518293311 100644 --- a/docs/styles/layers.md +++ b/docs/styles/layers.md @@ -15,10 +15,6 @@ The layers defined first in the list are drawn under the layers that are defined More information on layers can be found in the [guide](../guide/layout.md#layers). -### Values - ---8<-- "docs/snippets/type_syntax/name.md" - ## Example In the example below, `#box1` is yielded before `#box2`. diff --git a/docs/styles/margin.md b/docs/styles/margin.md index de97a31f7..c537393d6 100644 --- a/docs/styles/margin.md +++ b/docs/styles/margin.md @@ -32,10 +32,6 @@ The number of values given defines what edges get what margin: Alternatively, margin can be set for each edge individually through the rules `margin-top`, `margin-right`, `margin-bottom`, and `margin-left`, respectively. -### Values - ---8<-- "docs/snippets/type_syntax/integer.md" - ## Examples In the example below we add a large margin to a label, which makes it move away from the top-left corner of the screen. diff --git a/docs/styles/max_height.md b/docs/styles/max_height.md index c14162517..32f869755 100644 --- a/docs/styles/max_height.md +++ b/docs/styles/max_height.md @@ -11,10 +11,6 @@ max-height: <scalar>; The `max-height` rule accepts a [``](../../css_types/scalar) that defines an upper bound for the [`height`](./height) of a widget. That is, the height of a widget is never allowed to exceed `max-height`. -### Values - ---8<-- "docs/snippets/type_syntax/scalar.md" - ## Example The example below shows some placeholders that were defined to span vertically from the top edge of the terminal to the bottom edge. diff --git a/docs/styles/max_width.md b/docs/styles/max_width.md index 41d07b315..210fdab49 100644 --- a/docs/styles/max_width.md +++ b/docs/styles/max_width.md @@ -11,10 +11,6 @@ max-width: <scalar>; The `max-width` rule accepts a [``](../../css_types/scalar) that defines an upper bound for the [`width`](./width) of a widget. That is, the width of a widget is never allowed to exceed `max-width`. -### Values - ---8<-- "docs/snippets/type_syntax/scalar.md" - ## Example The example below shows some placeholders that were defined to span horizontally from the top edge of the terminal to the bottom edge. diff --git a/docs/styles/min_height.md b/docs/styles/min_height.md index 79adb93bb..883351b38 100644 --- a/docs/styles/min_height.md +++ b/docs/styles/min_height.md @@ -11,10 +11,6 @@ min-height: <scalar>; The `min-height` rule accepts a [``](../../css_types/scalar) that defines a lower bound for the [`height`](./height) of a widget. That is, the height of a widget is never allowed to be under `min-height`. -### Values - ---8<-- "docs/snippets/type_syntax/scalar.md" - ## Example The example below shows some placeholders with their height set to `50%`. diff --git a/docs/styles/min_width.md b/docs/styles/min_width.md index 4db00c5e4..c64374097 100644 --- a/docs/styles/min_width.md +++ b/docs/styles/min_width.md @@ -11,10 +11,6 @@ min-width: <scalar>; The `min-width` rule accepts a [``](../../css_types/scalar) that defines a lower bound for the [`width`](./width) of a widget. That is, the width of a widget is never allowed to be under `min-width`. -### Values - ---8<-- "docs/snippets/type_syntax/scalar.md" - ## Example The example below shows some placeholders with their width set to `50%`. diff --git a/docs/styles/offset.md b/docs/styles/offset.md index 10ca2dd4d..ad113de9f 100644 --- a/docs/styles/offset.md +++ b/docs/styles/offset.md @@ -15,10 +15,6 @@ The two [``](../../css_types/scalar) in the `offset` define, respectivel To specify an offset along a single axis, you can use `offset-x` and `offset-y`. -### Values - ---8<-- "docs/snippets/type_syntax/scalar.md" - ## Example In this example, we have 3 widgets with differing offsets. diff --git a/docs/styles/opacity.md b/docs/styles/opacity.md index 4844f9342..bf05fca28 100644 --- a/docs/styles/opacity.md +++ b/docs/styles/opacity.md @@ -13,18 +13,6 @@ The opacity of a widget can be set as a [``](../css_types/number.md) or Conversely, `1`/`100%` means full opacity, which is equivalent to no transparency. Values outside of these ranges will be clamped. -### Values - -### <number> - ---8<-- "docs/snippets/type_syntax/number.md" -The value of [``](../../css_types/number) is clamped between `0` and `1`. - -### <percentage> - ---8<-- "docs/snippets/type_syntax/percentage.md" -The value of [``](../../css_types/percentage) is clamped between `0%` and `100%`. - ## Example This example shows, from top to bottom, increasing opacity values for a label with a border and some text. diff --git a/docs/styles/outline.md b/docs/styles/outline.md index 3d1916090..24ca78c7b 100644 --- a/docs/styles/outline.md +++ b/docs/styles/outline.md @@ -22,16 +22,6 @@ The style `outline` accepts an optional [``](../../css_types/border) tha Unlike the style [`border`](./border.md), the frame of the outline is drawn over the content area of the widget. This rule can be useful for temporary emphasis of the content of a widget, if you want to draw the user's attention to it. -### Values - -#### <border> - ---8<-- "docs/snippets/type_syntax/border.md" - -#### <color> - ---8<-- "docs/snippets/type_syntax/color.md" - ## Examples This example shows a widget with an outline. Note how the outline occludes the text area. diff --git a/docs/styles/overflow.md b/docs/styles/overflow.md index 84a903fd1..ba9296996 100644 --- a/docs/styles/overflow.md +++ b/docs/styles/overflow.md @@ -19,10 +19,6 @@ Overflow may also be set individually for each axis: - `overflow-x` sets the overflow for the horizontal axis; and - `overflow-y` sets the overflow for the vertical axis. -### Values - ---8<-- "docs/snippets/type_syntax/overflow.md" - ### Defaults The default setting for containers is `overflow: auto auto`. diff --git a/docs/styles/text_align.md b/docs/styles/text_align.md index dc55dc03e..2eccff1e2 100644 --- a/docs/styles/text_align.md +++ b/docs/styles/text_align.md @@ -10,10 +10,6 @@ text-align: <text-align>; The `text-align` rule accepts a value of the type [``](../css_types/text_align.md) that defines how text is aligned inside the widget. -### Values - ---8<-- "docs/snippets/type_syntax/text_align.md" - ### Defaults The default value is `start`. diff --git a/docs/styles/text_opacity.md b/docs/styles/text_opacity.md index b7b8f63ff..304aac548 100644 --- a/docs/styles/text_opacity.md +++ b/docs/styles/text_opacity.md @@ -13,18 +13,6 @@ The text opacity can be set as a [``](../css_types/number.md) or a [``](../../css_types/number) is clamped between `0` and `1`. - -### <percentage> - ---8<-- "docs/snippets/type_syntax/percentage.md" -The value of [``](../../css_types/percentage) is clamped between `0%` and `100%`. - ## Example This example shows, from top to bottom, increasing `text-opacity` values. diff --git a/docs/styles/text_style.md b/docs/styles/text_style.md index 815c040ec..19010325e 100644 --- a/docs/styles/text_style.md +++ b/docs/styles/text_style.md @@ -10,10 +10,6 @@ text-style: <text-style>; `text-style` will take all the values specified and will apply that styling combination to the text in the widget. -### Values - ---8<-- "docs/snippets/type_syntax/text_style.md" - ## Examples Each of the three text panels has a different text style, respectively `bold`, `italic`, and `reverse`, from left to right.