Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 4de4ca7

Browse files
committed
Use font-display: block
Takes up to 2s before url is fetched, before which text flashes in a different font
1 parent fc8000e commit 4de4ca7

File tree

3 files changed

+48
-4
lines changed

3 files changed

+48
-4
lines changed

‎packages/gatsby-theme-apollo-core/package-lock.json‎

Lines changed: 7 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎packages/gatsby-theme-apollo-core/package.json‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "gatsby-theme-guide-core",
3-
"version": "3.0.27",
3+
"version": "3.0.32",
44
"main": "index.js",
55
"description": "A theme for The GraphQL Guide (a fork of gatsby-theme-apollo-core)",
66
"license": "MIT",
@@ -20,6 +20,7 @@
2020
"gatsby-plugin-svgr": "^2.0.1",
2121
"less": "^3.10.1",
2222
"lodash": "^4.17.14",
23+
"normalize.css": "^8.0.1",
2324
"polished": "^2.3.3",
2425
"prop-types": "^15.6.2",
2526
"react-helmet": "^5.2.0",

‎packages/gatsby-theme-apollo-core/src/styles.less‎

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,50 @@
1-
@import (inline) '~@apollo/space-kit/reset.css';
1+
@import (inline) "~normalize.css/normalize.css";
22

3+
@font-face {
4+
font-family: 'Source Code Pro';
5+
font-style: normal;
6+
font-weight: 400;
7+
font-display: block;
8+
src: local('Source Code Pro Regular'), local('SourceCodePro-Regular'),
9+
url(https://fonts.gstatic.com/s/sourcecodepro/v11/HI_SiYsKILxRpg3hIP6sJ7fM7PqlPevT.ttf)
10+
format('truetype');
11+
}
12+
@font-face {
13+
font-family: 'Source Sans Pro';
14+
font-style: normal;
15+
font-weight: 400;
16+
font-display: block;
17+
src: local('Source Sans Pro Regular'), local('SourceSansPro-Regular'),
18+
url(https://fonts.gstatic.com/s/sourcesanspro/v13/6xK3dSBYKcSV-LCoeQqfX1RYOo3qOK7g.ttf)
19+
format('truetype');
20+
}
21+
@font-face {
22+
font-family: 'Source Sans Pro';
23+
font-style: normal;
24+
font-weight: 600;
25+
font-display: block;
26+
src: local('Source Sans Pro SemiBold'), local('SourceSansPro-SemiBold'),
27+
url(https://fonts.gstatic.com/s/sourcesanspro/v13/6xKydSBYKcSV-LCoeQqfX1RYOo3i54rwlxdr.ttf)
28+
format('truetype');
29+
}
30+
331
html {
32+
box-sizing: border-box;
433
font-size: 100%;
534
line-height: 1.45;
635
overflow-y: auto;
736
}
837

38+
*, *:before, *:after {
39+
box-sizing: inherit;
40+
}
41+
42+
pre, code {
43+
font-family: 'Source Code Pro', monospace;
44+
}
45+
946
body {
47+
font-family: 'Source Sans Pro', sans-serif;
1048
color: @color-text2;
1149
}
1250

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /