Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update style.css to disable 'calt' feature for monospace #581

Merged
merged 1 commit into from
Apr 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions docs/src/.vitepress/theme/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -198,4 +197,4 @@ mjx-container>svg {

:root:is(.dark) .light-only {
display: none;
}
}
Loading