From 7c5031ab28dcdc8df9a025fe38c8fdd585d73162 Mon Sep 17 00:00:00 2001 From: hikaru-y Date: Mon, 5 Jul 2021 03:19:26 +0900 Subject: [PATCH 1/2] Prevent #dupe bgcolor from being carried over when copying text use 'background-image' instead of 'background-color' to prevent the background-color from being carried over when copying text to another field in day mode --- ts/editor/fields.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ts/editor/fields.scss b/ts/editor/fields.scss index 857a16ac1..4c67fd8ed 100644 --- a/ts/editor/fields.scss +++ b/ts/editor/fields.scss @@ -19,7 +19,7 @@ background: var(--frame-bg); &.dupe { - background: var(--flag1-bg); + background-image: linear-gradient(var(--flag1-bg), var(--flag1-bg)); } } From 46708f536d4feff6cffb1e043ec3a6de8cccbe11 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Mon, 5 Jul 2021 11:09:22 +1000 Subject: [PATCH 2/2] add comment about the use of linear-gradient Otherwise one of us is likely to return to the code in a few years, think it could be made simpler, and then break things again. :-) --- ts/editor/fields.scss | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ts/editor/fields.scss b/ts/editor/fields.scss index 4c67fd8ed..756903187 100644 --- a/ts/editor/fields.scss +++ b/ts/editor/fields.scss @@ -19,6 +19,8 @@ background: var(--frame-bg); &.dupe { + // this works around the background colour persisting in copy+paste + // (https://github.com/ankitects/anki/pull/1278) background-image: linear-gradient(var(--flag1-bg), var(--flag1-bg)); } }