mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Rename CSS units as CSS types.
This commit is contained in:
12
docs/css_types/index.md
Normal file
12
docs/css_types/index.md
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
# CSS Types
|
||||||
|
|
||||||
|
CSS types define the values that Textual CSS rules accept.
|
||||||
|
|
||||||
|
CSS types will be linked from within the [styles reference](../styles/index.md) in the "Formal Syntax" section of each rule.
|
||||||
|
The CSS types will be denoted by a keyword enclosed by angle brackets `<` and `>`.
|
||||||
|
|
||||||
|
For example, the style [`align-horizontal`](../styles/align.md) references the CSS type [<horizontal>](./horizontal.md):
|
||||||
|
|
||||||
|
--8<-- "docs/snippets/syntax_block_start.md"
|
||||||
|
align-horizontal: <a href="./horizontal.md"><horizontal></a>
|
||||||
|
--8<-- "docs/snippets/syntax_block_end.md"
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
# CSS units
|
|
||||||
|
|
||||||
Many CSS rules accept units of some sort, as opposed to a set of values.
|
|
||||||
|
|
||||||
The different CSS units are:
|
|
||||||
|
|
||||||
- [color](./color.md) – e.g., to set the background color of a widget;
|
|
||||||
- [fractional](./fractional.md) – e.g., to set the opacity of a widget;
|
|
||||||
- [integer](./integer.md) – e.g., to set the size of a grid layout;
|
|
||||||
- [percentage](./percentage.md) – e.g., to set the transparency of colors;
|
|
||||||
- [scalar](./scalar.md) – e.g., to set the dimensions of a widget; and
|
|
||||||
- [text style](./text_style.md) – e.g., to style the text of a widget.
|
|
||||||
Reference in New Issue
Block a user