Skip to content

Commit b279b92

Browse files
committed
Use Inter font for code examples in docs.
1 parent 7d38fe5 commit b279b92

File tree

3 files changed

+97
-2
lines changed

3 files changed

+97
-2
lines changed

docs/assets/css/site.css

Lines changed: 90 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -343,8 +343,8 @@ a:not([class]):hover {
343343
}
344344

345345
code {
346-
font-family: "SFMono-Regular", menlo, consolas, monospace;
347-
font-size: 0.75em;
346+
font-family: Inter,InterVariable,Verdana,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";
347+
font-size: 0.9em;
348348
line-height: 1.4;
349349
}
350350

@@ -3095,3 +3095,91 @@ blockquote.warning-title > p:nth-child(2) {
30953095
blockquote.warning-title > p:last-child {
30963096
margin-bottom: 0;
30973097
}
3098+
3099+
/* Background */ .bg { background-color: #f5f6fa; }
3100+
/* PreWrapper */ .chroma { background-color: #f5f6fa; }
3101+
pre.chroma { border: 1px solid #eeebee; }
3102+
/* Other */ .chroma .x { }
3103+
/* Error */ .chroma .err { }
3104+
/* CodeLine */ .chroma .cl { }
3105+
/* LineLink */ .chroma .lnlinks { outline: none; text-decoration: none; color: inherit }
3106+
/* LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; }
3107+
/* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; }
3108+
/* LineHighlight */ .chroma .hl { background-color: #ffffcc }
3109+
/* LineNumbersTable */ .chroma .lnt { white-space: pre; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f }
3110+
/* LineNumbers */ .chroma .ln { white-space: pre; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f }
3111+
/* Line */ .chroma .line { display: flex; }
3112+
/* Keyword */ .chroma .k { color: #0000ff }
3113+
/* KeywordConstant */ .chroma .kc { color: #0000ff }
3114+
/* KeywordDeclaration */ .chroma .kd { color: #0000ff }
3115+
/* KeywordNamespace */ .chroma .kn { color: #0000ff }
3116+
/* KeywordPseudo */ .chroma .kp { color: #0000ff }
3117+
/* KeywordReserved */ .chroma .kr { color: #0000ff }
3118+
/* KeywordType */ .chroma .kt { color: #2b91af }
3119+
/* Name */ .chroma .n { }
3120+
/* NameAttribute */ .chroma .na { }
3121+
/* NameBuiltin */ .chroma .nb { }
3122+
/* NameBuiltinPseudo */ .chroma .bp { }
3123+
/* NameClass */ .chroma .nc { color: #2b91af }
3124+
/* NameConstant */ .chroma .no { }
3125+
/* NameDecorator */ .chroma .nd { }
3126+
/* NameEntity */ .chroma .ni { }
3127+
/* NameException */ .chroma .ne { }
3128+
/* NameFunction */ .chroma .nf { }
3129+
/* NameFunctionMagic */ .chroma .fm { }
3130+
/* NameLabel */ .chroma .nl { }
3131+
/* NameNamespace */ .chroma .nn { }
3132+
/* NameOther */ .chroma .nx { }
3133+
/* NameProperty */ .chroma .py { }
3134+
/* NameTag */ .chroma .nt { }
3135+
/* NameVariable */ .chroma .nv { }
3136+
/* NameVariableClass */ .chroma .vc { }
3137+
/* NameVariableGlobal */ .chroma .vg { }
3138+
/* NameVariableInstance */ .chroma .vi { }
3139+
/* NameVariableMagic */ .chroma .vm { }
3140+
/* Literal */ .chroma .l { }
3141+
/* LiteralDate */ .chroma .ld { }
3142+
/* LiteralString */ .chroma .s { color: #a31515 }
3143+
/* LiteralStringAffix */ .chroma .sa { color: #a31515 }
3144+
/* LiteralStringBacktick */ .chroma .sb { color: #a31515 }
3145+
/* LiteralStringChar */ .chroma .sc { color: #a31515 }
3146+
/* LiteralStringDelimiter */ .chroma .dl { color: #a31515 }
3147+
/* LiteralStringDoc */ .chroma .sd { color: #a31515 }
3148+
/* LiteralStringDouble */ .chroma .s2 { color: #a31515 }
3149+
/* LiteralStringEscape */ .chroma .se { color: #a31515 }
3150+
/* LiteralStringHeredoc */ .chroma .sh { color: #a31515 }
3151+
/* LiteralStringInterpol */ .chroma .si { color: #a31515 }
3152+
/* LiteralStringOther */ .chroma .sx { color: #a31515 }
3153+
/* LiteralStringRegex */ .chroma .sr { color: #a31515 }
3154+
/* LiteralStringSingle */ .chroma .s1 { color: #a31515 }
3155+
/* LiteralStringSymbol */ .chroma .ss { color: #a31515 }
3156+
/* LiteralNumber */ .chroma .m { }
3157+
/* LiteralNumberBin */ .chroma .mb { }
3158+
/* LiteralNumberFloat */ .chroma .mf { }
3159+
/* LiteralNumberHex */ .chroma .mh { }
3160+
/* LiteralNumberInteger */ .chroma .mi { }
3161+
/* LiteralNumberIntegerLong */ .chroma .il { }
3162+
/* LiteralNumberOct */ .chroma .mo { }
3163+
/* Operator */ .chroma .o { }
3164+
/* OperatorWord */ .chroma .ow { color: #0000ff }
3165+
/* Punctuation */ .chroma .p { }
3166+
/* Comment */ .chroma .c { color: #008000 }
3167+
/* CommentHashbang */ .chroma .ch { color: #008000 }
3168+
/* CommentMultiline */ .chroma .cm { color: #008000 }
3169+
/* CommentSingle */ .chroma .c1 { color: #008000 }
3170+
/* CommentSpecial */ .chroma .cs { color: #008000 }
3171+
/* CommentPreproc */ .chroma .cp { color: #0000ff }
3172+
/* CommentPreprocFile */ .chroma .cpf { color: #0000ff }
3173+
/* Generic */ .chroma .g { }
3174+
/* GenericDeleted */ .chroma .gd { }
3175+
/* GenericEmph */ .chroma .ge { font-style: italic }
3176+
/* GenericError */ .chroma .gr { }
3177+
/* GenericHeading */ .chroma .gh { font-weight: bold }
3178+
/* GenericInserted */ .chroma .gi { }
3179+
/* GenericOutput */ .chroma .go { }
3180+
/* GenericPrompt */ .chroma .gp { font-weight: bold }
3181+
/* GenericStrong */ .chroma .gs { font-weight: bold }
3182+
/* GenericSubheading */ .chroma .gu { font-weight: bold }
3183+
/* GenericTraceback */ .chroma .gt { }
3184+
/* GenericUnderline */ .chroma .gl { }
3185+
/* TextWhitespace */ .chroma .w { }

docs/config.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ disablePathToLower = true
1414
[markup.goldmark.renderer]
1515
unsafe = true
1616

17+
[markup.highlight]
18+
noClasses=false
19+
style = 'vs'
20+
1721
[params]
1822
description = "MySqlConnector is a high-performance, asynchronous C# ADO.NET driver for MySQL Server, MariaDB, Amazon Aurora, Azure Database for MySQL, Google Cloud SQL for MySQL, Percona Server and more."
1923
author = "MySqlConnector Authors"

docs/layouts/partials/header.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414

1515
gtag('config', 'UA-142489411-1');
1616
</script>
17+
<link rel="preconnect" href="https://fonts.googleapis.com">
18+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
1719
{{ .Scratch.Add "description" "" }}{{ if .Description }}{{ .Scratch.Set "description" .Description }}{{ else }}{{ .Scratch.Set "description" .Site.Params.description }}{{ end }}
1820
<meta name="description" content="{{ .Scratch.Get "description" }}">
1921
{{ with .Site.Params.author }}<meta name="author" content="{{ . }}">{{ end }}
@@ -53,6 +55,7 @@
5355

5456
{{ $style := resources.Get "css/site.css" | resources.Minify | resources.Fingerprint }}
5557
<link rel="stylesheet" href="{{ $style.Permalink }}">
58+
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap" rel="stylesheet">
5659
<link rel="canonical" href="{{ .Page.Permalink }}" />
5760
</head>
5861

0 commit comments

Comments
 (0)