From b4940e09b39e8b0219071ddce5ee88fdbbc6af78 Mon Sep 17 00:00:00 2001 From: cormullion Date: Wed, 10 Apr 2024 10:05:45 +0100 Subject: [PATCH] Update style.css to disable 'calt' feature for monospace Disable the 'calt' font feature for monospaced fonts. --- docs/src/.vitepress/theme/style.css | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/docs/src/.vitepress/theme/style.css b/docs/src/.vitepress/theme/style.css index 2d400fff76..43f4d4050f 100644 --- a/docs/src/.vitepress/theme/style.css +++ b/docs/src/.vitepress/theme/style.css @@ -30,22 +30,21 @@ https://github.com/vuejs/vitepress/blob/main/src/client/theme-default/styles/var /* Code Snippet font */ --vp-font-family-mono: JuliaMono-Regular, monospace; -} - -.mono { /* - Disable contextual alternates (kind of like ligatures but different) in monospace, - which turns `/>` to an up arrow and `|>` (the Julia pipe symbol) to an up arrow as well. - This is pretty bad for Julia folks reading even though copy+paste retains the same text. + Disable the 'calt' (contextual alternates, often called ligatures) font feature + for monospaced text, which is usually enabled by default. This feature changes + the display of character combinations such "-" + ">", and "|" + ">". These can + be confusing for beginners, particularly if the font has 'unusual' designs. */ font-feature-settings: 'calt' 0; +} + +.mono { pre { font-family: JuliaMono-Light; } - ; - code { font-family: JuliaMono-Light; } @@ -198,4 +197,4 @@ mjx-container>svg { :root:is(.dark) .light-only { display: none; -} \ No newline at end of file +}