Is there a way to set the height of a div to "fit-content minus 15px" without using JavaScript? I attempted to use calc(), but it did not yield the desired result.
My objective is to dynamically adjust the height of an element containing multiple p tags, each with a border-bottom. I need to hide the border of the last p tag due to framework limitations that do not allow the use of last-child or last-of-type selectors. Thus, I am attempting to shorten the container's height to achieve this.
.wrapper {
width: 100px;
background: red;
height: calc(fit-content - 15px)
}
.child {
height: 100px;
width: 50px;
background: blue;
}
<div class="wrapper">
<div class="child"></div>
</div>
P.S. I am utilizing Sass in this project, although I am not very familiar with it.