From 8fcb136d55a4cd61903d9fcd0ed71e50f8f66850 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 4 Oct 2026 22:51:21 +0800 Subject: [PATCH] fix(identity): draw intro list markers inside list items --- assets/css/routes/user-center/settings.css | 31 ++++++++++++++++------ assets/js/routes/user-center-auth.js | 7 ----- 2 files changed, 23 insertions(+), 15 deletions(-) diff --git a/assets/css/routes/user-center/settings.css b/assets/css/routes/user-center/settings.css index 00cdeed1..4033bbd9 100644 --- a/assets/css/routes/user-center/settings.css +++ b/assets/css/routes/user-center/settings.css @@ -612,19 +612,34 @@ } .uc-auth-form { margin: 0; } .uc-auth-form__scroll { max-height: 50vh; max-height: 50dvh; } +/* 申请介绍的列表:标记随列表项内容一起绘制(悬挂缩进), + 不会被外层滚动区的左边界裁掉一半。 */ .uc-auth-intro ul, .uc-auth-intro ol { margin: .6em 0 1em; - padding-left: 1.5em; + padding-left: 0; + list-style: none !important; } -.uc-auth-intro ul { list-style: disc outside; } -.uc-auth-intro ol { list-style: decimal outside; } -.uc-auth-intro li { margin-bottom: .35em; } -.uc-auth-form__scroll .uc-auth-intro ul, -.uc-auth-form__scroll .uc-auth-intro ol { - padding-left: .5em; - list-style-position: inside; +.uc-auth-intro li { + margin-bottom: .35em; + padding-left: 1.25em; + text-indent: -1.25em; } +.uc-auth-intro li::before { + content: "\2022"; + display: inline-block; + width: 1.25em; + text-indent: 0; +} +.uc-auth-intro ol { counter-reset: uc-auth-intro; } +.uc-auth-intro ol li::before { + content: counter(uc-auth-intro) "."; + counter-increment: uc-auth-intro; + width: auto; + min-width: 1.25em; +} +.uc-auth-intro li > ul, +.uc-auth-intro li > ol { margin: .35em 0 0 1.25em; } .uc-auth-field { display: block; color: var(--muted-2-color); font-size: .9em; font-weight: 400; } .uc-auth-field__label { display: block; margin-bottom: 6px; } .uc-auth-form .form-control { width: 100%; box-sizing: border-box; } diff --git a/assets/js/routes/user-center-auth.js b/assets/js/routes/user-center-auth.js index eaabc7f8..b5d2c475 100644 --- a/assets/js/routes/user-center-auth.js +++ b/assets/js/routes/user-center-auth.js @@ -41,13 +41,6 @@ var input = form && form.querySelector('[data-auth-evidence]'); var preview = form && form.querySelector('[data-auth-preview]'); if (!form || !input || !preview) return; - Array.prototype.forEach.call(form.querySelectorAll('ul, ol'), function (list) { - var listStyle = list.tagName.toLowerCase() === 'ol' ? 'decimal' : 'disc'; - list.style.setProperty('list-style-type', listStyle, 'important'); - list.style.setProperty('list-style-position', 'inside', 'important'); - list.style.setProperty('padding-left', '8px', 'important'); - list.style.setProperty('margin-left', '0', 'important'); - }); shell.setAttribute('aria-labelledby', 'uc-auth-modal-title'); var selectedFiles = [];