diff --git a/assets/css/app.css b/assets/css/app.css index 9c91eff..ce44cfb 100644 --- a/assets/css/app.css +++ b/assets/css/app.css @@ -4935,6 +4935,40 @@ button.btn, a.btn, summary.btn, .seg-btn, .icon-btn, .rv-act-btn, .cs-btn, .bf-b /* 隐藏中的条目淡一点,一眼能看出"它还在、只是不显示" */ .nav-sortrow.is-off { opacity: .55; } .nav-sortrow.is-dragging { box-shadow: var(--shadow-l); border-color: var(--brand-2); } + +/* ------------------------------------------------------------ + 地址设置:「我的短语」表单(工单 #17) + + 🔴 为什么不用 `.inline-form`(用户 2026-10-28:「输入框怎么那么高啊」): + `.inline-form .input { flex: 1 1 200px }` 是为「input 直接当水平 flex 子项」 + 设计的。本表单要把 label / input / tip 竖直堆叠,input 必须包进 `.field` + (`flex-direction: column`)—— 一包进去,`flex-basis: 200px` 就落在 + **垂直主轴**上,输入框被撑成 200px 高的一条。 + + 做法:外层横向 flex(左:输入区,右:按钮),只把**输入区**当 flex 子项; + 输入区内部仍走 `.field` 的纵向堆叠,并显式把 `.input` 的 flex 收回默认。 + ⚠️ 不要改 `.inline-form` 那条通用规则:全站另有 15 处在用,且都是 + "input 直接当子项"的正确用法,改它会波及那些页面。 + ------------------------------------------------------------ */ +.nav-phrase-form { + display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; + margin: 0; +} +/* 输入区是横向主轴上的那个伸缩项(宽度在这里定,不是让内部 input 定) */ +.nav-phrase-form > .field { flex: 1 1 260px; min-width: 0; max-width: 380px; } +/* 🔴 关键:把 input 从"flex 子项"退化成普通块,否则 flex-basis 又跑到垂直轴上 */ +.nav-phrase-form > .field > .input { + flex: 0 0 auto; width: 100%; max-width: none; + /* 单行高度:与全站 .input 一致(10px 上下 padding + 14px 字 + 1px 边框) */ + height: auto; min-height: 0; +} +/* 按钮跟输入框底对齐(不是与整块 field 居中)—— tip 在下方,居中会显得按钮浮起来 */ +.nav-phrase-form > .btn-row { flex: 0 0 auto; margin: 0; align-self: flex-end; } +/* 窄屏:按钮换到下一行并靠左,不挤压输入框 */ +@media (max-width: 480px) { + .nav-phrase-form > .field { flex: 1 1 100%; max-width: none; } + .nav-phrase-form > .btn-row { width: 100%; } +} .nav-drag { flex: 0 0 auto; cursor: grab; color: var(--faint); font-size: 13px; letter-spacing: -1px; user-select: none; padding: 0 2px; diff --git a/templates/nav/index.php b/templates/nav/index.php index 933e5dc..8c3c882 100644 --- a/templates/nav/index.php +++ b/templates/nav/index.php @@ -169,7 +169,19 @@ $setItems = [

-
+ +