sage-directives icon indicating copy to clipboard operation
sage-directives copied to clipboard

`@style` is already in use in Laravel Blade

Open maximilliangeorge opened this issue 2 years ago • 1 comments

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.

maximilliangeorge avatar Nov 29 '23 20:11 maximilliangeorge

@stylesheet sounds good. Care to do a PR?

Log1x avatar Dec 07 '23 18:12 Log1x