feat(miniprogram): add safe-area CSS vars style builder

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
wuzilongandCursor committed 2026-09-12 18:48:57 +08:00
1 parent 0599b7a3a9
commit cfe0f94467
3 files changed
+31

No files matched your search

@@ -0,0 +1,15 @@
import assert from 'node:assert/strict'
import { buildSafeAreaCssVarsStyle } from '../safeAreaCss.js'
const style = buildSafeAreaCssVarsStyle({
topSafeHeight: 44,
navContentHeight: 40,
headerHeight: 84,
capsuleRightSafeWidth: 96,
})
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')
console.log('ok')