-
Notifications
You must be signed in to change notification settings - Fork 79
Closed
Description
Just found that <textarea> and <pre><code> don’t share exactly the same default typography.
So I wrote some CSS to override the defaults:
.overtype-preview .code-block {
/* to avoid the scrollbar, which has the additional height to break the alignment. */
white-space: break-spaces;
}
.overtype-preview .code-block code {
/* use the exactly the same font that textarea is using */
font-family: "SF Mono", SFMono-Regular, Menlo, Monaco, "Cascadia Code", Consolas, "Roboto Mono", "Noto Sans Mono", "Droid Sans Mono", "Ubuntu Mono", "DejaVu Sans Mono", "Liberation Mono", "Courier New", Courier, monospace !important;
/* set line-height to zero to avoid unknown height alignment issue */
line-height: 0px !important;
}hope that help you.
Metadata
Metadata
Assignees
Labels
No labels