Update track change decoration to be cursor-like (#21047)

* Update track change decoration to be cursor-like

* use red-50 color

GitOrigin-RevId: 8c8a2cb9c6abc99aa1d2dace705dba3feeda07fa
This commit is contained in:
Domagoj Kriskovic 2024-10-21 10:57:13 +02:00 committed by Copybot
parent db3c69fbcd
commit 42eea0017d

View file

@ -325,7 +325,6 @@ class ChangeDeletedWidget extends WidgetType {
const widget = document.createElement('span') const widget = document.createElement('span')
widget.classList.add('ol-cm-change') widget.classList.add('ol-cm-change')
widget.classList.add('ol-cm-change-d') widget.classList.add('ol-cm-change-d')
widget.textContent = '[ — ]'
if (this.highlightType) { if (this.highlightType) {
widget.classList.add(`ol-cm-change-d-${this.highlightType}`) widget.classList.add(`ol-cm-change-d-${this.highlightType}`)
} }
@ -409,24 +408,28 @@ const trackChangesTheme = EditorView.baseTheme({
}, },
// TODO: fix dark mode colors // TODO: fix dark mode colors
'&light .ol-cm-change-d': { '&light .ol-cm-change-d': {
color: '#c5060b', borderLeft: '2px dotted #c5060b',
backgroundColor: '#f5beba57', marginLeft: '-1px',
}, },
'&dark .ol-cm-change-d': { '&dark .ol-cm-change-d': {
color: '#c5060b', borderLeft: '2px dotted #c5060b',
backgroundColor: '#f5beba57', marginLeft: '-1px',
}, },
'&light .ol-cm-change-d-highlight': { '&light .ol-cm-change-d-highlight': {
backgroundColor: '#f5bebaa4', borderLeft: '3px solid #c5060b',
marginLeft: '-2px',
}, },
'&dark .ol-cm-change-d-highlight': { '&dark .ol-cm-change-d-highlight': {
backgroundColor: '#f5bebaa4', borderLeft: '3px solid #c5060b',
marginLeft: '-2px',
}, },
'&light .ol-cm-change-d-focus': { '&light .ol-cm-change-d-focus': {
backgroundColor: '#F5BEBA', borderLeft: '3px solid #B83A33',
marginLeft: '-2px',
}, },
'&dark .ol-cm-change-d-focus': { '&dark .ol-cm-change-d-focus': {
backgroundColor: '#F5BEBA', borderLeft: '3px solid #B83A33',
marginLeft: '-2px',
}, },
'&light .ol-cm-change-highlight-i': { '&light .ol-cm-change-highlight-i': {
backgroundColor: '#b8dbc899', backgroundColor: '#b8dbc899',