fix(resume): 用 justify-content/float 替代 flex margin-left:auto,修复新版 WeasyPrint 右对齐失效#35
Open
Rand01ph wants to merge 1 commit into
Open
fix(resume): 用 justify-content/float 替代 flex margin-left:auto,修复新版 WeasyPrint 右对齐失效#35Rand01ph wants to merge 1 commit into
Rand01ph wants to merge 1 commit into
Conversation
…rgin auto WeasyPrint 63.1 ignores flex auto-margins, so `.proj-role` and `.section-title .sub` no longer get pushed to the right edge and end up mid-line. kami's shipped demo renders are correct, so a recent WeasyPrint version changed this behavior. Use `justify-content: space-between` for the section sub and `float: right` for the role tag (proj-head becomes block; proj-kind keeps its gap via a small margin). Both techniques render identically across WeasyPrint versions and browsers. Affects resume.html, resume-en.html, resume-ko.html — CSS only, no content or structure change. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
@Rand01ph is attempting to deploy a commit to the Tw93 Team on Vercel. A member of the Team first needs to authorize it. |
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.
背景
见 #34。
.proj-role与.section-title .sub依赖 flexmargin-left:auto右对齐;当前 WeasyPrint(63.1)不支持 flex auto margin,导致角色标签与章节副标题挤在行中(仓库自带 demo 的参考渲染是正确的,详见 issue 截图对比)。改动(仅 CSS,3 个模板)
resume.html/resume-en.html/resume-ko.html:.section-title加justify-content: space-between;.sub去掉margin-left:auto.proj-head由flex改block;.proj-role由margin-left:auto改float:right;.proj-kind补margin-left:1.5mm以保留与项目名的间距兼容性
justify-content:space-between与float:right在所有 WeasyPrint 版本与主流浏览器都支持,旧版渲染不受影响。验证
用 WeasyPrint 63.1 渲染
resume.html,.proj-role与.section-title .sub恢复右对齐。仅 CSS 改动,不动内容与结构。🤖 Generated with Claude Code