We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent da1c430 commit 0f3b8e4Copy full SHA for 0f3b8e4
packages/base/src/UI5Element.js
@@ -57,12 +57,6 @@ class UI5Element extends HTMLElement {
57
}
58
59
async _initializeShadowRoot() {
60
- const isCompact = getCompactSize();
61
-
62
- if (isCompact) {
63
- this.setAttribute("data-ui5-compact-size", "");
64
- }
65
66
if (this.constructor.getMetadata().getNoShadowDOM()) {
67
return Promise.resolve();
68
@@ -82,6 +76,11 @@ class UI5Element extends HTMLElement {
82
76
83
77
84
78
async connectedCallback() {
79
+ const isCompact = getCompactSize();
80
+ if (isCompact) {
81
+ this.setAttribute("data-ui5-compact-size", "");
+ }
+
85
86
return;
87
0 commit comments