.custom-grid-mask { position: relative; height: 100%; width: 100%; background-color: white; } .custom-grid-mask::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(to right, #4f4f4f2e 1px, transparent 1px), linear-gradient(to bottom, #4f4f4f2e 1px, transparent 1px); background-size: 96px 96px; mask-image: radial-gradient(ellipse 80% 50% at 50% 0%, #000 70%, transparent 110%); -webkit-mask-image: radial-gradient(ellipse 80% 50% at 50% 0%, #000 70%, transparent 110%); }