Improve font rendering

This commit is contained in:
Alex Shpak 2018-11-07 12:54:18 +01:00
parent b88206b14f
commit 143cb9341d
7 changed files with 17 additions and 9 deletions

View File

@ -16,7 +16,7 @@ $block-border-radius: 0.15rem;
}
b, optgroup, strong {
font-weight: 400;
font-weight: 700;
}
a {
@ -28,7 +28,7 @@ $block-border-radius: 0.15rem;
}
code {
font-family: 'Roboto Mono', monospace;
font-family: 'Oxygen Mono', monospace;
}
p code {

View File

@ -21,7 +21,7 @@ $gray-800: #343a40;
$gray-900: #212529;
$black: #000;
$color-link: #4092f1;
$color-link: #004ed0;
$color-visited-link: #8440f1;
$body-background: white;

View File

@ -4,7 +4,7 @@
html {
font-size: $font-size-base;
letter-spacing: .3px;
letter-spacing: .33px;
}
html, body {
@ -15,9 +15,14 @@ html, body {
body {
color: $body-font-color;
background: $body-background;
font-family: 'Oxygen', sans-serif;
font-weight: $body-font-weight;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
box-sizing: border-box;
* {
box-sizing: inherit;

View File

@ -1 +1 @@
.markdown{line-height:1.7}.markdown>:first-child{margin-top:0;line-height:1em}.markdown h1,.markdown h2,.markdown h3,.markdown h4,.markdown h5{font-weight:400;line-height:1.25}.markdown b,.markdown optgroup,.markdown strong{font-weight:400}.markdown a{text-decoration:none}.markdown a:hover{text-decoration:underline}.markdown code{font-family:roboto mono,monospace}.markdown p code{padding:0 .25rem;background:#f8f9fa;border-radius:.15rem}.markdown pre{padding:1rem;background:#f8f9fa;border-radius:.15rem;font-size:.875rem;overflow-x:auto}.markdown blockquote{border-left:2px solid #dee2e6;margin:0;padding:1px 1rem}.markdown blockquote :first-child{margin-top:0}.markdown blockquote :last-child{margin-bottom:0}.markdown table tr td{padding:.5rem}html{font-size:16px;letter-spacing:.3px}html,body{min-width:25rem;overflow:hidden auto}body{color:#343a40;background:#fff;font-family:oxygen,sans-serif;font-weight:400;box-sizing:border-box}body *{box-sizing:inherit}h1,h2,h3,h4,h5{font-weight:400}a{text-decoration:none;color:#4092f1}a:visited{color:#8440f1}img{vertical-align:middle}aside ul{margin:0;padding-left:1rem;list-style:none;line-height:1.5em}aside ul li{margin:.75em 0}aside ul li a{display:block}aside ul li a:hover{opacity:.5}aside ul li img{height:1rem}aside nav>ul{padding-left:0}aside.fixed nav{position:fixed;top:0;bottom:0;overflow:hidden auto}header{display:flex;align-items:center;justify-content:space-between;margin-bottom:1rem;display:none}main{max-width:80rem;margin:0 auto;display:flex;flex-flow:row}main aside nav,main .content,main .markdown{transition:.2s ease-in-out;transition-property:transform,margin-left,opacity;will-change:transform,margin-left}main .menu{flex:0 0 18rem}main .menu .brand{margin-top:0}main .menu nav{width:18rem;padding:1rem;font-size:.875rem}main .menu a{color:#343a40}main .menu a.active{color:#4092f1}main .menu .flat-section{margin-bottom:1rem}main .menu .flat-section>a{font-weight:700}main .menu .flat-section>ul{padding-left:0}main .content{flex:1 0;width:0;min-width:25rem;padding:1rem}main .toc{flex:0 0 14rem}main .toc nav{width:14rem;padding:1rem;font-size:.75rem}main .toc nav ul ul{padding-left:.5rem}@media screen and (max-width:61rem){.toc{display:none}}@media screen and (max-width:43rem){.menu{margin-left:-18rem}main header{display:flex}#menu-control:checked+main .menu nav,#menu-control:checked+main .content{transform:translateX(18rem)}#menu-control:checked+main header label img{transform:rotate(90deg)}#menu-control:checked+main .markdown{opacity:.25}}@media screen and (min-width:61rem){main .content{padding:2rem 1rem}main .menu nav,main .toc nav{padding:2rem}}
.markdown{line-height:1.7}.markdown>:first-child{margin-top:0;line-height:1em}.markdown h1,.markdown h2,.markdown h3,.markdown h4,.markdown h5{font-weight:400;line-height:1.25}.markdown b,.markdown optgroup,.markdown strong{font-weight:700}.markdown a{text-decoration:none}.markdown a:hover{text-decoration:underline}.markdown code{font-family:oxygen mono,monospace}.markdown p code{padding:0 .25rem;background:#f8f9fa;border-radius:.15rem}.markdown pre{padding:1rem;background:#f8f9fa;border-radius:.15rem;font-size:.875rem;overflow-x:auto}.markdown blockquote{border-left:2px solid #dee2e6;margin:0;padding:1px 1rem}.markdown blockquote :first-child{margin-top:0}.markdown blockquote :last-child{margin-bottom:0}.markdown table tr td{padding:.5rem}html{font-size:16px;letter-spacing:.33px}html,body{min-width:25rem;overflow:hidden auto}body{color:#343a40;background:#fff;font-family:oxygen,sans-serif;font-weight:400;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;box-sizing:border-box}body *{box-sizing:inherit}h1,h2,h3,h4,h5{font-weight:400}a{text-decoration:none;color:#004ed0}a:visited{color:#8440f1}img{vertical-align:middle}aside ul{margin:0;padding-left:1rem;list-style:none;line-height:1.5em}aside ul li{margin:.75em 0}aside ul li a{display:block}aside ul li a:hover{opacity:.5}aside ul li img{height:1rem}aside nav>ul{padding-left:0}aside.fixed nav{position:fixed;top:0;bottom:0;overflow:hidden auto}header{display:flex;align-items:center;justify-content:space-between;margin-bottom:1rem;display:none}main{max-width:80rem;margin:0 auto;display:flex;flex-flow:row}main aside nav,main .content,main .markdown{transition:.2s ease-in-out;transition-property:transform,margin-left,opacity;will-change:transform,margin-left}main .menu{flex:0 0 18rem}main .menu .brand{margin-top:0}main .menu nav{width:18rem;padding:1rem;font-size:.875rem}main .menu a{color:#343a40}main .menu a.active{color:#004ed0}main .menu .flat-section{margin-bottom:1rem}main .menu .flat-section>a{font-weight:700}main .menu .flat-section>ul{padding-left:0}main .content{flex:1 0;width:0;min-width:25rem;padding:1rem}main .toc{flex:0 0 14rem}main .toc nav{width:14rem;padding:1rem;font-size:.75rem}main .toc nav ul ul{padding-left:.5rem}@media screen and (max-width:61rem){.toc{display:none}}@media screen and (max-width:43rem){.menu{margin-left:-18rem}main header{display:flex}#menu-control:checked+main .menu nav,#menu-control:checked+main .content{transform:translateX(18rem)}#menu-control:checked+main header label img{transform:rotate(90deg)}#menu-control:checked+main .markdown{opacity:.25}}@media screen and (min-width:61rem){main .content{padding:2rem 1rem}main .menu nav,main .toc nav{padding:2rem}}

View File

@ -1 +1 @@
{"Target":"book.min.c8c8e50ed288f167b51b63d6da0960cfaa3aa1b351c38bea4fd536d969bc1aec.css","MediaType":"text/css","Data":{"Integrity":"sha256-yMjlDtKI8We1G2PW2glgz6o6obNRw4vqT9U22Wm8Guw="}}
{"Target":"book.min.50f271dd26ebebd6d8a9877137ff6aaf244378f21a325ced70fb19102403d4ef.css","MediaType":"text/css","Data":{"Integrity":"sha256-UPJx3Sbr69bYqYdxN/9qryRDePIaMlztcPsZECQD1O8="}}

View File

@ -1,6 +1,7 @@
<!DOCTYPE html>
{{- partial "docs/shared" -}}
<html>
<head>
{{ partial "docs/html-head" . }}
{{ partial "docs/inject/head" . }}
@ -43,5 +44,7 @@
</main>
{{ partial "docs/inject/body" . }}
</body>
</html>

View File

@ -2,7 +2,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{- template "title" . }} | {{ .Site.Title -}}</title>
<link href="https://fonts.googleapis.com/css?family=Oxygen+Mono|Oxygen:300,400,700" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Oxygen|Oxygen+Mono:300,400,700" rel="stylesheet">
<link rel="stylesheet" href="/normalize.min.css">
{{ $styles := resources.Get "book.scss" | resources.ToCSS | resources.Minify | resources.Fingerprint }}