Skip to content

Commit 488f373

Browse files
authored
Properties: Implement container queries (#20832)
implement container queries for properties
1 parent 35acfcb commit 488f373

File tree

2 files changed

+15
-14
lines changed

2 files changed

+15
-14
lines changed

src/Umbraco.Web.UI.Client/src/packages/content/content-type/workspace/views/design/content-type-design-editor-property.element.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ export class UmbContentTypeDesignEditorPropertyElement extends UmbLitElement {
351351
grid-column: span 2;
352352
}
353353
354-
@container (width > 600px) {
354+
@container (width > 700px) {
355355
:host(:not([orientation='vertical'])) > div {
356356
grid-column: span 1;
357357
}

src/Umbraco.Web.UI.Client/src/packages/core/property/components/property-layout/property-layout.element.ts

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -105,29 +105,30 @@ export class UmbPropertyLayoutElement extends UmbLitElement {
105105
grid-template-columns: 200px minmax(0, 1fr);
106106
column-gap: var(--uui-size-layout-2);
107107
padding: var(--uui-size-layout-1) 0;
108+
container-type: inline-size;
108109
}
109110
110111
:host > div {
111112
grid-column: span 2;
112113
}
113114
114-
/*@container (width > 600px) {*/
115-
:host(:not([orientation='vertical'])) > div {
116-
grid-column: span 1;
115+
@container (width > 700px) {
116+
:host(:not([orientation='vertical'])) > div {
117+
grid-column: span 1;
118+
}
117119
}
118-
/*}*/
119120
120121
#headerColumn {
121122
position: relative;
122123
height: min-content;
123124
top: var(--umb-property-layout-header-top);
124125
}
125-
/*@container (width > 600px) {*/
126-
:host(:not([orientation='vertical'])) #headerColumn {
127-
position: sticky;
128-
top: var(--umb-property-layout-header-top, calc(var(--uui-size-space-2) * -1));
126+
@container (width > 700px) {
127+
:host(:not([orientation='vertical'])) #headerColumn {
128+
position: sticky;
129+
top: var(--umb-property-layout-header-top, calc(var(--uui-size-space-2) * -1));
130+
}
129131
}
130-
/*}*/
131132
132133
:host {
133134
/* TODO: Temp solution to not get a yellow asterisk when invalid. */
@@ -160,11 +161,11 @@ export class UmbPropertyLayoutElement extends UmbLitElement {
160161
#editorColumn {
161162
margin-top: var(--uui-size-space-3);
162163
}
163-
/*@container (width > 600px) {*/
164-
:host(:not([orientation='vertical'])) #editorColumn {
165-
margin-top: 0;
164+
@container (width > 700px) {
165+
:host(:not([orientation='vertical'])) #editorColumn {
166+
margin-top: 0;
167+
}
166168
}
167-
/*}*/
168169
`,
169170
];
170171
}

0 commit comments

Comments
 (0)