Skip to content

Commit 5a842a2

Browse files
committed
MC-15763: Introduce critical CSS scope loaded through head
- Stabilization
1 parent d85b3c2 commit 5a842a2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

app/code/Magento/Theme/Controller/Result/AsyncCssPlugin.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,9 @@ function ($matches) use (&$cssMatches) {
5858
}
5959
$media = $media ?? 'all';
6060
$loadCssAsync = sprintf(
61-
'<link rel="preload" as="style" media="%s" href="%s">',
61+
'<link rel="preload" as="style" media="%s" .
62+
onload="this.onload=null;this.rel=\'stylesheet\'"' .
63+
'href="%s">',
6264
$media,
6365
$href
6466
);

0 commit comments

Comments
 (0)