yapp 4.0.50 → 4.0.51

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -198,6 +198,22 @@ If you choose to enable Fira Code then you need to provide the necessary web fon
198
198
  ```
199
199
  You do not have to provide this, rendering Yapp's styles will do so, but it is recommended that you check the network tab in your browser's developer tools to ensure that these files are being served.
200
200
 
201
+ You can also preload the font files by putting the following in the header of the containing HTML page:
202
+
203
+ ```
204
+ <link rel="preload" href="${host}/css/woff2/FiraCode-Bold.woff2" as="font" type="font/woff2" crossorigin>
205
+ <link rel="preload" href="${host}/css/woff2/FiraCode-Light.woff2" as="font" type="font/woff2" crossorigin>
206
+ <link rel="preload" href="${host}/css/woff2/FiraCode-Medium.woff2" as="font" type="font/woff2" crossorigin>
207
+ <link rel="preload" href="${host}/css/woff2/FiraCode-Regular.woff2" as="font" type="font/woff2" crossorigin>
208
+
209
+ <link rel="preload" href="${host}/css/woff/FiraCode-Bold.woff" as="font" type="font/woff" crossorigin>
210
+ <link rel="preload" href="${host}/css/woff/FiraCode-Light.woff" as="font" type="font/woff" crossorigin>
211
+ <link rel="preload" href="${host}/css/woff/FiraCode-Medium.woff" as="font" type="font/woff" crossorigin>
212
+ <link rel="preload" href="${host}/css/woff/FiraCode-Regular.woff" as="font" type="font/woff" crossorigin>
213
+ ```
214
+
215
+ A `host` variable has been included here, the value of which should be the same as the `host` argument passed to the `firaCodeStyle()` function mentioned in the section on syntax styles further down. You may need to change the markup in the above snippet, depending on your templating library.
216
+
201
217
  ## Styling Yapp
202
218
 
203
219
  Each of the usage examples in the usage section includes the following code:
@@ -302,7 +318,7 @@ In fact the above is just what the `renderYappStyles()` function does. In leavin
302
318
 
303
319
  ### Hidden scrollbars and gutters, and fancy scrollbars
304
320
 
305
- You can hide the scrollbars and gutter with the `hiddenScrollbars` and `hiddenGutter` JSX attributes, respectively, and enable fancy scrollbars with the `fancyScrollbars` JSX attribute. These attributes can also be included as options. Fancy scrollbars have hidden tracks and thinner, rounded thumbs. They look something like old Mac scrollbars. Appearances will only differ on WebKit browsers such as Chrome and Safari because the styles make use of the `-webkit` prefix.
321
+ You can hide the scrollbars and gutter with the `hiddenScrollbars` and `hiddenGutter` JSX attributes, respectively, and enable fancy scrollbars with the `fancyScrollbars` JSX attribute. These attributes can also be included as options. Fancy scrollbars have hidden tracks and thinner, rounded thumbs. They look something like old Mac scrollbars. Appearances will differ across browsers.
306
322
 
307
323
  ## Plugins
308
324
 
package/example.html CHANGED
@@ -2,6 +2,17 @@
2
2
  <html>
3
3
  <head>
4
4
  <title>Yapp</title>
5
+
6
+ <link rel="preload" href="css/woff2/FiraCode-Bold.woff2" as="font" type="font/woff2" crossorigin>
7
+ <link rel="preload" href="css/woff2/FiraCode-Light.woff2" as="font" type="font/woff2" crossorigin>
8
+ <link rel="preload" href="css/woff2/FiraCode-Medium.woff2" as="font" type="font/woff2" crossorigin>
9
+ <link rel="preload" href="css/woff2/FiraCode-Regular.woff2" as="font" type="font/woff2" crossorigin>
10
+
11
+ <link rel="preload" href="css/woff/FiraCode-Bold.woff" as="font" type="font/woff" crossorigin>
12
+ <link rel="preload" href="css/woff/FiraCode-Light.woff" as="font" type="font/woff" crossorigin>
13
+ <link rel="preload" href="css/woff/FiraCode-Medium.woff" as="font" type="font/woff" crossorigin>
14
+ <link rel="preload" href="css/woff/FiraCode-Regular.woff" as="font" type="font/woff" crossorigin>
15
+
5
16
  <style>
6
17
 
7
18
  *,