Css With ReactPy
#1089
-
how to add css in ReactPy? |
Beta Was this translation helpful? Give feedback.
Answered by
Mosesoyet
Aug 18, 2023
Replies: 2 comments 2 replies
-
You can include CSS in your apps by using html.link({"href": "url/to/your/stylesheet.css", "rel": "stylesheet"}) Alternatively, if you want to write raw CSS you can just use html.style("""
.my-class {
color: #26b72b;
}
""") At that point you need only add html.div({"class": "my-class"}, ...) |
Beta Was this translation helpful? Give feedback.
2 replies
-
For flask backend, it would be something like this, html.link(
{
"href": url_for('static', filename='file.css'),
"rel": "stylesheet",
"type": "text/css"
}
) |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Archmonger
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For flask backend, it would be something like this,