<div class="logo">
<h1>
Hidd<span>e</span>n
<br>
Br<span>a</span>in
</h1>
</div>
/*
Tutorial:
https://geoffgraham.me/hidden-brain-podcast-logo-in-css/
*/
* {
margin: 0;
padding: 0;
}
.logo {
--color-bkg: #22315c;
--color-text: #fff;
--letter-mask: url(https://assets.codepen.io/9632/letter-e.svg);
--m-start: 0.625rem;
--m-end: -1.5625rem;
background-color: var(--color-bkg);
display: grid;
height: 100vh;
place-items: center;
}
.logo h1 {
color: var(--color-text);
font-family: Roboto, sans-serif;
font-size: 6rem;
line-height: 0.85;
text-align: center;
text-transform: uppercase;
}
.logo span {
background-color: var(--color-text);
display: inline-flex;
line-height: 0.55;
margin-inline: var(--m-start) var(--m-end);
mask-image: var(--letter-mask);
mask-repeat: no-repeat;
mask-size: contain;
}
span:nth-child(3) {
--letter-mask: url(https://assets.codepen.io/9632/letter-a.svg);
padding: 0.4rem;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.