aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--anki-card-template/card.css7
-rw-r--r--anki-card-template/card.js7
2 files changed, 1 insertions, 13 deletions
diff --git a/anki-card-template/card.css b/anki-card-template/card.css
index bbad5ca..4a1a2e3 100644
--- a/anki-card-template/card.css
+++ b/anki-card-template/card.css
@@ -575,12 +575,7 @@ rt { user-select: none; }
.night_mode #card { color-scheme: dark; }
/* horizontal numbers and punctuation in single kana space in vertical japanese */
-#card.vertical-layout #sentence .horizontal-in-vertical { writing-mode: horizontal-tb; }
-#card.vertical-layout .squeeze {
- transform: translateX(calc(var(--self-height) / 2 * -1px)) scaleX(calc(var(--self-height) / var(--self-width)));
- width: 0;
- white-space: nowrap;
-}
+#card.vertical-layout #sentence .horizontal-in-vertical { text-combine-upright: all; }
/* make elements within this class display on one line */
.vertical-layout .flex-line { flex-direction: column; }
diff --git a/anki-card-template/card.js b/anki-card-template/card.js
index 73869b8..7b93b7d 100644
--- a/anki-card-template/card.js
+++ b/anki-card-template/card.js
@@ -386,13 +386,6 @@ HTMLElement.prototype.parse = function() {
this.innerHTML = nodes.map(n => n.data).join("");
if (this.id == "sentence" && this.has(n => n.tagName == "B")) this.classList.add("has-b");
if (this.id == "target-word-translation" && this.has(n => n.classList.contains("script-latin"))) this.classList.add("has-script-latin");
-
- for (var el of this.getElementsByClassName("horizontal-in-vertical")) {
- var size = el.getBoundingClientRect();
- el.style.setProperty("--self-width", size.width);
- el.style.setProperty("--self-height", size.height);
- if (size.width > size.height) el.classList.add("squeeze");
- }
};
function layout() {