fix(report): restore the centered plus icon in the image upload box
main.css already ships the reference plus icon (.preview .add:before/:after, 25px rounded bars centered via inset:0 + margin:auto). The duplicate left/top:50% + translate version in modal-runtime.css over-constrained the same pseudo elements (right/bottom:0 + margin:auto from main.css still applied), pushing the bars to 75%/75% so only an L-shaped corner was visible. Drop the duplicate and lock the single-source contract in the report test.
This commit is contained in:
@@ -7306,25 +7306,10 @@ body.aksrt-modal-runtime-open {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
:is(.order-comment-from, .aksrt-report-modal) .form-upload .preview .add::before,
|
||||
:is(.order-comment-from, .aksrt-report-modal) .form-upload .preview .add::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
background: var(--color-ink-3, #9ca3af);
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
|
||||
:is(.order-comment-from, .aksrt-report-modal) .form-upload .preview .add::before {
|
||||
width: 22px;
|
||||
height: 2px;
|
||||
}
|
||||
|
||||
:is(.order-comment-from, .aksrt-report-modal) .form-upload .preview .add::after {
|
||||
width: 2px;
|
||||
height: 22px;
|
||||
}
|
||||
/* 加号图标不在此重复定义:main.css 已有参考主题原生实现
|
||||
(.preview .add:before/:after —— 25px 圆角杠,inset:0 + margin:auto 居中)。
|
||||
此前这里的 left/top:50% + translate 版本与该规则叠加导致过约束,
|
||||
加号被推到 75%/75% 只剩“L”形,故整体删除、统一走主样式包。 */
|
||||
|
||||
:is(.order-comment-from, .aksrt-report-modal) .form-upload .preview .preview-item img {
|
||||
width: 100%;
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -389,25 +389,10 @@ body.aksrt-modal-runtime-open {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
:is(.order-comment-from, .aksrt-report-modal) .form-upload .preview .add::before,
|
||||
:is(.order-comment-from, .aksrt-report-modal) .form-upload .preview .add::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
background: var(--color-ink-3, #9ca3af);
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
|
||||
:is(.order-comment-from, .aksrt-report-modal) .form-upload .preview .add::before {
|
||||
width: 22px;
|
||||
height: 2px;
|
||||
}
|
||||
|
||||
:is(.order-comment-from, .aksrt-report-modal) .form-upload .preview .add::after {
|
||||
width: 2px;
|
||||
height: 22px;
|
||||
}
|
||||
/* 加号图标不在此重复定义:main.css 已有参考主题原生实现
|
||||
(.preview .add:before/:after —— 25px 圆角杠,inset:0 + margin:auto 居中)。
|
||||
此前这里的 left/top:50% + translate 版本与该规则叠加导致过约束,
|
||||
加号被推到 75%/75% 只剩“L”形,故整体删除、统一走主样式包。 */
|
||||
|
||||
:is(.order-comment-from, .aksrt-report-modal) .form-upload .preview .preview-item img {
|
||||
width: 100%;
|
||||
|
||||
@@ -195,6 +195,9 @@ test('report modal mirrors the reference theme: preset reasons, image evidence,
|
||||
const css = read('assets/css/frontend/modal-runtime.css')
|
||||
assert.match(css, /\.aksrt-report-modal:not\(\.aksrt-modal-runtime--bottom\) \.aksrt-modal-runtime__dialog/)
|
||||
assert.match(css, /600px/)
|
||||
// 加号图标单一来源:main.css 的 .preview .add:before/:after(inset:0 + margin:auto),
|
||||
// modal-runtime 不得重复定义(否则过约束冲突,加号偏移只剩“L”形)。
|
||||
assert.ok(!/form-upload \.preview \.add::?(before|after)/.test(css), 'duplicated add plus rules must stay out of modal-runtime.css')
|
||||
})
|
||||
|
||||
test('comments expose a report entry for other users when reporting is enabled', () => {
|
||||
|
||||
Reference in New Issue
Block a user