mirror of
https://github.com/siemens-mobile-hacks/web-tools.git
synced 2026-11-25 17:17:22 +00:00
Fix graphical issues in the flasher patch editor
Some checks failed
CI / deploy (push) Failing after 2m57s
Some checks failed
CI / deploy (push) Failing after 2m57s
This commit is contained in:
parent
114aac2605
commit
d7d645e654
1 changed files with 7 additions and 0 deletions
|
|
@ -64,10 +64,15 @@ export const VkpEditor: Component<VkpEditorProps> = (props) => {
|
|||
fontFamily: 'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace',
|
||||
fontSize: '0.75rem',
|
||||
lineHeight: 1.5,
|
||||
// The <pre> inherits the page typography's letter spacing while the
|
||||
// textarea resets it, so long lines would wrap differently.
|
||||
letterSpacing: 'normal',
|
||||
whiteSpace: 'pre-wrap',
|
||||
overflowWrap: 'break-word',
|
||||
wordBreak: 'normal',
|
||||
tabSize: 4,
|
||||
// Both layers keep the width of the textarea's scrollbar free.
|
||||
scrollbarGutter: 'stable',
|
||||
} as const;
|
||||
|
||||
const outlinedBorder = theme.palette.mode === 'light'
|
||||
|
|
@ -107,6 +112,8 @@ export const VkpEditor: Component<VkpEditorProps> = (props) => {
|
|||
<For each={tokens()}>{(t) =>
|
||||
<Box component="span" sx={{ color: kindColors()[t.kind] }}>{t.text}</Box>
|
||||
}</For>
|
||||
{/* A textarea shows an empty last line after a trailing newline, a <pre> does not. */}
|
||||
{'\n'}
|
||||
</Box>
|
||||
<Box
|
||||
component="textarea"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue