Skip to content

Commit

Permalink
remove hacky css
Browse files Browse the repository at this point in the history
  • Loading branch information
lookacat committed May 10, 2023
1 parent 96eea8a commit 8aa0e2b
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions packages/web-app-files/src/components/AppBar/AppBar.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<template>
<div id="files-app-bar" ref="filesAppBar" :class="{ 'files-app-bar-squashed': sideBarOpen }">
<oc-hidden-announcer :announcement="selectedResourcesAnnouncement" level="polite" />
<div style="height: 114px"></div>
<div class="files-topbar oc-py-s">
<h1 class="oc-invisible-sr" v-text="pageTitle" />
<div
Expand Down Expand Up @@ -189,8 +188,12 @@ export default defineComponent({
const calculateBreadcrumbMaxWidth = () => {
const leftControlsWidth = document.getElementById('files-app-bar-controls-right')?.clientWidth
const appBarTotalWidth =
document.getElementById('files-app-bar')?.clientWidth - (leftControlsWidth + 20)
return appBarTotalWidth - leftControlsWidth
document.getElementById('files-view')?.parentElement?.clientWidth - leftControlsWidth * 2
const breadcrumbMaxWidth = appBarTotalWidth - leftControlsWidth
document
.getElementById('oc-breadcrumb')
?.style.setProperty('--max-width', `${breadcrumbMaxWidth}px`)
return breadcrumbMaxWidth
}
return {
Expand Down Expand Up @@ -303,10 +306,4 @@ export default defineComponent({
min-height: 2rem;
}
}
.files-topbar {
position: absolute;
left: var(--oc-space-medium);
right: var(--oc-space-medium);
top: 0;
}
</style>

0 comments on commit 8aa0e2b

Please sign in to comment.