Skip to content

Commit

Permalink
Update Example Based on loadCSS Best Practice
Browse files Browse the repository at this point in the history
  • Loading branch information
jcbantuelle committed Dec 13, 2018
1 parent 0b3842c commit 3cd40f4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ The loadCSS and onloadCSS files will be added to the asset pipeline and availabl
Here's a quick example of what you would drop in your application's layout (usually `app/views/layouts/application.html.erb`):

```html
<link rel="preload" href="<%= stylesheet_path('application') %>" as="style" onload="this.rel='stylesheet'">
<link rel="preload" href="<%= stylesheet_path('application') %>" as="style" onload="this.onload=null;this.rel='stylesheet'">
<noscript><link rel="stylesheet" href="<%= stylesheet_path('application') %>"></noscript>
```

Expand All @@ -50,4 +50,4 @@ Feel free to open an issue ticket if you find something that could be improved.

* If the loadCSS scripts are outdated (i.e. maybe a new version of loadCSS was released yesterday), feel free to open an issue and prod us to get that thing updated. However, for security reasons, we won't be accepting pull requests with updated loadCSS scripts.

Copyright Michael Misshore, released under the MIT License.
Copyright Michael Misshore, released under the MIT License.

0 comments on commit 3cd40f4

Please sign in to comment.