Keep the demo page's body style out of the package - #38
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
src/style.cssis the package'sdist/style.css, which hosts import into their own page (import "…/style.css", andsrc/vue/index.ts/src/react/index.tsimport it). It also carried the Vue demo page's style: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 stylebody,htmlor:root.demo/vue/style.css(new, imported bydemo/vue/main.ts): the demo page's body style, in plain CSS, so the demo looks as before. The React demo already had its owndemo/react/style.css.TEMPLATE.md(en/ja) anddocs/ai-development-guide.mdstate 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.csshas nobodyrule any more.vite) in headless Chrome: body padding 20px, background rgb(243, 244, 246), system sans font — as before.🤖 Generated with Claude Code
work in chat