Skip to content

Commit 882f09a

Browse files
authored
feat: change look of current day (#380)
1 parent 7d91202 commit 882f09a

File tree

3 files changed

+46
-30
lines changed

3 files changed

+46
-30
lines changed

dist/atomic-calendar-revive.js

Lines changed: 32 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "atomic-calendar-revive",
3-
"version": "3.0.0",
3+
"version": "3.1.0",
44
"editor_version": "1.3.0",
55
"description": "Calendar Card for Home Assistant",
66
"main": "atomic-calendar-revive.js",

src/index.ts

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -444,9 +444,17 @@ class AtomicCalendarRevive extends LitElement {
444444
margin: auto;
445445
}
446446
447-
td.currentDay {
448-
color: var(--paper-item-icon-active-color);
449-
background-color: ${this._config.calEventBackgroundColor};
447+
.calDay.currentDay {
448+
height: 20px;
449+
background-color: var(--primary-color);
450+
border-radius: 50%;
451+
display: inline-block;
452+
text-align: center;
453+
white-space: nowrap;
454+
width: max-content;
455+
min-width: 20px;
456+
line-height: 140%;
457+
color: var(--text-primary-color) !important;
450458
}
451459
452460
tr.cal {
@@ -1301,10 +1309,10 @@ class AtomicCalendarRevive extends LitElement {
13011309
${i % 7 === 0 ? html`<tr class="cal"></tr>` : ''}
13021310
<td
13031311
@click="${(_e) => this.handleEventSummary(day)}"
1304-
class="cal ${dayClassToday}"
1312+
class="cal"
13051313
style="${dayStyleOtherMonth}${dayStyleSat}${dayStyleSun}${dayStyleClicked}"
13061314
>
1307-
<div class="calDay">
1315+
<div class="calDay ${dayClassToday}">
13081316
<div style="position: relative; top: 5%;">${day.dayNumber.replace(/^0|[^/]0./, '')}</div>
13091317
<div>${this.handleCalendarIcons(day)}</div>
13101318
</div>

0 commit comments

Comments
 (0)