From 64eac98be040909186686f13111d2654f2d8ab5a Mon Sep 17 00:00:00 2001 From: Manuel Kaufmann Date: Mon, 30 Jun 2025 13:49:28 +0200 Subject: [PATCH] Visual diff: use default CSS variables for Material for MkDocs Closes #505 --- src/defaults.css | 1 + src/filetreediff.css | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/defaults.css b/src/defaults.css index 23cc6b34..5d6b68e5 100644 --- a/src/defaults.css +++ b/src/defaults.css @@ -7,6 +7,7 @@ :root[data-readthedocs-tool="mkdocs-material"] { --readthedocs-font-size: 1.455em; + --readthedocs-filetreediff-icon-width: 0.6rem; } :root[data-readthedocs-tool="antora"] { diff --git a/src/filetreediff.css b/src/filetreediff.css index a9c6525e..92135c3e 100644 --- a/src/filetreediff.css +++ b/src/filetreediff.css @@ -10,6 +10,7 @@ --readthedocs-filetreediff-border-color: #ddd; --readthedocs-filetreediff-label-color: #333; --readthedocs-filetreediff-chunks-color: #27ae60; + --readthedocs-filetreediff-icon-width: 0.8rem; } } @@ -41,7 +42,6 @@ background-color: var(--readthedocs-filetreediff-background-color); border-radius: 0.25em; appearance: revert; - font-size: var(--readthedocs-filetreediff-font-size); } :host > div > div > label { @@ -70,8 +70,8 @@ } :host > div > div > a { - width: 0.8rem; - color: var(--addons-filetreediff-color); + width: var(--readthedocs-filetreediff-icon-width); + color: var(--readthedocs-filetreediff-color); } :host > div > div > a.version {