fix: global fix for all svg buttons

This commit is contained in:
2026-02-24 06:48:11 +01:00
parent 1878568e7a
commit 4ad7aa4862
3 changed files with 18 additions and 5 deletions

View File

@@ -45,11 +45,6 @@
.git-sidebar-icon-button svg { .git-sidebar-icon-button svg {
width: 16px; width: 16px;
height: 16px; height: 16px;
pointer-events: none;
}
.git-sidebar-icon-button svg * {
pointer-events: none;
} }
.git-action-branch-line, .git-action-branch-line,

View File

@@ -205,6 +205,11 @@ button:disabled {
cursor: not-allowed; cursor: not-allowed;
} }
button svg,
button svg * {
pointer-events: none;
}
/* Icon button */ /* Icon button */
.icon-button { .icon-button {
background: transparent; background: transparent;

View File

@@ -0,0 +1,13 @@
import { describe, expect, it } from 'vitest';
import * as fs from 'node:fs';
import * as path from 'node:path';
describe('Global SVG button pointer-events styles', () => {
const cssPath = path.resolve(__dirname, '../../src/renderer/styles/global.css');
it('routes pointer events through buttons instead of nested SVG geometry', () => {
const css = fs.readFileSync(cssPath, 'utf8');
expect(css).toMatch(/button\s+svg\s*,\s*button\s+svg\s*\*\s*\{[^}]*pointer-events:\s*none;[^}]*\}/s);
});
});