Skip to content

Commit

Permalink
fix(Editor): fix editor width when sidebar is hidden (#2014)
Browse files Browse the repository at this point in the history
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
  • Loading branch information
meteyou and sourcery-ai[bot] authored Sep 15, 2024
1 parent f4ee321 commit 3b4de5f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/components/TheEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
:name="filename"
:file-extension="fileExtension"
class="codemirror"
:class="{ withSidebar: fileStructureSidebar }"
@lineChange="lineChanges" />
<div v-if="fileStructureSidebar" class="d-none d-md-flex structure-sidebar">
<v-treeview
Expand Down Expand Up @@ -524,10 +525,14 @@ export default class TheEditor extends Mixins(BaseMixin) {
}
@media screen and (min-width: 960px) {
.codemirror {
.codemirror:not(.withSidebar) {
width: 100%;
}
.codemirror.withSidebar {
width: calc(100% - 300px);
}
}
.structure-sidebar {
width: 300px;
overflow-y: auto;
Expand Down

0 comments on commit 3b4de5f

Please sign in to comment.