diff --git a/client/src/utils/__tests__/svg.test.ts b/client/src/utils/__tests__/svg.test.ts
index b65f347cfd..0eb83997bc 100644
--- a/client/src/utils/__tests__/svg.test.ts
+++ b/client/src/utils/__tests__/svg.test.ts
@@ -210,6 +210,18 @@ describe('isMonochromeSvg', () => {
'';
expect(isMonochromeSvg(svg)).toBe(true);
});
+
+ it('does not count an unused CSS color declaration as a tone', () => {
+ const svg =
+ '';
+ expect(isMonochromeSvg(svg)).toBe(true);
+ });
+
+ it('resolves CSS currentColor against a CSS color declaration', () => {
+ const svg =
+ '';
+ expect(isMonochromeSvg(svg)).toBe(false);
+ });
});
describe('default fills alongside ';
+ expect(isMonochromeSvg(svg)).toBe(true);
+ });
+
it('rejects a full-size percentage background rect', () => {
const svg =
'';
diff --git a/client/src/utils/svg.ts b/client/src/utils/svg.ts
index a1ed1edbcb..e8e658da3f 100644
--- a/client/src/utils/svg.ts
+++ b/client/src/utils/svg.ts
@@ -66,6 +66,8 @@ const PAINT_OPACITY = new Map([
/** Declarations resolved from `