Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: IBM Plex Sans Variable #329

Merged
merged 20 commits into from
Aug 21, 2019
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
a5f2a6b
feat: use variable fonts
vpicone Aug 12, 2019
e49f7eb
chore: add font-display rule
vpicone Aug 12, 2019
e9d8f65
fix: subset type files, use font-display: fallback
vpicone Aug 12, 2019
758b9d6
add webfont loader to control font loading
vpicone Aug 12, 2019
597d8a9
Merge branch 'master' of github.com:carbon-design-system/gatsby-theme…
vpicone Aug 15, 2019
afa12bf
fix: yarn lock
vpicone Aug 15, 2019
15eddcd
fix: sass clean up and subset script addition
vpicone Aug 15, 2019
fa62298
Merge branch 'master' into add-variable-fonts
vpicone Aug 15, 2019
e6c2e38
Merge branch 'master' into add-variable-fonts
vpicone Aug 16, 2019
6cca902
Merge branch 'master' of github.com:carbon-design-system/gatsby-theme…
vpicone Aug 16, 2019
f92e02e
Merge branch 'add-variable-fonts' of github.com:vpicone/gatsby-theme-…
vpicone Aug 16, 2019
8bdf7ee
Merge branch 'master' into add-variable-fonts
vpicone Aug 16, 2019
f2ca614
Merge branch 'master' into add-variable-fonts
shixiedesign Aug 19, 2019
5902889
Merge branch 'master' into add-variable-fonts
alisonjoseph Aug 20, 2019
84b0dc6
Merge branch 'master' into add-variable-fonts
jeanservaas Aug 21, 2019
e0df774
Merge branch 'master' of github.com:carbon-design-system/gatsby-theme…
vpicone Aug 21, 2019
bfa05e1
fix: yarn lock
vpicone Aug 21, 2019
9f3f0db
Merge branch 'add-variable-fonts' of github.com:vpicone/gatsby-theme-…
vpicone Aug 21, 2019
418ce53
fix: mono font loading
vpicone Aug 21, 2019
29ed15f
chore: remove unncessary addon
vpicone Aug 21, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions packages/gatsby-theme-carbon/gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,6 @@ module.exports = themeOptions => {
resolve: `gatsby-plugin-prefetch-google-fonts`,
options: {
fonts: [
{
family: `IBM Plex Sans`,
variants: [
300,
'300i',
400,
'400i',
600,
'600i',
...additionalFontWeights,
],
},
{
family: `IBM Plex Mono`,
},
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@ $feature-flags: (
// Typography
@include carbon--type-reset();
@import '~@carbon/elements/scss/type/classes';

// special characters (arrows)
@import url('https://fonts.googleapis.com/css?family=IBM+Plex+Sans&text=←→↑↓↔↕↖↗↘↙↚↛↮⟵⟶⟷↰↱↲↳⬐⬎⬑⬏↴↵');
@import './plex';

$font-family: 'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif;
$font-family-mono: 'IBM Plex Mono', 'Menlo', 'DejaVu Sans Mono',
Expand Down
40 changes: 40 additions & 0 deletions packages/gatsby-theme-carbon/src/styles/internal/_plex.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
@font-face {
font-family: 'IBM Plex Sans VF';
font-display: fallback;
src: url('./fonts/IBMPlexSans-VF.woff2') format('woff2-variations'),
url('./fonts/IBMPlexSans-VF.woff2') format('woff2');
font-weight: 100 900;
font-style: normal;
}

@font-face {
font-family: 'IBM Plex Sans VF';
font-display: fallback;
src: url('./fonts/IBMPlexSans-Italic-VF.woff2') format('woff2-variations'),
url('./fonts/IBMPlexSans-Italic-VF.woff2') format('woff2');
font-weight: 100 900;
font-style: italic;
}

@font-face {
font-family: 'IBM Plex Sans';
font-display: fallback;
src: url('./fonts/IBMPlexSans.woff') format('woff');
}

@font-face {
font-family: 'IBM Plex Sans';
font-display: fallback;
src: url('./fonts/IBMPlexSans-SemiBold.woff');
font-weight: 600;
}

body {
font-family: 'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif;
}

@supports (font-variation-settings: normal) {
body {
font-family: 'IBM Plex Sans VF', 'Helvetica Neue', Arial, sans-serif;
}
}
69 changes: 20 additions & 49 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4300,15 +4300,14 @@ cliui@^4.0.0:
strip-ansi "^4.0.0"
wrap-ansi "^2.0.0"

clone-deep@^2.0.1:
version "2.0.2"
resolved "https://registry.yarnpkg.com/clone-deep/-/clone-deep-2.0.2.tgz#00db3a1e173656730d1188c3d6aced6d7ea97713"
integrity sha512-SZegPTKjCgpQH63E+eN6mVEEPdQBOUzjyJm5Pora4lrwWRFS8I0QAxV/KD6vV/i0WuijHZWQC1fMsPEdxfdVCQ==
clone-deep@^4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/clone-deep/-/clone-deep-4.0.1.tgz#c19fd9bdbbf85942b4fd979c84dcf7d5f07c2387"
integrity sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==
dependencies:
for-own "^1.0.0"
is-plain-object "^2.0.4"
kind-of "^6.0.0"
shallow-clone "^1.0.0"
kind-of "^6.0.2"
shallow-clone "^3.0.0"

clone-regexp@^2.1.0:
version "2.2.0"
Expand Down Expand Up @@ -6877,23 +6876,11 @@ for-each@^0.3.3:
dependencies:
is-callable "^1.1.3"

for-in@^0.1.3:
version "0.1.8"
resolved "https://registry.yarnpkg.com/for-in/-/for-in-0.1.8.tgz#d8773908e31256109952b1fdb9b3fa867d2775e1"
integrity sha1-2Hc5COMSVhCZUrH9ubP6hn0ndeE=

for-in@^1.0.1, for-in@^1.0.2:
for-in@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80"
integrity sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=

for-own@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/for-own/-/for-own-1.0.0.tgz#c63332f415cedc4b04dbfe70cf836494c53cb44b"
integrity sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=
dependencies:
for-in "^1.0.1"

forever-agent@~0.6.1:
version "0.6.1"
resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91"
Expand Down Expand Up @@ -7248,9 +7235,9 @@ gatsby-plugin-sass-resources@^2.0.0:
webpack "^4.0.0"

gatsby-plugin-sass@^2.0.11:
version "2.1.4"
resolved "https://registry.yarnpkg.com/gatsby-plugin-sass/-/gatsby-plugin-sass-2.1.4.tgz#93602fe2ccff6a1b86b392e36becfc783e92feb8"
integrity sha512-aVd5rBKUNn4AzvxbRZKMKAo0x5y532Adj5wUWGbd0wW0yyAuGa0nc/wd58Wf7kVChTI1uAaOMnbGh+mW6owmjw==
version "2.1.7"
resolved "https://registry.yarnpkg.com/gatsby-plugin-sass/-/gatsby-plugin-sass-2.1.7.tgz#7912153c2c1e6c82cfae53b53cdd6df975d0185c"
integrity sha512-7njUeGFSbN0iA/C3N1zXji64Aih0e+0irYIhQgW9DajFphErdX9UPEiNZQA8Yf9GHu3GBEsc/8ri0D/BAgci2Q==
dependencies:
"@babel/runtime" "^7.0.0"
sass-loader "^7.0.1"
Expand Down Expand Up @@ -10057,11 +10044,6 @@ lodash.sortby@^4.7.0:
resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438"
integrity sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=

lodash.tail@^4.1.1:
version "4.1.1"
resolved "https://registry.yarnpkg.com/lodash.tail/-/lodash.tail-4.1.1.tgz#d2333a36d9e7717c8ad2f7cacafec7c32b444664"
integrity sha1-0jM6NtnncXyK0vfKyv7HwytERmQ=

lodash.template@^4.0.2, lodash.template@^4.5.0:
version "4.5.0"
resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-4.5.0.tgz#f976195cf3f347d0d5f52483569fe8031ccce8ab"
Expand Down Expand Up @@ -10749,14 +10731,6 @@ mixin-deep@^1.2.0:
for-in "^1.0.2"
is-extendable "^1.0.1"

mixin-object@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/mixin-object/-/mixin-object-2.0.1.tgz#4fb949441dab182540f1fe035ba60e1947a5e57e"
integrity sha1-T7lJRB2rGCVA8f4DW6YOGUel5X4=
dependencies:
for-in "^0.1.3"
is-extendable "^0.1.1"

mkdirp-promise@^5.0.1:
version "5.0.1"
resolved "https://registry.yarnpkg.com/mkdirp-promise/-/mkdirp-promise-5.0.1.tgz#e9b8f68e552c68a9c1713b84883f7a1dd039b8a1"
Expand Down Expand Up @@ -13888,15 +13862,14 @@ sass-graph@^2.2.4:
yargs "^7.0.0"

sass-loader@^7.0.1:
version "7.1.0"
resolved "https://registry.yarnpkg.com/sass-loader/-/sass-loader-7.1.0.tgz#16fd5138cb8b424bf8a759528a1972d72aad069d"
integrity sha512-+G+BKGglmZM2GUSfT9TLuEp6tzehHPjAMoRRItOojWIqIGPloVCMhNIQuG639eJ+y033PaGTSjLaTHts8Kw79w==
version "7.2.0"
resolved "https://registry.yarnpkg.com/sass-loader/-/sass-loader-7.2.0.tgz#e34115239309d15b2527cb62b5dfefb62a96ff7f"
integrity sha512-h8yUWaWtsbuIiOCgR9fd9c2lRXZ2uG+h8Dzg/AGNj+Hg/3TO8+BBAW9mEP+mh8ei+qBKqSJ0F1FLlYjNBc61OA==
dependencies:
clone-deep "^2.0.1"
clone-deep "^4.0.1"
loader-utils "^1.0.1"
lodash.tail "^4.1.1"
neo-async "^2.5.0"
pify "^3.0.0"
pify "^4.0.1"
semver "^5.5.0"

sass-resources-loader@^1.3.3:
Expand Down Expand Up @@ -14119,14 +14092,12 @@ sha.js@^2.4.0, sha.js@^2.4.8:
inherits "^2.0.1"
safe-buffer "^5.0.1"

shallow-clone@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/shallow-clone/-/shallow-clone-1.0.0.tgz#4480cd06e882ef68b2ad88a3ea54832e2c48b571"
integrity sha512-oeXreoKR/SyNJtRJMAKPDSvd28OqEwG4eR/xc856cRGBII7gX9lvAqDxusPm0846z/w/hWYjI1NpKwJ00NHzRA==
shallow-clone@^3.0.0:
version "3.0.1"
resolved "https://registry.yarnpkg.com/shallow-clone/-/shallow-clone-3.0.1.tgz#8f2981ad92531f55035b01fb230769a40e02efa3"
integrity sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==
dependencies:
is-extendable "^0.1.1"
kind-of "^5.0.0"
mixin-object "^2.0.1"
kind-of "^6.0.2"

shallow-compare@^1.2.2:
version "1.2.2"
Expand Down