Files

25 lines
670 B
JavaScript

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')
const noCapsuleStyle = buildSafeAreaCssVarsStyle({
topSafeHeight: 20,
navContentHeight: 44,
headerHeight: 64,
capsuleRightSafeWidth: 0,
})
assert.equal(noCapsuleStyle['--sq-capsule-right-safe'], '0px')
console.log('ok')