I noticed a strange behavior and cannot understand why this is happening, since they do seem to be valid CSS class names (they pass when tested against the regex). using any other words in that pattern works, like happy-world or happy_world. I have created a Codepen here to show what I am experiencing. check here https://codepen.io/akhatri7/pen/LYxMgOz
div {
min-height: 50px;
width: 50px;
margin-bottom: 10px;
}
.sponsorlogo {
background-color: violet;
}
.sponsor-logo {
background-color: indigo;
}
.sponsor_logo {
background-color: blue;
}
.sponsor__logo {
background-color: green;
}
.happy-world {
background-color: yellow;
}
.happy_world {
background-color: red;
}
<div class="sponsorlogo"></div>
<div class="sponsor-logo"></div>
<div class="sponsor_logo"></div>
<div class="sponsor__logo"></div>
<div class="happy-world"></div>
<div class="happy_world"></div>
Using class names sponsor-logo and sponsor__logo works fine.
Can someone please explain why this could be happening?