mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Create subfolder for syntax snippets.
This commit is contained in:
@@ -1,2 +0,0 @@
|
||||
A [percentage](/styles/css_units/percentage) is a number followed by the percent sign.
|
||||
The number doesn't have to be an integer and values are clamped between 0% and 100%.
|
||||
@@ -1,9 +1,9 @@
|
||||
The legal values for a [color](/styles/css_units/color) depend on the [class `Color`][textual.color.Color] and include:
|
||||
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
|
||||
- a color variable from [Textual's default themes](../../guide/design#theme-reference).
|
||||
|
||||
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.
|
||||
2
docs/snippets/type_syntax/percentage.md
Normal file
2
docs/snippets/type_syntax/percentage.md
Normal file
@@ -0,0 +1,2 @@
|
||||
A [`<percentage>`](/css_types/percentage) is a [`<number>`](/css_types/number) followed by the percent sign `%` (without spaces).
|
||||
Some rules may clamp the values between `0%` and `100%`.
|
||||
@@ -1,4 +1,4 @@
|
||||
A [scalar](/styles/css_units/scalar) can be any of the following:
|
||||
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`);
|
||||
@@ -1,10 +1,10 @@
|
||||
The [text style](/styles/css_units/text_style) unit can be any _space-separated_ combination of the following values:
|
||||
The [`<text-style>`](/css_types/text_style) type can be any _space-separated_ combination of the following values:
|
||||
|
||||
| Value | Description |
|
||||
|-------------|----------------------------------------------------------------|
|
||||
| `bold` | **bold text** |
|
||||
| `italic` | _italic text_ |
|
||||
| `reverse` | reverse video text (foreground and background colors reversed) |
|
||||
| `underline` | <u>underline text</u> |
|
||||
| `strike` | <s>strikethrough text</s> |
|
||||
| `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> |
|
||||
Reference in New Issue
Block a user