Skip to content

Commit

Permalink
Performance optimisations
Browse files Browse the repository at this point in the history
  • Loading branch information
philwareham committed Sep 2, 2020
1 parent fb14c93 commit 14f510e
Show file tree
Hide file tree
Showing 23 changed files with 26 additions and 31 deletions.
Binary file added src/assets/fonts/pt-serif-v11-latin-700.woff
Binary file not shown.
Binary file added src/assets/fonts/pt-serif-v11-latin-700.woff2
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed src/assets/fonts/pt-serif-v11-latin-ext-700.woff
Binary file not shown.
Binary file removed src/assets/fonts/pt-serif-v11-latin-ext-700.woff2
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed src/assets/fonts/pt-serif-v11-latin-ext-italic.woff
Binary file not shown.
Binary file removed src/assets/fonts/pt-serif-v11-latin-ext-italic.woff2
Binary file not shown.
Binary file removed src/assets/fonts/pt-serif-v11-latin-ext-regular.woff
Binary file not shown.
Binary file not shown.
Binary file added src/assets/fonts/pt-serif-v11-latin-italic.woff
Binary file not shown.
Binary file added src/assets/fonts/pt-serif-v11-latin-italic.woff2
Binary file not shown.
Binary file added src/assets/fonts/pt-serif-v11-latin-regular.woff
Binary file not shown.
Binary file added src/assets/fonts/pt-serif-v11-latin-regular.woff2
Binary file not shown.
20 changes: 0 additions & 20 deletions src/assets/sass/modules/_base.scss

This file was deleted.

16 changes: 8 additions & 8 deletions src/assets/sass/modules/_fonts.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,33 +11,33 @@
font-family: "PT Serif";
font-style: normal;
font-weight: normal;
font-display: fallback;
src: url("../fonts/pt-serif-v11-latin-ext-regular.woff2") format("woff2"), url("../fonts/pt-serif-v11-latin-ext-regular.woff") format("woff");
font-display: optional;
src: url("https://textile-lang.com/assets/fonts/pt-serif-v11-latin-regular.woff2") format("woff2"), url("https://textile-lang.com/assets/fonts/pt-serif-v11-latin-regular.woff") format("woff");
}

// Regular Italic
@font-face {
font-family: "PT Serif";
font-style: italic;
font-weight: normal;
font-display: fallback;
src: url("../fonts/pt-serif-v11-latin-ext-italic.woff2") format("woff2"), url("../fonts/pt-serif-v11-latin-ext-italic.woff") format("woff");
font-display: optional;
src: url("https://textile-lang.com/assets/fonts/pt-serif-v11-latin-italic.woff2") format("woff2"), url("https://textile-lang.com/assets/fonts/pt-serif-v11-latin-italic.woff") format("woff");
}

// Bold
@font-face {
font-family: "PT Serif";
font-style: normal;
font-weight: bold;
font-display: fallback;
src: url("../fonts/pt-serif-v11-latin-ext-700.woff2") format("woff2"), url("../fonts/pt-serif-v11-latin-ext-700.woff") format("woff");
font-display: optional;
src: url("https://textile-lang.com/assets/fonts/pt-serif-v11-latin-700.woff2") format("woff2"), url("https://textile-lang.com/assets/fonts/pt-serif-v11-latin-700.woff") format("woff");
}

// Bold Italic
@font-face {
font-family: "PT Serif";
font-style: italic;
font-weight: bold;
font-display: fallback;
src: url("../fonts/pt-serif-v11-latin-ext-700italic.woff2") format("woff2"), url("../fonts/pt-serif-v11-latin-ext-700italic.woff") format("woff");
font-display: optional;
src: url("https://textile-lang.com/assets/fonts/pt-serif-v11-latin-700italic.woff2") format("woff2"), url("https://textile-lang.com/assets/fonts/pt-serif-v11-latin-700italic.woff") format("woff");
}
6 changes: 4 additions & 2 deletions src/assets/sass/modules/_forms.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,14 @@ legend {
}

/**
* Show the overflow in Edge.
* 1. Show the overflow in Edge.
* 2. Remove tap delay in modern browsers.
*/

button,
input {
overflow: visible;
overflow: visible; /* 1 */
touch-action: manipulation; /* 2 */
}

/**
Expand Down
8 changes: 8 additions & 0 deletions src/assets/sass/modules/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ body {
background-color: $color-body;
}

/**
* Render the `main` element consistently in IE 11.
*/

main {
display: block;
}

/**
* Hide items targetted at large screens. Overrode in second breakpoint.
*/
Expand Down
2 changes: 2 additions & 0 deletions src/assets/sass/modules/_links.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@
* 2. Remove default underline style from non-hover state links.
* 3. Interrupt the decoration line to let the shape of the text show through
* in supported browsers.
* 4. Remove tap delay in modern browsers.
*/

a {
color: $color-link; /* 1 */
text-decoration: none; /* 2 */
text-decoration-skip-ink: auto; /* 3 */
touch-action: manipulation; /* 4 */

&:hover,
&:active {
Expand Down
1 change: 0 additions & 1 deletion src/assets/sass/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
Styling and layout for all media
========================================================================== */

@import "modules/base";
@import "modules/fonts";


Expand Down
4 changes: 4 additions & 0 deletions src/templates/forms/misc/head.txp
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
<link rel="preload" href="https://textile-lang.com/assets/fonts/pt-serif-v11-latin-regular.woff2" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="https://textile-lang.com/assets/fonts/pt-serif-v11-latin-italic.woff2" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="https://textile-lang.com/assets/fonts/pt-serif-v11-latin-700.woff2" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="https://textile-lang.com/assets/fonts/pt-serif-v11-latin-700italic.woff2" as="font" type="font/woff2" crossorigin>
<link rel="stylesheet" href="/assets/css/style.@@timestamp.css">
<link rel="manifest" href="/site.webmanifest">
<link rel="icon" sizes="32x32" href="/favicon-32x32.png">
Expand Down

0 comments on commit 14f510e

Please sign in to comment.