Repository navigation
fix(manage): 大字体下 Mod 名左对齐并末尾省略,不再左右各切一半 - #107
Merged
std-microblock merged 2 commits intoNov 25, 2026
Merged
std-microblock merged 2 commits into
std-microblock merged 2 commits into
Conversation
Remove commented explanation for tree-name styling.
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.
问题
把界面字号调大(
--manage-font-scale)后,管理页列表里的 Mod 名会左右两端各被切掉一部分,而不是左对齐 + 末尾省略号:Celeste Consistency Tracker→eleste Consistency TrackColored Grass Asset Pack→olored Grass Asset PacDisplay Message Command→isplay Message Comman原因
1.3.0 的主题重构把按钮基样式挪进了
@layer base,并改成居中 flex 容器:管理树里的 Mod 名本身就是一个
<button class="tree-name">,它只覆盖了text-align: left和text-overflow: ellipsis,没有覆盖display/justify-content。于是:text-align不起作用,由justify-content: center居中;text-overflow在 flex 容器上不生效,没有省略号;.tree-name自身的overflow: hidden从左右各切一刀。修改
src/celemod-ui/src/routes/Manage.scss:给.tree-name显式指定display: block,恢复普通块级文本流,text-align: left+text-overflow: ellipsis重新生效。只影响这一个元素,默认字号下的渲染结果像素级不变。
验证
index.scss+Button.scss+Manage.scss编译成静态页,Chromium 按真实 DOM 渲染,--manage-font-scale: 1.7、640px 宽可以稳定复现双向裁剪;打上补丁后名字左对齐、末尾显示…。--manage-font-scale: 1下前后截图逐像素比对(ImageMagickcompare -metric AE)结果为 0,没有连带改动。vite build与tsc --noEmit均通过。遗留(可选)
窄窗口下右侧的类别 badge(如
Other/Mi)仍会被硬切;它也是inline-flex,要省略号得单独改成块级,是否一起处理可以另说。