fix: center Her template sections in WeChat - #32
Merged
Conversation
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.
问题
Her 模板通过左右负 margin 扩展刊头和文末卡片。微信公众号渲染会约束区块宽度,导致负 margin 只产生左移、没有同步扩宽,最终所有居中内容相对正文中心线偏左。
Fixes #31
修改
width: 100%与水平automargin,移除横向负 margin 依赖automargin,兼容图片宽度小于容器的情况影响
WindPost 预览和微信公众号草稿中的 Her 刊头、文末卡片及正文图片将使用同一正文中心线。
验证
pnpm check