Inline css type values in their reference.

[skip ci]
This commit is contained in:
Rodrigo Girão Serrão
2023-01-06 14:50:31 +00:00
parent 42baa0e074
commit 69a143442c
26 changed files with 120 additions and 140 deletions

View File

@@ -1,39 +0,0 @@
<!--
This is the template file for a syntax snippet of a Textual CSS type.
The comments below illustrate some common patterns.
-->
<!--
For a simple type like <integer>:
Describe the type in a short paragraph with an absolute link to the type page.
E.g., “The [`<my-type>`](/css_types/my_type) type is such and such with sprinkles on top.”
-->
<!--
For a type with many different values like <color>:
Introduce the type with a link to [`<my-type>`](/css_types/my_type).
Then, a bullet list with the variants accepted:
- you can create this type with X Y Z;
- you can also do A B C; and
- also use D E F.
Consider ending with a link to the code/API that serves as ground truth for what values are accepted.
-->
<!--
For a type that accepts specific options like <border>:
Add a sentence and a table. Consider ordering values in alphabetical order if there is no other obvious ordering. See below:
The [`<my-type>`](/css_types/my_type) type can take any of the following values:
| Value | Description |
|---------------|-----------------------------------------------|
| `abc` | Describe here. |
| `other val` | Describe this one also. |
| `value three` | Please use full stops. |
| `zyx` | Describe the value without assuming any rule. |
-->

View File

@@ -1,19 +0,0 @@
The [`<border>`](/css_types/border) type can take any of the following values:
| Border type | Description |
|-------------|----------------------------------------------------------|
| `ascii` | A border with plus, hyphen, and vertical bar characters. |
| `blank` | A blank border (reserves space for a border). |
| `dashed` | Dashed line border. |
| `double` | Double lined border. |
| `heavy` | Heavy border. |
| `hidden` | Alias for "none". |
| `hkey` | Horizontal key-line border. |
| `inner` | Thick solid border. |
| `none` | Disabled border. |
| `outer` | Solid border with additional space around content. |
| `round` | Rounded corners. |
| `solid` | Solid border. |
| `tall` | Solid border with additional space top and bottom. |
| `vkey` | Vertical key-line border. |
| `wide` | Solid border with additional space left and right. |

View File

@@ -1,9 +0,0 @@
The legal values for a [`<color>`](/css_types/color) depend on the [class `Color`][textual.color.Color] and include:
- a recognised [named color](../../api/color#textual.color--named-colors) (e.g., `red`);
- a hexadecimal number representing the RGB values of the color (e.g., `#F35573`);
- a color description in the RGB system (e.g., `rgb(23,78,200)`);
- a color description in the HSL system (e.g., `hsl(290,70%,80%)`); and
For more details about the exact formats accepted, see [the class method `Color.parse`][textual.color.Color.parse].
[Textual's default themes](../../guide/design#theme-reference) also provide many CSS variables with colors.

View File

@@ -1,7 +0,0 @@
The [`<horizontal>`](/css_types/horizontal) type can take any of the following values:
| Value | Description |
| ---------------- | -------------------------------------------- |
| `center` | Aligns in the center of the horizontal axis. |
| `left` (default) | Aligns on the left of the horizontal axis. |
| `right` | Aligns on the right of the horizontal axis. |

View File

@@ -1 +0,0 @@
An [`<integer>`](/css_types/integer) is any valid integer number like `-10` or `42`.

View File

@@ -1,4 +0,0 @@
A [`<name>`](/css_types/name) is any non-empty sequence of characters:
- starting with a letter `a-z`, `A-Z`, or underscore `_`; and
- followed by zero or more letters `a-zA-Z`, digits `0-9`, underscores `_`, and hiphens `-`.

View File

@@ -1 +0,0 @@
A [`<number>`](/css_types/number) is an [`<integer>`](/css_types/integer), optionally followed by the decimal point `.` and a decimal part composed of one or more digits.

View File

@@ -1,7 +0,0 @@
The [`<overflow>`](/css_types/overflow) type can take any of the following values:
| Value | Description |
|----------|----------------------------------------|
| `auto` | Determine overflow mode automatically. |
| `hidden` | Don't overflow. |
| `scroll` | Allow overflowing. |

View File

@@ -1 +0,0 @@
A [`<percentage>`](/css_types/percentage) is a [`<number>`](/css_types/number) followed by the percent sign `%` (without spaces).

View File

@@ -1,8 +0,0 @@
A [`<scalar>`](/css_types/scalar) can be any of the following:
- a fixed number of cells (e.g., `10`);
- a fractional proportion relative to the sizes of the other widgets (e.g., `1fr`);
- a percentage relative to the container widget (e.g., `50%`);
- a percentage relative to the container width/height (e.g., `25w`/`75h`);
- a percentage relative to the viewport width/height (e.g., `25vw`/`75vh`); or
- the special value `auto` to compute the optimal size to fit without scrolling.

View File

@@ -1,14 +0,0 @@
A [`<text-align>`](/css_types/text_align) can be any of the following values:
| Value | Alignment type |
|-----------|--------------------------------------|
| `center` | Center alignment. |
| `end` | Alias for `right`. |
| `justify` | Text is justified inside the widget. |
| `left` | Left alignment. |
| `right` | Right alignment. |
| `start` | Alias for `left`. |
!!! tip
The meanings of `start` and `end` will likely change when RTL languages become supported by Textual.

View File

@@ -1,10 +0,0 @@
A [`<text-style>`](/css_types/text_style) can be any _space-separated_ combination of the following values:
| Value | Description |
|-------------|-----------------------------------------------------------------|
| `bold` | **Bold text.** |
| `italic` | _Italic text._ |
| `none` | Plain text with no styling. |
| `reverse` | Reverse video text (foreground and background colors reversed). |
| `strike` | <s>Strikethrough text.</s> |
| `underline` | <u>Underline text.</u> |

View File

@@ -1,7 +0,0 @@
The [`<vertical>`](/css_types/vertical) type can take any of the following values:
| Value | Description |
| --------------- | ------------------------------------------ |
| `bottom` | Aligns at the bottom of the vertical axis. |
| `middle` | Aligns in the middle of the vertical axis. |
| `top` (default) | Aligns at the top of the vertical axis. |