attempt to fix the syntax highlight issue
This commit is contained in:
parent
e2cb3ba3ea
commit
56ea9cbcf4
|
|
@ -584,11 +584,18 @@
|
||||||
white-space: pre-wrap;
|
white-space: pre-wrap;
|
||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
overflow-wrap: break-word;
|
overflow-wrap: break-word;
|
||||||
|
word-break: normal; /* Ensure consistent word breaking */
|
||||||
padding: 1.5rem;
|
padding: 1.5rem;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
border: none;
|
border: none;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
/* Ensure spans in overlay don't affect word wrapping */
|
||||||
|
.syntax-overlay span {
|
||||||
|
word-break: inherit;
|
||||||
|
overflow-wrap: inherit;
|
||||||
|
white-space: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
.editor-textarea {
|
.editor-textarea {
|
||||||
background-color: var(--bg-primary) !important;
|
background-color: var(--bg-primary) !important;
|
||||||
|
|
@ -619,16 +626,26 @@
|
||||||
position: absolute;
|
position: absolute;
|
||||||
inset: 0;
|
inset: 0;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
overflow: auto;
|
overflow-y: scroll; /* Force scrollbar space to match textarea */
|
||||||
|
overflow-x: hidden;
|
||||||
color: var(--text-primary);
|
color: var(--text-primary);
|
||||||
background-color: var(--bg-primary);
|
background-color: var(--bg-primary);
|
||||||
z-index: 0;
|
z-index: 0;
|
||||||
/* Hide scrollbars but allow programmatic scrolling */
|
|
||||||
scrollbar-width: none; /* Firefox */
|
|
||||||
-ms-overflow-style: none; /* IE/Edge */
|
|
||||||
}
|
}
|
||||||
|
/* Make overlay scrollbar invisible but still take up space */
|
||||||
.syntax-overlay::-webkit-scrollbar {
|
.syntax-overlay::-webkit-scrollbar {
|
||||||
display: none; /* Chrome/Safari */
|
width: 12px; /* Match textarea scrollbar width */
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
.syntax-overlay::-webkit-scrollbar-thumb {
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
/* Firefox: use overlay scrollbar (invisible but takes space) */
|
||||||
|
@supports (scrollbar-width: auto) {
|
||||||
|
.syntax-overlay {
|
||||||
|
scrollbar-width: thin;
|
||||||
|
scrollbar-color: transparent transparent;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Zen Mode Styles */
|
/* Zen Mode Styles */
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue