this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Safe to reuse getComputedStyle

+1 -1
+1 -1
src/utils/safe-bounding-box-padding.jsx
··· 1 1 import mem from 'mem'; 2 2 3 3 const root = document.documentElement; 4 + const style = getComputedStyle(root); 4 5 const defaultBoundingBoxPadding = 8; 5 6 function _safeBoundingBoxPadding() { 6 7 // Get safe area inset variables from root 7 - const style = getComputedStyle(root); 8 8 const safeAreaInsetTop = style.getPropertyValue('--sai-top'); 9 9 const safeAreaInsetRight = style.getPropertyValue('--sai-right'); 10 10 const safeAreaInsetBottom = style.getPropertyValue('--sai-bottom');