diff --git a/__snapshots__/calendar.md b/__snapshots__/calendar.md
index 545f63aee..426123a58 100644
--- a/__snapshots__/calendar.md
+++ b/__snapshots__/calendar.md
@@ -12,11 +12,11 @@
role="columnheader"
tabindex="-1"
>
-
em {
+ position: absolute;
font: inherit;
- justify-self: flex-start;
-
+ @supports (inset: 0) {
+ inset-inline-start: 0;
+ }
+ @supports not (inset: 0) {
+ left: 0;
+ }
}
-
> small {
@include typography.typography-cat-shorthand('caption');
text-transform: uppercase;
}
}
}
-
}
+
.calendar-row {
display: contents;
}
@@ -148,7 +128,11 @@ ol {
position: relative;
grid-column: var(--column);
grid-row: 1 / #{calendar-variables.$total-rows + 1};
-
+ @for $i from 1 through calendar-variables.$total-columns {
+ &:nth-child(#{$i}) {
+ --column: #{$i};
+ }
+ }
&:not(:first-child)::after {
position: absolute;
block-size: 100%;
@@ -156,11 +140,6 @@ ol {
content: '';
margin-inline-start: -1px;
}
- @for $i from 1 through calendar-variables.$total-columns {
- &:nth-child(#{$i}) {
- --column: #{$i};
- }
- }
}
}
diff --git a/components/calendar/src/vwc-calendar.ts b/components/calendar/src/vwc-calendar.ts
index 1e9a1a736..b3f1766b5 100644
--- a/components/calendar/src/vwc-calendar.ts
+++ b/components/calendar/src/vwc-calendar.ts
@@ -205,8 +205,8 @@ export class VWCCalendar extends LitElement {
${this.getDaysArr([getFirstDateOfTheWeek(this.datetime)])
.map(date => html`
-
-
+
+
`)}
`;
}
diff --git a/components/calendar/test/calendar.test.js b/components/calendar/test/calendar.test.js
index c796bbc2b..5d6629342 100644
--- a/components/calendar/test/calendar.test.js
+++ b/components/calendar/test/calendar.test.js
@@ -229,7 +229,7 @@ describe('calendar', () => {
gridCell.dispatchEvent(new MouseEvent('click', { composed: true, clientX: 20, clientY: 54 }));
expect(context.day).to.equal(2);
- expect(context.hour).to.equal(0.2);
+ expect(context.hour).to.equal(0.53);
});
it('should return day and hour from keyboard \'space\'', async () => {
diff --git a/ui-tests/snapshots/vwc-calendar.png b/ui-tests/snapshots/vwc-calendar.png
index 3ae801306..cefa48aef 100644
Binary files a/ui-tests/snapshots/vwc-calendar.png and b/ui-tests/snapshots/vwc-calendar.png differ