I have a drop-down list with an arrow at the top, given by a pseudo-element before:
body > nav .dropdown > menu { position: absolute; overflow: auto; max-height: calc(100vh - 150px); margin-top: 90px; border: 2px solid #aaaaaa; z-index: 9; background-color: #ffffff; } body > nav .dropdown > menu:before { content: ""; position: absolute; top: -17px; left: calc(50% - var(--caret-position)); width: 30px; height: 30px; border: solid #aaaaaa; border-width: 2px 0 0 2px; background-color: #ffffff; transform: translateX(-50%) rotate(45deg); } And I want to scroll in the list if it exceeds a certain height value. But since before is outside the bounds of the element, when you add "overflow: auto" it is hidden. Is it possible to make it not to hide without adding additional elements to html?