another try
This commit is contained in:
parent
56ea9cbcf4
commit
a477f9b169
|
|
@ -584,24 +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;
|
||||||
color: var(--text-primary) !important;
|
color: var(--text-primary) !important;
|
||||||
resize: none;
|
resize: none;
|
||||||
overflow: auto;
|
overflow-y: scroll; /* Always show scrollbar for consistent text width */
|
||||||
|
overflow-x: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Syntax Highlighting Overlay */
|
/* Syntax Highlighting Overlay */
|
||||||
|
|
@ -626,24 +620,23 @@
|
||||||
position: absolute;
|
position: absolute;
|
||||||
inset: 0;
|
inset: 0;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
overflow-y: scroll; /* Force scrollbar space to match textarea */
|
overflow-y: scroll; /* Match textarea scrollbar space */
|
||||||
overflow-x: hidden;
|
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;
|
||||||
}
|
}
|
||||||
/* Make overlay scrollbar invisible but still take up space */
|
/* Invisible scrollbar that takes same space as textarea */
|
||||||
.syntax-overlay::-webkit-scrollbar {
|
.syntax-overlay::-webkit-scrollbar {
|
||||||
width: 12px; /* Match textarea scrollbar width */
|
width: 12px;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
}
|
}
|
||||||
.syntax-overlay::-webkit-scrollbar-thumb {
|
.syntax-overlay::-webkit-scrollbar-thumb {
|
||||||
background: transparent;
|
background: transparent;
|
||||||
}
|
}
|
||||||
/* Firefox: use overlay scrollbar (invisible but takes space) */
|
/* Firefox */
|
||||||
@supports (scrollbar-width: auto) {
|
@supports (scrollbar-color: auto) {
|
||||||
.syntax-overlay {
|
.syntax-overlay {
|
||||||
scrollbar-width: thin;
|
|
||||||
scrollbar-color: transparent transparent;
|
scrollbar-color: transparent transparent;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue