Skip to content

Commit 30e51a2

Browse files
committed
✨ make css helper work like kirby core for string param
Signed-off-by: Bruno Meilick <[email protected]>
1 parent 4ded129 commit 30e51a2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

classes/Fingerprint.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,10 @@ private function write(array $lookup): bool
220220
*/
221221
public static function css($url, $attrs = []): string
222222
{
223+
if (is_string( $attrs)) {
224+
$attrs = ['media' => $attrs];
225+
}
226+
223227
return (new Fingerprint())->helper('css', $url, $attrs);
224228
}
225229

0 commit comments

Comments
 (0)