Skip to content

Commit d14edfd

Browse files
committed
fix: properly handle content
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
1 parent d1340ae commit d14edfd

2 files changed

Lines changed: 10 additions & 8 deletions

File tree

apps/settings/src/components/SettingsColumn.vue

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,26 @@
99
</div>
1010
</template>
1111

12+
<style>
13+
#content:has(#app-navigation-vue[aria-hidden="true"]) .settings-column {
14+
--settings-column-inset: var(--body-container-margin);
15+
}
16+
</style>
17+
1218
<style lang="scss" scoped>
1319
.settings-column {
1420
// Wide enough for the per-row action icons to sit outside the field boxes.
15-
--settings-column-gutter: calc(var(--default-clickable-area) + 8px);
21+
--settings-column-gutter: calc(var(--default-clickable-area) + 2 * var(--default-grid-baseline));
1622
--settings-column-width: calc(700px + 2 * var(--settings-column-gutter));
1723
--settings-column-inset: calc(var(--body-container-margin) + var(--navigation-width));
24+
--settings-column-margin: max(0px, calc((100vw - var(--settings-column-width)) / 2 - var(--settings-column-inset)));
1825
box-sizing: border-box;
1926
width: 100%;
2027
max-width: var(--settings-column-width);
2128
// Starts the fields where the header search field starts. Centring would
2229
// centre on the app content, which the navigation pushes off the viewport
2330
// centre the search sits on.
24-
margin-inline: clamp(0px, calc(var(--unified-search-inline-start) - var(--settings-column-inset) - var(--settings-column-gutter)), calc(100% - var(--settings-column-width))) auto;
31+
margin-inline: var(--settings-column-margin) auto;
2532
padding-inline: var(--settings-column-gutter);
2633
2734
// The section's own inline margin and width cap would inset the fields from
@@ -33,10 +40,6 @@
3340
}
3441
}
3542
36-
#content:has(.app-navigation--closed) .settings-column {
37-
--settings-column-inset: var(--body-container-margin);
38-
}
39-
4043
// The navigation overlays the content here, so there is no offset to undo.
4144
@media only screen and (width < 1024px) {
4245
.settings-column {

core/css/header.scss

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@
1212
:root {
1313
// Only valid where the header renders a search bar rather than a button: the
1414
// user and settings layouts, from 512px up.
15-
--unified-search-width: clamp(200px, 35vw, 600px);
16-
--unified-search-inline-start: calc((100vw - var(--unified-search-width)) / 2);
15+
--unified-search-width: clamp(200px, 35vw, 700px);
1716
}
1817

1918
/* Skip navigation links – show only on keyboard focus */

0 commit comments

Comments
 (0)