I have an HTML page that uses h-entries to store "conversations". I would like to style messages (h-entry) differently for each person in the conversation (i.e. like on iOS how one sender has blue messages and another has grey). In order to do so, I need to select the h-entry of a given "user". The user is defined in the <a>
tag with their name. So I am trying to use CSS selectors as such, but I've had no luck:
.h-entry[a[href="name_of_person"]]{
background-color: #acbd
}
Note: I need to select the h-entry and NOT the specific <a>
tag.
A typical h-entry looks like this:
<div class="h-entry">
<time class="dt-published" datetime="yyyy-mm-dd:hh:mm:ss">yyyy-mm-dd hh:mm:ss</time>
<a href="identifier" class="p-author h-card">user_name</a>
<span class="e-content p-name">message content</span>
</div>
I'd like to select all h-entries who have a specific "identfier"
value