I stumbled upon a package that has no js or html, only css and it defines a custom element which can be used in html:
<status-indicator active pulse></status-indicator>
The only declaration I see for this is in the css file:
status-indicator {
display: inline-block;
border-radius: 50%;
cursor: pointer;
width: var(--status-indicator-size);
height: var(--status-indicator-size);
background-color: var(--status-indicator-color);
}
This is the package: https://www.npmjs.com/package/status-indicator
For the sake of learning - could anyone explain how and why this works or where should I refer to read about it?