Tidy up pseudo-element references

This commit is contained in:
Angelos Chalaris
2022-11-05 13:01:58 +02:00
parent 38468678f5
commit 20100fd229
19 changed files with 56 additions and 56 deletions

View File

@ -11,14 +11,14 @@ Displays the link URL for links with no text.
- Use the `:empty` pseudo-class to select links with no text.
- Use the `:not` pseudo-class to exclude links with text.
- Use the `content` property and the `attr()` function to display the link URL in the `:before` pseudo-element.
- Use the `content` property and the `attr()` function to display the link URL in the `::before` pseudo-element.
```html
<a href="https://30secondsofcode.org"></a>
```
```css
a[href^="http"]:empty:before {
a[href^="http"]:empty::before {
content: attr(href);
}
```