Skip to content

Commit

Permalink
fix(themes): Improve dark theme
Browse files Browse the repository at this point in the history
  • Loading branch information
paveldedik committed Jun 24, 2024
1 parent c838e6e commit 0d35a29
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
8 changes: 4 additions & 4 deletions examples/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
from ludic.catalog.layouts import Center, Stack
from ludic.catalog.pages import Body, Head, HtmlPage
from ludic.html import meta
from ludic.types import (
AnyChildren,
Component,
)
from ludic.styles import set_default_theme, themes, types
from ludic.types import AnyChildren, Component

set_default_theme(themes.LightTheme(measure=types.Size(90, "ch")))


@dataclass
Expand Down
2 changes: 1 addition & 1 deletion examples/edit_row.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def render(self) -> TableRow:
hx_include="closest tr",
classes=["small"],
),
classes=["cluster-small"],
classes=["cluster-small", "centered"],
),
classes=["editing"],
)
Expand Down
3 changes: 3 additions & 0 deletions ludic/catalog/pages.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ class HtmlPage(ComponentStrict[Head, Body, NoAttrs]):
"padding": "0",
"line-height": theme.line_height,
},
"body": {
"background-color": theme.colors.white,
},
("html", "body", "div", "header", "nav", "main", "footer"): {
"max-inline-size": "none",
},
Expand Down
8 changes: 4 additions & 4 deletions ludic/styles/themes.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,15 +227,15 @@ class DarkTheme(Theme):
colors: Colors = field(
default_factory=lambda: Colors(
primary=Color("#0d6efd"),
secondary=Color("#6c757d"),
secondary=Color("#898989"),
success=Color("#198754"),
info=Color("#0dcaf0"),
warning=Color("#ffc107"),
danger=Color("#dc3545"),
light=Color("#414549"),
dark=Color("#f8f8f8"),
white=Color("#000"),
black=Color("#fff"),
dark=Color("#d8d8d8"),
white=Color("#131313"),
black=Color("#e5e5e5"),
)
)

Expand Down

0 comments on commit 0d35a29

Please sign in to comment.