Pseudo-elements in CSS
Generated boxes before and after content, plus the ones for text and UI.
.tag::before {
content: "#";
opacity: 0.6;
}
.required::after {
content: " *";
color: #e5484d;
}
::selection {
background: #7c5cff;
color: #fff;
}
dialog::backdrop {
background: rgb(0 0 0 / 55%);
}
How it works
contentis required for::beforeand::afterto render.- Decorative generated content should be empty to screen readers.
::placeholder,::selectionand::backdropstyle browser parts.
Keywords and builtins used here
backgroundcolorcontentopacityrequiredrgbtag
The run, in numbers
- Lines
- 18
- Characters to type
- 200
- Tokens
- 57
- Three-star pace
- 90 tpm
At the three-star pace of 90 tokens a minute, this run takes about 38 seconds.
Step 1 of 2 in Generated content, step 19 of 21 in Responsive & modern CSS.