rails_critical_css 0.3.7 → 0.3.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/rails_critical_css/helpers.rb +4 -2
- data/lib/rails_critical_css/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '08b36ef0e246ec233ed907921d184c1b2988f310d6bf993b7416f83735390810'
|
4
|
+
data.tar.gz: 59ae0dabd12e65f59389ff27ecfb5ba0bbf912f1f38f80871bf353b268243918
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3849a469e93679d1393f405c34825ef6812ed614f2e9f38edc71d80aadc500f6d9255aa55dbb7915d3ec7e9f9fba28892ad37836c89850860111f492a8af556e
|
7
|
+
data.tar.gz: 6219ecd0584ab16821af3bbdb18ecff40d397f447350c7ea23c1fd95b4d170a2aa7f71e52a14973e0f2c4e911f94df3963e778434693f027151d8a1c74c853cf
|
data/Gemfile.lock
CHANGED
@@ -33,9 +33,11 @@ module RailsCriticalCss::Helpers
|
|
33
33
|
|
34
34
|
def critical_css_link(href:, media: nil)
|
35
35
|
if critical_css?
|
36
|
-
link_to
|
36
|
+
link_to(href: href, rel: 'preload', as: 'style', media: media, onload: "this.rel = 'stylesheet'")
|
37
37
|
else
|
38
|
-
|
38
|
+
append_css_tags_assets(content) do
|
39
|
+
link_to(href: href, rel: 'stylesheet', media: media)
|
40
|
+
end
|
39
41
|
end
|
40
42
|
end
|
41
43
|
end
|