mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Add missing help text for granular spacing properties
This commit is contained in:
@@ -124,7 +124,7 @@ def _spacing_examples(property_name: str) -> ContextSpecificBullets:
|
||||
"In Textual CSS, supply 1, 2 or 4 integers separated by a space",
|
||||
examples=[
|
||||
Example(f"{property_name}: 1;"),
|
||||
Example(f"{property_name}: 1 2; [dim]# Vertical, horizontal"),
|
||||
Example(f"{property_name}: 1 2; [dim]# Vertical, horizontal"),
|
||||
Example(
|
||||
f"{property_name}: 1 2 3 4; [dim]# Top, right, bottom, left"
|
||||
),
|
||||
|
||||
@@ -343,7 +343,7 @@ class StylesBuilder:
|
||||
def _process_space_partial(self, name: str, tokens: list[Token]) -> None:
|
||||
"""Process granular margin / padding declarations."""
|
||||
if len(tokens) != 1:
|
||||
self.error(name, tokens[0], "expected a single token here")
|
||||
self.error(name, tokens[0], spacing_invalid_value(name, context="css"))
|
||||
|
||||
_EDGE_SPACING_MAP = {"top": 0, "right": 1, "bottom": 2, "left": 3}
|
||||
token = tokens[0]
|
||||
|
||||
Reference in New Issue
Block a user