@@ -116,10 +116,8 @@ export default function RoundDiv({style, children, dontConvertShadow, ...props})
116116 }
117117
118118 const shapeComponentStyles = {
119- // height: boxSizing === 'border-box' ? height : height - (border.width[0] + padding[0] + border.width[2] + padding[2]),
120- // width: boxSizing === 'border-box' ? width : width - (border.width[1] + padding[1] + border.width[3] + padding[3]),
121- height,
122- width,
119+ height : boxSizing === 'border-box' ? height : height - ( border . width [ 0 ] + padding [ 0 ] + border . width [ 2 ] + padding [ 2 ] ) ,
120+ width : boxSizing === 'border-box' ? width : width - ( border . width [ 1 ] + padding [ 1 ] + border . width [ 3 ] + padding [ 3 ] ) ,
123121 padding : padding . map ( n => n + 'px' ) . join ( ' ' ) ,
124122 position : 'fixed' ,
125123 left : 0 ,
@@ -141,7 +139,7 @@ export default function RoundDiv({style, children, dontConvertShadow, ...props})
141139 clipPath : `path("${ path } ")` ,
142140 // inset shadow only
143141 boxShadow : shadows [ 1 ] . join ( ',' ) ,
144- borderRadius : radius . map ( n => ( n - 1 ) + 'px' ) . join ( ' ' ) ,
142+ borderRadius : radius . map ( n => ( n * .95 ) + 'px' ) . join ( ' ' ) ,
145143 ...( Object . fromEntries ( Object . keys ( background ) . map ( key => {
146144 return [ camelise ( key === 'null' ? 'background' : ( 'background-' + key ) ) , background [ key ] ]
147145 } ) ) ) ,
@@ -153,12 +151,11 @@ export default function RoundDiv({style, children, dontConvertShadow, ...props})
153151 clipPath : `path("${ path } ")`
154152 } } >
155153 < div style = { {
156- height,
157- width,
158- // boxSizing: 'border-box',
154+ height : height - ( widenedBorderWidth [ 0 ] + widenedBorderWidth [ 2 ] ) ,
155+ width : width - ( widenedBorderWidth [ 1 ] + widenedBorderWidth [ 3 ] ) ,
159156 transform : `translate(-${ border . width [ 3 ] } px, -${ border . width [ 0 ] } px)` ,
160157 clipPath : `path("M0,0V${ height } H${ width } V0Z${ innerPath } ")` ,
161- borderRadius : radius . map ( n => ( n - 1 ) + 'px' ) . join ( ' ' ) ,
158+ borderRadius : radius . map ( n => ( n * .95 ) + 'px' ) . join ( ' ' ) ,
162159 borderColor : border . color ,
163160 borderWidth : widenedBorderWidth . map ( v => v + 'px' ) . join ( ' ' ) ,
164161 borderStyle : border . style ,
0 commit comments