From bf2000f9b587cc1d7af22f4dcf00b36b4b770bb3 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: Wed, 21 Dec 2022 19:40:18 +0000 Subject: [PATCH] Create subfolder for syntax snippets. --- docs/snippets/percentage_syntax.md | 2 -- .../{color_css_syntax.md => type_syntax/color.md} | 4 ++-- docs/snippets/type_syntax/percentage.md | 2 ++ docs/snippets/{scalar_syntax.md => type_syntax/scalar.md} | 2 +- .../{text_style_syntax.md => type_syntax/text_style.md} | 8 ++++---- mkdocs.yml | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) delete mode 100644 docs/snippets/percentage_syntax.md rename docs/snippets/{color_css_syntax.md => type_syntax/color.md} (65%) create mode 100644 docs/snippets/type_syntax/percentage.md rename docs/snippets/{scalar_syntax.md => type_syntax/scalar.md} (86%) rename docs/snippets/{text_style_syntax.md => type_syntax/text_style.md} (84%) diff --git a/docs/snippets/percentage_syntax.md b/docs/snippets/percentage_syntax.md deleted file mode 100644 index 179cf1753..000000000 --- a/docs/snippets/percentage_syntax.md +++ /dev/null @@ -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%. diff --git a/docs/snippets/color_css_syntax.md b/docs/snippets/type_syntax/color.md similarity index 65% rename from docs/snippets/color_css_syntax.md rename to docs/snippets/type_syntax/color.md index 8e818339a..7b87daac3 100644 --- a/docs/snippets/color_css_syntax.md +++ b/docs/snippets/type_syntax/color.md @@ -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 [``](/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. diff --git a/docs/snippets/type_syntax/percentage.md b/docs/snippets/type_syntax/percentage.md new file mode 100644 index 000000000..ae6d3a619 --- /dev/null +++ b/docs/snippets/type_syntax/percentage.md @@ -0,0 +1,2 @@ +A [``](/css_types/percentage) is a [``](/css_types/number) followed by the percent sign `%` (without spaces). +Some rules may clamp the values between `0%` and `100%`. diff --git a/docs/snippets/scalar_syntax.md b/docs/snippets/type_syntax/scalar.md similarity index 86% rename from docs/snippets/scalar_syntax.md rename to docs/snippets/type_syntax/scalar.md index 22e022663..f29e9f4b2 100644 --- a/docs/snippets/scalar_syntax.md +++ b/docs/snippets/type_syntax/scalar.md @@ -1,4 +1,4 @@ -A [scalar](/styles/css_units/scalar) can be any of the following: +A [``](/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`); diff --git a/docs/snippets/text_style_syntax.md b/docs/snippets/type_syntax/text_style.md similarity index 84% rename from docs/snippets/text_style_syntax.md rename to docs/snippets/type_syntax/text_style.md index 532b83cf8..0e544bfcc 100644 --- a/docs/snippets/text_style_syntax.md +++ b/docs/snippets/type_syntax/text_style.md @@ -1,10 +1,10 @@ -The [text style](/styles/css_units/text_style) unit can be any _space-separated_ combination of the following values: +The [``](/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` | underline text | -| `strike` | strikethrough text | | `none` | plain text with no styling | +| `reverse` | reverse video text (foreground and background colors reversed) | +| `strike` | strikethrough text | +| `underline` | underline text | diff --git a/mkdocs.yml b/mkdocs.yml index 92b192279..3bfe525c2 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -31,8 +31,8 @@ nav: - CSS Types: - "css_types/index.md" - "css_types/color.md" - - "css_types/fractional.md" - "css_types/integer.md" + - "css_types/number.md" - "css_types/percentage.md" - "css_types/scalar.md" - "css_types/text_style.md"