liamcain / obsidian-calendar-plugin

Simple calendar widget for Obsidian.
MIT License
1.64k stars 142 forks source link

Weekend Background-Color without rounded corners? #363

Closed boris-df closed 5 months ago

boris-df commented 5 months ago

I'm aware that i can color the background of the weekend days in two ways: a) with

#calendar-container {
  --color-background-weekend: #eeeeee;

or b) with

#calendar-container .weekend {
  background-color: var(--background-primary-alt);
}

This works, but there are rounded corners around each day. image

Is there a way to make the weekend look like a solid "rectange"? For example, remove the corner-radius from the weekend-days (if they doesn't have any margins it should look as solid area then)?

(i'm using the "Minimal"-Theme if this makes a difference)

Oh, and for the screenshot if someone asks how i made the "Today" having a background-Color: I changed that like this (because with the default settings and the "Minimal"-Theme i could hardly see the "Today"

#calendar-container .today {
  color: var(--background-primary);
  background-color: var(--interactive-accent);
  font-weight: 600;
}
#calendar-container .today .dot {
  fill: var(--interactive-accent);
}

#calendar-container .weekend {
  background-color: var(--background-primary-alt);
}
believer commented 5 months ago

This is related to the minimal theme. I've fixed it by removing the border radius from the last two table cells.

/* Remove the border radius from the second-to-last and last cells in the calendar. */
#calendar-container tr td:nth-last-child(2),
#calendar-container tr td:last-child {
  border-radius: 0;
}

Note that you may need to adjust the selectors if your week does not start on Monday.

boris-df commented 5 months ago

image

That's fantastic!! Thank you very much :)