in src/lib/CodeMirror/indentationMarkers.ts [408:440]
function makeBackgroundCSS(
entry: IndentEntry,
indentWidth: number,
hideFirstIndent: boolean
): string {
const { level, active } = entry;
if (hideFirstIndent && level === 0) {
return '';
}
const startAt = hideFirstIndent ? 1 : 0;
const backgrounds: string[] = [];
if (active !== undefined) {
const markersBeforeActive = active - startAt - 1;
if (markersBeforeActive > 0) {
backgrounds.push(
createGradient('--indent-marker-bg-color', indentWidth, startAt, markersBeforeActive)
);
}
backgrounds.push(createGradient('--indent-marker-active-bg-color', indentWidth, active - 1, 1));
if (active !== level) {
backgrounds.push(
createGradient('--indent-marker-bg-color', indentWidth, active, level - active)
);
}
} else {
backgrounds.push(
createGradient('--indent-marker-bg-color', indentWidth, startAt, level - startAt)
);
}
return backgrounds.join(',');
}