Skip to content

Commit

Permalink
Add instructions to @import typeface-*.css
Browse files Browse the repository at this point in the history
  • Loading branch information
snova-pavela committed May 13, 2020
1 parent f3e5cbb commit 4755855
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions docs/modules/ROOT/pages/add-fonts.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@ Here are the steps involved.
The Gulp build recognizes the `~` URL prefix and copies the font from the npm package to the build folder (and hence bundle).

. Repeat the previous step for each font style and weight you want to use from that package.

. Add all `typeface-XXXX.css` files you have created as `@import` rules to the `site.css` file like this:
+
[source,css]
----
@import "typeface-open-sans.css";
----

. Change the CSS to use your newly imported font:
+
[source,css]
Expand All @@ -51,6 +59,10 @@ html {
font-family: "Open Sans", sans;
}
----
+
If you are creating your UI by modifying the Default UI (this project), define your fonts in the `vars.css` file.
Look for the `/* fonts */` section.


. Test the new font by previewing your UI:

Expand Down

0 comments on commit 4755855

Please sign in to comment.