I'm trying to hide part of the ::after element of a absolute positioned div.profile-dropdown element by making the z-index of div.profile-dropdown to be 2 and the z-index of the ::after element to be smaller, 1. This doesn't work. Any help would be appreciated.
<div class="icon profile" *ngIf="logged_in">
    <i class="fa fa-user-circle"></i>
    <div class="profile-dropdown">
        <div>Profile</div>
        <div>Sign Out</div>
    </div>
</div>
Here's the SCSS:
div.profile {
    position: relative;
    .profile-dropdown {
        position: absolute;
        top: 0px;
        left: 15px;
        margin: auto;
        width: 200px;
        background-color: white;
        transform: translate(-50%, 60px);
        border: 1px solid rgb(220, 220, 220);
        z-index: 2;
        &::after {
            position: absolute;
            content: '';
            width: 10px;
            height: 10px;
            border: 1px solid rgb(220,220,220);
            z-index: 1; //z-index = -1 doesn't work either
            top: 0;
            left: 0;
            right: 0;
            margin: auto;
            transform: rotateZ(45deg) translate(-50%, -35%);
        }
    }
}
 
    