Skip to content

Commit

Permalink
Eliminate font flickering
Browse files Browse the repository at this point in the history
From: mtn#137

Was simpler to reapply changes rather than rebase.
  • Loading branch information
homebysix committed Oct 5, 2021
1 parent 074ff7e commit 368d604
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 26 deletions.
26 changes: 13 additions & 13 deletions layouts/partials/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -885,25 +885,25 @@ span.draftlabel {

/* Fonts */
{{ if not .Site.Params.disablefancyfonts }}
.wf-raleway-n4-active body,
.wf-raleway-n4-active div.header nav ul a,
.wf-raleway-n7-active div.main .content .page-heading,
.wf-raleway-n2-active div.main .container.f04 .content .num,
.wf-raleway-n7-active div.main .content .markdown h1,
.wf-raleway-n7-active div.main .content .markdown h2,
.wf-raleway-n7-active div.main .content .markdown h3,
.wf-raleway-n7-active div.main .content .markdown h4,
.wf-raleway-n7-active div.main .content .markdown h5,
.wf-raleway-n7-active div.main .content .markdown h6 {
body,
div.header nav ul a,
div.main .content .page-heading,
div.main .container.f04 .content .num,
div.main .content .markdown h1,
div.main .content .markdown h2,
div.main .content .markdown h3,
div.main .content .markdown h4,
div.main .content .markdown h5,
div.main .content .markdown h6 {
font-family: 'Raleway';
}

.wf-merriweather-n3-active div.main .content .markdown {
div.main .content .markdown {
font-family: 'Merriweather';
}

.wf-ubuntu-mono-n4-active div.main .content .markdown code,
.wf-ubuntu-mono-n4-active div.main .content .markdown pre {
div.main .content .markdown code,
div.main .content .markdown pre {
font-family: 'Ubuntu Mono';
}

Expand Down
11 changes: 0 additions & 11 deletions layouts/partials/footer_scripts.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,3 @@
{{ if not .Site.Params.disablefancyfonts }}
<script src="https://ajax.googleapis.com/ajax/libs/webfont/1.6.26/webfont.js"></script>
<script>
WebFont.load({
google: {
families: ['Raleway:400,600,700', 'Merriweather:300,300i,700,700i', 'Ubuntu+Mono:400,700']
}
});
</script>
{{ end }}

{{ if .Site.Params.highlightjs }}
<script src="{{ .Site.BaseURL }}js/highlight.min.js" defer></script>
{{ range .Site.Params.highlightjslanguages }}
Expand Down
4 changes: 2 additions & 2 deletions layouts/partials/head_includes.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
{{ partial "css/max600px.css" . | safeCSS }}
</style>

<noscript>
{{ if not .Site.Params.disablefancyfonts }}
<link href="https://fonts.googleapis.com/css?family=Raleway:400,600,700" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Merriweather:300,300i,700,700i" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700" rel="stylesheet">
</noscript>
{{ end }}
{{ if .Site.Params.highlightjs }}
<style type="text/css" media="screen">
{{ partial "css/highlight.min.css" . | safeCSS }}
Expand Down

0 comments on commit 368d604

Please sign in to comment.