Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions packages/base/src/UI5Element.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,6 @@ class UI5Element extends HTMLElement {
}

async _initializeShadowRoot() {
const isCompact = getCompactSize();

if (isCompact) {
this.setAttribute("data-ui5-compact-size", "");
}

if (this.constructor.getMetadata().getNoShadowDOM()) {
return Promise.resolve();
}
Expand All @@ -82,6 +76,11 @@ class UI5Element extends HTMLElement {
}

async connectedCallback() {
const isCompact = getCompactSize();
if (isCompact) {
this.setAttribute("data-ui5-compact-size", "");
}

if (this.constructor.getMetadata().getNoShadowDOM()) {
return;
}
Expand Down