refactor(miniprogram): reuse safe-area CSS builder in applySafeAreaCssVars

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
wuzilongandCursor committed 2026-09-12 18:50:23 +08:00
1 parent cfe0f94467
commit 49ec2418a2
2 files changed
+13 -4

No files matched your search

@@ -12,4 +12,13 @@ assert.equal(style['--sq-safe-top'], '44px')
assert.equal(style['--sq-nav-height'], '40px')
assert.equal(style['--sq-header-height'], '84px')
assert.equal(style['--sq-capsule-right-safe'], '96px')
const noCapsuleStyle = buildSafeAreaCssVarsStyle({
topSafeHeight: 20,
navContentHeight: 44,
headerHeight: 64,
capsuleRightSafeWidth: 0,
})
assert.equal(noCapsuleStyle['--sq-capsule-right-safe'], '0px')
console.log('ok')