Skip to content

Keep the demo page's body style out of the package - #38

Merged
snakajima merged 1 commit into
mainfrom
fix/demo-only-body-style
Sep 30, 2026
Merged

snakajima merged 1 commit into
mainfrom
fix/demo-only-body-style

Conversation

@snakajima

Copy link
Copy Markdown
Contributor

src/style.css is the package's dist/style.css, which hosts import into their own page (import "…/style.css", and src/vue/index.ts / src/react/index.ts import it). It also carried the Vue demo page's style:

body {
  @apply m-0 p-5 font-sans bg-gray-100;
}

so every plugin made from this template restyles the host's <body>. In MulmoChat 11 packages ship it (avatar, drawing-game, mindmap, piano, scroll-to-anchor, set-image-style, switch-role, generate-image, quiz, summarize-pdf, akinator): it padded the whole app by 20px (the page scrolled 42px in an 800px window) and set its background and font. MulmoGlass got it from mindmap and quiz. Both apps now override it (receptron/MulmoChat#247, receptron/mulmoglass#26), but the fix belongs here.

Change

  • src/style.css: only @import "tailwindcss";, with a comment on why it must not style body, html or :root.
  • demo/vue/style.css (new, imported by demo/vue/main.ts): the demo page's body style, in plain CSS, so the demo looks as before. The React demo already had its own demo/react/style.css.
  • TEMPLATE.md (en/ja) and docs/ai-development-guide.md state the rule.

Plugins already made from the template need the same change and a new release.

Test

  • yarn typecheck, yarn lint, yarn build: dist/style.css has no body rule any more.
  • The Vue demo (vite) in headless Chrome: body padding 20px, background rgb(243, 244, 246), system sans font — as before.

🤖 Generated with Claude Code

work in chat

src/style.css ships as dist/style.css, which hosts import into their own
page, and it styled body (m-0 p-5 font-sans bg-gray-100) for the Vue
demo. Every plugin made from the template passed that on: in MulmoChat
and MulmoGlass it padded the whole app by 20px and set its background.
The rule moves to demo/vue/style.css, and the guides say not to style
body, html or :root in src/style.css.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@snakajima
snakajima merged commit 2aad25a into main Sep 30, 2026
11 checks passed
@snakajima
snakajima deleted the fix/demo-only-body-style branch September 30, 2026 14:10
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.

1 participant