Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
keithasaurus committed Dec 8, 2023
1 parent bf25960 commit fe6395d
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,16 @@ You can render inline css styles with `render_styles`:
```python
from simple_html import div, render, render_styles

node = div({"style": render_styles({"min-width": "25px"})},
"cool")
styles = render_styles({"min-width": "25px"})

render(
div({"style": styles},
"cool")
)
# <div style="min-width:25px;">cool</div>

render(node) # <div style="min-width:25px;">cool</div>

# ints and floats can be values for styles
# ints and floats are legal values
styles = render_styles({"padding": 0, "flex-grow": 0.6})

render(
Expand Down

0 comments on commit fe6395d

Please sign in to comment.