Browse documentation
Reference / Typography
Generated content
Place a decorative symbol before or after an element with a pseudo-element variant.
Working example
Proof approved
Keep meaningful text in the HTML. Here the bullet is decorative, while the approval state is available to assistive technology.
<p class="font-mono text-sm">
<span aria-hidden="true" class="before:content-['•']"></span>
Proof approved
</p>Class reference
| Class | CSS declarations |
|---|---|
before:content-['•'] | content: '•';
--mono-content: '•'; |
after:content-['↗'] | content: '↗';
--mono-content: '↗'; |
before:content-none | content: none;
--mono-content: none; |
after:content-[attr(data-mark)] | content: attr(data-mark);
--mono-content: attr(data-mark); |
View full generated CSS
@property --mono-content {
syntax: "*";
inherits: false;
}
.after\:content-\[\'↗\'\]::after {
content: '↗';
--mono-content: '↗';
}
.after\:content-\[attr\(data-mark\)\]::after {
content: attr(data-mark);
--mono-content: attr(data-mark);
}
.before\:content-\[\'•\'\]::before {
content: '•';
--mono-content: '•';
}
.before\:content-none::before {
content: none;
--mono-content: none;
}