Fix UIkit tab/switcher list markers showing as squares
All checks were successful
Deploy / deploy (push) Successful in 1m39s

Add global CSS to remove ::marker pseudo-elements from uk-tab and
uk-switcher components. Also clean up tab structure to match MonsterUI
idioms (uk-active on Li, use None instead of empty string for cls).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-08 12:56:25 +00:00
parent 94701c2f7e
commit 1853bca745
3 changed files with 22 additions and 32 deletions

View File

@@ -14,6 +14,19 @@ from animaltrack.web.templates.sidebar import (
)
def TabStyles(): # noqa: N802
"""CSS styles to fix UIkit tab/switcher list markers."""
return Style("""
/* Remove list markers from UIkit tabs and switchers */
.uk-tab, .uk-tab-alt, .uk-switcher, .uk-switcher > li {
list-style: none !important;
}
.uk-tab > li::marker, .uk-tab-alt > li::marker, .uk-switcher > li::marker {
content: none !important;
}
""")
def EventSlideOverStyles(): # noqa: N802
"""CSS styles for event detail slide-over panel."""
return Style("""
@@ -155,6 +168,7 @@ def page(
Title(title),
BottomNavStyles(),
SidebarStyles(),
TabStyles(),
EventSlideOverStyles(),
SidebarScript(),
EventSlideOverScript(),

View File

@@ -52,20 +52,8 @@ def eggs_page(
H1("Eggs", cls="text-2xl font-bold mb-6"),
# Tab navigation
TabContainer(
Li(
A(
"Harvest",
href="#",
cls="uk-active" if harvest_active else "",
),
),
Li(
A(
"Sell",
href="#",
cls="" if harvest_active else "uk-active",
),
),
Li(A("Harvest", href="#"), cls="uk-active" if harvest_active else None),
Li(A("Sell", href="#"), cls=None if harvest_active else "uk-active"),
uk_switcher="connect: #egg-forms; animation: uk-animation-fade",
alt=True,
),
@@ -78,7 +66,7 @@ def eggs_page(
error=harvest_error,
action=harvest_action,
),
cls="uk-active" if harvest_active else "",
cls="uk-active" if harvest_active else None,
),
Li(
sell_form(
@@ -87,7 +75,7 @@ def eggs_page(
error=sell_error,
action=sell_action,
),
cls="" if harvest_active else "uk-active",
cls=None if harvest_active else "uk-active",
),
),
cls="p-4",

View File

@@ -56,20 +56,8 @@ def feed_page(
H1("Feed", cls="text-2xl font-bold mb-6"),
# Tab navigation
TabContainer(
Li(
A(
"Give Feed",
href="#",
cls="uk-active" if give_active else "",
),
),
Li(
A(
"Purchase Feed",
href="#",
cls="" if give_active else "uk-active",
),
),
Li(A("Give Feed", href="#"), cls="uk-active" if give_active else None),
Li(A("Purchase Feed", href="#"), cls=None if give_active else "uk-active"),
uk_switcher="connect: #feed-forms; animation: uk-animation-fade",
alt=True,
),
@@ -86,11 +74,11 @@ def feed_page(
balance_warning=balance_warning,
action=give_action,
),
cls="uk-active" if give_active else "",
cls="uk-active" if give_active else None,
),
Li(
purchase_feed_form(feed_types, error=purchase_error, action=purchase_action),
cls="" if give_active else "uk-active",
cls=None if give_active else "uk-active",
),
),
cls="p-4",