Skip to content

Commit

Permalink
fix: Sidebar should not resize based on content
Browse files Browse the repository at this point in the history
  • Loading branch information
dstoc committed Oct 20, 2024
1 parent 18ce283 commit d608b66
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/markdown/style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export const styles = [
text-decoration: line-through;
}
md-span[type='code_span'] {
white-space: pre;
white-space: pre-wrap;
font-family: monospace;
}
`,
Expand All @@ -81,7 +81,7 @@ export const styles = [
margin-block: 0;
display: grid;
grid-template-columns: auto 1fr;
grid-template-columns: auto minmax(0, 1fr);
align-items: baseline;
}
md-block[type='list-item']::before {
Expand Down Expand Up @@ -172,6 +172,8 @@ export const styles = [
}
md-block {
background-color: var(--md-selection-override-bgcolor);
display: grid;
grid-template-columns: minmax(0, 1fr);
}
`,
// Overridable styles.
Expand Down
3 changes: 2 additions & 1 deletion src/sidebar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ export class Sidebar extends LitElement {
grid-template-columns: 5px 1fr;
}
:host(:not([collapsed])) {
min-width: max(var(--pkm-sidebar-width, min(50dvw, 400px)), 200px);
min-width: max(var(--pkm-sidebar-width, 0px), min(50dvw, 400px), 200px);
max-width: max(var(--pkm-sidebar-width, 0px), min(50dvw, 400px), 200px);
background: rgba(255, 255, 255, 0.05);
box-shadow:
0 3px 6px rgba(0, 0, 0, 0.16),
Expand Down

0 comments on commit d608b66

Please sign in to comment.