I have a panel that can be pinned to the right side of your screen. However some expand/collapse buttons overlaid to the very left edge of the panel are being clipped when the panel is pinned (position fixed). Screenshots of not pinned vs pinned where you can see the issue:
Not pinned:
Pinned:
I made sure to apply the fixed position to a direct child of the actual panel, .panel-inner
but the parent is overflow visible by default, so from what I understand should have any content overflow.
<div class="panel">
<div class="panel-inner">
<div class="panel-body">
<div id="some-section">
<div class="section">
<div class="toggle-section">
<div class="toggle-section-button">+</div>
</div>
<div class="section-panel">
<div class="section-panel-heading">
<span class="section-panel-heading-title">Panel Title</span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
Relevant styles:
.pinned {
position: fixed;
overflow-y: auto;
overflow-x: hidden;
height: calc(100vh - 75px);
background-color: #fff3f3;
}
.panel-body {
padding: 1.5rem 0;
}
.section {
border: 1px solid #aaa;
border-radius: 1rem;
padding: 1rem;
position: relative;
}
.toggle-section {
width: 20px;
height: 20px;
position: absolute;
left: -10px;
transform: translateY(calc(50% + 5px));
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
background: #333;
color: #fff;
font-weight: 700;
font-size: 11px;
}
And here is a working Pen: link.
You can click the button to toggle the pinned class. The scrolling doesn't quite work, but the "+" icon gets clipped, which is the issue I am experiencing in my actual site.
What am I missing? How can I have the icon overflow the ascendant panel?