46 lines
1.2 KiB
Python
46 lines
1.2 KiB
Python
"""Styles for the app."""
|
|
|
|
import reflex as rx
|
|
|
|
border_radius = "0.375rem"
|
|
border = f"1px solid {rx.color('gray', 6)}"
|
|
text_color = rx.color("gray", 11)
|
|
accent_text_color = rx.color("accent", 10)
|
|
accent_color = rx.color("accent", 1)
|
|
hover_accent_color = {"_hover": {"color": accent_text_color}}
|
|
hover_accent_bg = {"_hover": {"background_color": accent_color}}
|
|
content_width_vw = "90vw"
|
|
sidebar_width = "20em"
|
|
|
|
template_page_style = {"padding_top": "5em", "padding_x": ["auto", "2em"], "flex": "1"}
|
|
|
|
template_content_style = {
|
|
"align_items": "flex-start",
|
|
"border_radius": border_radius,
|
|
"padding": "1em",
|
|
"margin_bottom": "2em",
|
|
}
|
|
|
|
link_style = {
|
|
"color": accent_text_color,
|
|
"text_decoration": "none",
|
|
**hover_accent_color,
|
|
}
|
|
|
|
overlapping_button_style = {
|
|
"background_color": "white",
|
|
"border_radius": border_radius,
|
|
}
|
|
|
|
markdown_style = {
|
|
"code": lambda text: rx.code(text, color_scheme="gray"),
|
|
"codeblock": lambda text, **props: rx.code_block(text, **props, margin_y="1em"),
|
|
"a": lambda text, **props: rx.link(
|
|
text,
|
|
**props,
|
|
font_weight="bold",
|
|
text_decoration="underline",
|
|
text_decoration_color=accent_text_color,
|
|
),
|
|
}
|