fix: subnav with scrolling sticky table

This commit is contained in:
Torsten Dittmann
2024-08-08 16:59:19 +02:00
parent 5f7a0fbb71
commit abbd2a271b
4 changed files with 17 additions and 9 deletions
+1 -8
View File
@@ -24,7 +24,7 @@
};
</script>
<TableCell class="u-position-relative">
<TableCell>
<div
class="touch-area"
role="button"
@@ -39,10 +39,3 @@
{disabled}
on:click={handleClick} />
</TableCell>
<style lang="scss">
.touch-area {
position: absolute;
inset: 0;
}
</style>
+1 -1
View File
@@ -7,7 +7,7 @@
export let transparent = false;
export let noStyles = false;
export let dense = false;
let classes: string = undefined;
let classes: string = '';
export { classes as class };
let isOverflowing = false;
+3
View File
@@ -46,6 +46,9 @@
isOpen = false;
$showSupportModal = true;
}
$: window.document.body.dataset.isNarrow = String(narrow);
$: window.document.body.dataset.hasSubNavigation = String(hasSubNavigation);
</script>
<svelte:window on:keydown={handleKeyDown} />
+12
View File
@@ -78,6 +78,18 @@
</main>
<style lang="scss">
:global([data-has-sub-navigation='true']) {
&:global([data-is-narrow='false']) {
main {
--p-side-size: 25rem; // 12.5rem + 12.5rem
}
}
&:global([data-is-narrow='true']) {
main {
--p-side-size: 17rem; // 12.5rem + 4.5rem
}
}
}
main {
min-height: 100vh;