diff --git a/packages/webawesome/docs/docs/resources/changelog.md b/packages/webawesome/docs/docs/resources/changelog.md
index f612b9714..939135ec8 100644
--- a/packages/webawesome/docs/docs/resources/changelog.md
+++ b/packages/webawesome/docs/docs/resources/changelog.md
@@ -36,6 +36,7 @@ Components with the Experimental badge sh
- Fixed a bug in `` that prevented the value from changing when assigning non-string values to `value` [issue:1323]
- Fixed a bug in `` that prevent the picker from staying in the viewport
- Fixed a bug that in `` that caused `library`, `family`, `variant` and `name` to not reflect [pr:#1395]
+- Fixed a bug in `` and `` that caused spaces to appear before and after the output [#1417]
## 3.0.0-beta.4
diff --git a/packages/webawesome/src/components/format-date/format-date.ts b/packages/webawesome/src/components/format-date/format-date.ts
index 6ff0dc2a3..c3042dabd 100644
--- a/packages/webawesome/src/components/format-date/format-date.ts
+++ b/packages/webawesome/src/components/format-date/format-date.ts
@@ -66,23 +66,22 @@ export default class WaFormatDate extends WebAwesomeElement {
return undefined;
}
- return html`
-
- `;
+ const displayDate = this.localize.date(date, {
+ weekday: this.weekday,
+ era: this.era,
+ year: this.year,
+ month: this.month,
+ day: this.day,
+ hour: this.hour,
+ minute: this.minute,
+ second: this.second,
+ timeZoneName: this.timeZoneName,
+ timeZone: this.timeZone,
+ hour12: hour12,
+ });
+
+ // No whitespace before or after
+ return html``;
}
}
diff --git a/packages/webawesome/src/components/relative-time/relative-time.ts b/packages/webawesome/src/components/relative-time/relative-time.ts
index 29969924d..79bceb0a0 100644
--- a/packages/webawesome/src/components/relative-time/relative-time.ts
+++ b/packages/webawesome/src/components/relative-time/relative-time.ts
@@ -99,7 +99,8 @@ export default class WaRelativeTime extends WebAwesomeElement {
this.updateTimeout = setTimeout(() => this.requestUpdate(), nextInterval);
}
- return html` `;
+ // No whitespace before or after
+ return html``;
}
}