fix inconsistent spacing between list items in markdown

This commit is contained in:
Aran-Fey
2024-05-10 10:57:09 +02:00
parent 89659ac10b
commit f0a2c06455
3 changed files with 17 additions and 5 deletions

View File

@@ -29,7 +29,6 @@
![dall_e_example](https://github.com/rio-labs/rio/assets/41641225/44279406-0c2d-47e2-98b5-4582722054b2)
## Features 🧩
- Modern, **declarative UI** framework
@@ -45,8 +44,8 @@
```python
# Define a component that counts button clicks
class ButtonClicker(rio.Component):
# Define the attributes of the component. Changing these will
# affect the GUI.
# Define the attributes of the component. Rio will watch these
# for changes and automatically update the GUI.
clicks: int = 0
# Define a method that increments the click count. We'll later

View File

@@ -1197,6 +1197,17 @@ textarea:not(:placeholder-shown) ~ .rio-input-box-label,
left: 0;
}
// List items have super inconsistent spacing because they sometimes contain
// a <p> (which has 1em of spacing per default) and sometimes not. We want
// to remove the spacing between list items, but keep spacing between <p>s
// and other stuff *inside of the same list item*.
ul > li > p {
margin: 0;
}
ul > li > p + * {
margin-bottom: 1em; // Actually em and not rem to be consistent with the browser default
}
code {
font-family: var(--rio-global-monospace-font), monospace;
background: var(--rio-local-bg-variant);

View File

@@ -33,8 +33,10 @@ class Text(FundamentalComponent):
`selectable`: Whether the text can be selected by the user.
`style`: The style of the text. This can either be a `TextStyle` instance,
or one of the built-in styles: `heading1`, `heading2`, `heading3`,
`text` or `dim`.
or one of the built-in styles: `"heading1"`, `"heading2"`, `"heading3"`,
`"text"` or `"dim"`.
`justify`: Controls the alignment of the text within each individual line.
## Examples