Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 34 additions & 10 deletions src/renderer/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,45 +52,69 @@ const style = document.createElement('style');
document.head.appendChild(style);
style.innerText = `
svg {

fill: var(--theme-foreground);
}
.root text,
.root tspan {
font: 12px Arial;
}
/* Line between the matches */
.root path {
fill-opacity: 0;
stroke-width: 2px;
stroke: var(--theme-foreground);
}
/* Start and end circles */
.root circle {
fill: var(--theme-menu-hover-background);
fill: var(--theme-background);
stroke-width: 2px;
stroke: var(--theme-foreground);
}
/* Foreground for any matches */
.anchor text,
.any-character text {
fill: var(--theme-foreground);
}
/* Background for any matches */
.anchor rect,
.any-character rect {
fill: var(--theme-menu-hover-background);
fill: var(--theme-background);
stroke-width: 1px;
stroke: var(--vscode-focusBorder);
}
/* Foreground for escape char */
.escape text,
.charset-escape text,
.literal text {
fill: var(--theme-foreground);
.charset-escape text {
fill: var(--vscode-menu-foreground);
}
/* Background for escape char */
.escape rect,
.charset-escape rect {
fill: #bada55;
fill: var(--vscode-menu-background);
stroke-width: 1px;
stroke: var(--vscode-menu-border);
}
/* Forground for literal */
.literal text {
fill: var(--vscode-menu-selectionForeground);
}
/* Background for literal */
.literal rect {
fill: var(--theme-button-background);
fill: var(--vscode-menu-selectionBackground);
stroke-width: 1px;
stroke: var(--vscode-menu-selectionBorder);
}
/* Background for char class */
.charset .charset-box {
fill: var(--theme-menu-hover-background);
fill: var(--theme-menu-background);
stroke-width: 1px;
stroke: var(--vscode-focusBorder);
}
/* Label text for char class */
.charset .charset-label {
fill: var(--theme-foreground);
}
/* Label text for char class or group */
.subexp .subexp-label tspan,
.charset .charset-label tspan,
.match-fragment .repeat-label tspan {
Expand All @@ -104,7 +128,7 @@ svg {
dominant-baseline: text-after-edge;
}
.subexp .subexp-box {
stroke: #908c83;
stroke: var(--theme-foreground);
stroke-dasharray: 6, 2;
stroke-width: 2px;
fill-opacity: 0;
Expand Down