0

I'm experimenting with SASS and SCSS and I'd like to know how to add targeting for specific table cells.

I have the following Calendar widget:
enter image description here

On the 24th, it has a blue overlay, which has a linked <a> tag, but it doesn't have a defined class as shown.

Here is the HTML:
enter image description here

I have the following SCSS:

.widget {
  margin: 0 0 1.5rem;

  &.widget_calendar {
    table {
      width: 100%;
      border-collapse: collapse;

      caption {
        font-weight: bold;
        margin-bottom: 10px;
      }

      td, th {
        border: 1px #f1efef solid;
        padding: 5px;
        text-align: center;
      }
    }
  }
}

Problem:
How could I apply a background color to a <td> that has a <a> tag followed? I can't seem to figure it out, all help is appreciated.

Ahmad Habib
  • 1,190
  • 5
  • 20
DevSem
  • 412
  • 1
  • 8

0 Answers0