sage-directives
sage-directives copied to clipboard
`@style` is already in use in Laravel Blade
I was scratching my head for quite a few minutes until I realised what was going on.
I tried to apply conditional style rules to an element using @style as per the Laravel Blade docs.
<div class="flex" @style([
'align-items: center' => $align === 'center'
])>
The above code rendered:
<div class="flex" <link="" rel="stylesheet" href="[
align-items: center => $align === center
]">
Turns out it was this packages that added its own @style directive to overwrite the default. Perhaps another name can be used, like @stylesheet.
@stylesheet sounds good. Care to do a PR?