Reputation: 7479
trying to create a flexible mailing list with little JS:
.email_item::after {
content: ", ";
}
resulting in:
[email protected], [email protected]
replicating with ctrl+c and ctrl+v returns:
[email protected]@mail.com
I'm going to have to use JS right? Or is there an optimizing genius out there?
Upvotes: 2
Views: 328
Reputation: 196236
Yes, generated content like :after
and :before
is for display purposes only.
It does not alter the DOM so it is not selectable..
Why use JS and not directly add the comma at the HTML ?
Quoting the specs about content
Generated content does not alter the document tree. In particular, it is not fed back to the document language processor (e.g., for reparsing).
Upvotes: 5