Skip to content

Migrate from daisyUI to Material Design 3 components - #3

Merged
lemonorangeapple merged 1 commit into
masterfrom
claude/material-design-3-restyle-nythov
Oct 11, 2026
Merged

lemonorangeapple merged 1 commit into
masterfrom
claude/material-design-3-restyle-nythov

Conversation

@lemonorangeapple

Copy link
Copy Markdown
Owner

This PR replaces the daisyUI-based design system with a custom Material Design 3 implementation, including design tokens, component styles, and updated layouts.

Summary

The project has been migrated from daisyUI to a Material Design 3 (M3) design system. This includes:

  • New design token system with M3 color roles, typography scale, and spacing
  • Custom M3 component implementations (buttons, cards, chips, search view, etc.)
  • Updated layouts and pages to use new M3 components
  • Self-hosted Roboto font family (via @fontsource-variable)
  • Improved accessibility and interaction patterns per M3 guidelines

Key Changes

Design System & Tokens

  • Added tokens.css with M3 design tokens (colors, typography, shadows, radii)
  • Added base.css for foundational styles (color-scheme, focus indicators, scroll behavior)
  • Implemented light/dark theme support via data-theme attribute with light-dark() CSS function
  • Removed daisyUI plugin from Tailwind config

Component Library

  • Created components.css with M3 interactive components:
    • Buttons (filled, tonal, outlined variants)
    • Icon buttons
    • Cards (elevated, filled, outlined)
    • Chips (filter chips with selected state)
    • List items
    • Search bar
    • Shared state layer overlay (8% hover, 10% focus/active)
  • Redesigned search modal as full-screen view with Material transitions
  • Updated navigation bar with breadcrumb component and theme toggle
  • Refactored post cards and post grid layout

Typography & Content

  • Added prose.css for markdown article styling with M3 typography scale
  • Updated heading sizes to use M3 text styles (headline, title, body, label)
  • Improved code block styling with Shiki theme variables
  • Enhanced blockquote and list styling

Components & Pages

  • Updated NavBar.astro with M3 breadcrumb and icon buttons
  • Redesigned SearchModal.astro with new interaction patterns
  • Updated ThemeController.astro to use button instead of checkbox
  • Modified PostCard.astro and Card.astro for M3 styling
  • Updated home page, tags, topics, and posts pages with new layouts
  • Integrated Roboto font family via @fontsource-variable

Accessibility & UX

  • Added proper ARIA labels and roles throughout
  • Implemented M3 focus indicators (3px secondary ring, 2px offset)
  • Added skip link with M3 styling
  • Improved search view keyboard navigation and screen reader support
  • Updated test expectations for new button labels

Styling Cleanup

  • Removed daisyUI-specific classes and utilities
  • Consolidated CSS into organized layer structure (base, components)
  • Removed unused Placeholder.astro component
  • Updated Comments.css to use M3 color tokens

Notable Implementation Details

  • State layer overlay uses ::before pseudo-element with currentColor for flexible theming
  • Search view uses @starting-style for smooth open/close animations
  • Theme toggle uses light-dark() function for automatic color scheme switching
  • Post grid is responsive (1 column mobile, 2 columns at 40rem, 3 columns at 64rem)
  • All interactive surfaces follow M3 state layer opacity guidelines (8% hover, 10% focus/active)

https://claude.ai/code/session_01Kp1FWSg2KNQv7CgwopXfVs

- 移除 daisyUI,改用 Tailwind v4 + 自建 M3 设计令牌(色彩角色、字阶、
  形状、阴影层级、缓动),颜色用 light-dark() 一次声明亮/暗两套
- 手写 M3 组件:顶栏(含服务端渲染的面包屑)、Filled/Tonal/Outlined
  按钮、图标按钮、卡片、Filter chip、列表项、搜索栏与搜索视图
- 搜索改为手机全屏、桌面悬浮的 M3 搜索视图,新增清除按钮与点击遮罩关闭
- 主题切换改为顶栏图标开关并带 aria-pressed
- 代码块改用 Shiki 亮/暗双主题,跟随页面主题
- Waline 评论区按 M3 角色换肤
- 自托管 Roboto / Roboto Mono 字体
- 更新 README,调整并补充 Playwright 测试

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Kp1FWSg2KNQv7CgwopXfVs
@vercel

vercel Bot commented Oct 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
june-website Ready Ready Preview Oct 11, 2026 1:46am UTC

@lemonorangeapple
lemonorangeapple merged commit 0647b75 into master Oct 11, 2026
4 checks passed

This branch was successfully deployed

1 active deployment
Preview — 3a226ffe Deployed Oct 11, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants