Skip to content

Commit

Permalink
Restore decrease from 6px, but use 1px instead
Browse files Browse the repository at this point in the history
  • Loading branch information
personalizedrefrigerator committed Nov 5, 2024
1 parent d35647d commit 08b6df6
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions packages/editor/CodeMirror/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ const createTheme = (theme: EditorTheme): Extension[] => {
// be at least this specific.
const selectionBackgroundSelector = '&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground';

// Matches the editor only when there are no gutters (e.g. line numbers) added by
// plugins
const editorNoGuttersSelector = '&:not(:has(> .cm-scroller > .cm-gutters))';

const baseHeadingStyle = {
fontWeight: 'bold',
fontFamily: theme.fontFamily,
Expand Down Expand Up @@ -180,6 +184,13 @@ const createTheme = (theme: EditorTheme): Extension[] => {
marginRight: 'auto',
} : undefined,

// Allows editor content to be left-aligned with the toolbar on desktop.
// See https://github.com/laurent22/joplin/issues/11279
[`${editorNoGuttersSelector} .cm-line`]: theme.isDesktop ? {
// Note: This cannot be zero:
paddingLeft: '1px',
} : undefined,

// Override the default URL style when the URL is within a link
'& .tok-url.tok-link, & .tok-link.tok-meta, & .tok-link.tok-string': {
opacity: 0.6,
Expand Down

0 comments on commit 08b6df6

Please sign in to comment.