JSFiddle - React, Tailwind, and code Playground

HTML

<div id='parent'>

<div id='calcWidth'>
    
    
</div>
</div>

CSS

#parent{
    width:100px;
    
}
#calcWidth{
    width:calc(100% - 3px);
    height:100px;
    background:red;
  

}