CSS Question: using the new :has() - anyone done this before?


Okay, let’s try again…hopefully this makes more sense.

THIS is the HTML for a date in a calendar in my file, that is a link. It leads to a place in my file that has that date of the year and that has (or has not) a task:

<a aria-label-position="top" aria-label="zaterdag 01 januari" data-href="#zaterdag 01 januari" href="#zaterdag 01 januari" class="internal-link" target="_blank" rel="noopener">01</a>

THIS is the HTML for the h5 date that above link leads to:

<span class="cm-header cm-header-5">zaterdag 01 januari</span>

THIS is the HTML for the checkbox in my file that is right in front of the task’s text/description:

<input class="task-list-item-checkbox" type="checkbox" data-task=" ">

THIS is the HTML for a task in my file that actually has text:

<span class="tasks-list-text el-p" data-tag-name="p">this is a TASK</span>

THIS is the html for a task in my file that is empty:

<li data-line="0" data-task="" class="task-list-item">
<input data-line="0" type="checkbox" class="task-list-item-checkbox">


—> What CSS (including the new :has() selector) is capable of changing the link in the calendar to bold/other color, when there is actually a task that has text (so there would be a < p > rendered after the checkbox!) on the date the link leads to?

Can anyone try to write it out for me using the new :has() ?