mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Create type <name>.
This commit is contained in:
33
docs/css_types/name.md
Normal file
33
docs/css_types/name.md
Normal file
@@ -0,0 +1,33 @@
|
||||
# <name>
|
||||
|
||||
The `<name>` type represents a sequence of characters that identifies something.
|
||||
|
||||
## Syntax
|
||||
|
||||
--8<-- "docs/snippets/type_syntax/name.md"
|
||||
|
||||
## Examples
|
||||
|
||||
### CSS
|
||||
|
||||
```sass
|
||||
* {
|
||||
rule: onlyLetters;
|
||||
rule: Letters-and-hiphens;
|
||||
rule: _leading-underscore;
|
||||
rule: letters-and-1-digit;
|
||||
rule: name1234567890;
|
||||
}
|
||||
```
|
||||
|
||||
### Python
|
||||
|
||||
<!-- Same examples as above. -->
|
||||
|
||||
```py
|
||||
name = "onlyLetters"
|
||||
name = "Letters-and-hiphens"
|
||||
name = "_leading-underscore"
|
||||
name = "letters-and-1-digit"
|
||||
name = "name1234567890"
|
||||
```
|
||||
4
docs/snippets/type_syntax/name.md
Normal file
4
docs/snippets/type_syntax/name.md
Normal file
@@ -0,0 +1,4 @@
|
||||
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 `-`.
|
||||
@@ -34,6 +34,7 @@ nav:
|
||||
- "css_types/color.md"
|
||||
- "css_types/horizontal.md"
|
||||
- "css_types/integer.md"
|
||||
- "css_types/name.md"
|
||||
- "css_types/number.md"
|
||||
- "css_types/percentage.md"
|
||||
- "css_types/scalar.md"
|
||||
|
||||
Reference in New Issue
Block a user