Skip to content

Comments

[Toolkit] Fix tailwind_merge parentheses and simplify attributes#3348

Merged
Kocal merged 1 commit intosymfony:2.xfrom
seb-jean:improve-toolkit
Feb 19, 2026
Merged

[Toolkit] Fix tailwind_merge parentheses and simplify attributes#3348
Kocal merged 1 commit intosymfony:2.xfrom
seb-jean:improve-toolkit

Conversation

@seb-jean
Copy link
Contributor

…rendering in shadcn templates

Q A
Bug fix? yes
New feature? no
Deprecations? no
Documentation? no
Issues Fix #...
License MIT

A few fixes for the Toolkit templates :):

Fix tailwind_merge parentheses

Before:

    class="{{ 'absolute top-2 right-2 ' ~ attributes.render('class')|tailwind_merge }}"

After:

    class="{{ ('absolute top-2 right-2 ' ~ attributes.render('class'))|tailwind_merge }}"`

Simplify attributes

Before:

<twig:Pagination:Link
    aria-label="Go to next page"
    size="default"
    class="{{ 'gap-1 pr-2.5 ' ~ attributes.render('class')|tailwind_merge }}"
    {{ ...attributes.without('class') }}
>
    <span>Next</span>
    <twig:ux:icon name="lucide:chevron-right" class="size-4" />
</twig:Pagination:Link>

After:

<twig:Pagination:Link
    aria-label="Go to next page"
    size="default"
    class="{{ ('gap-1 pr-2.5 ' ~ attributes.render('class'))|tailwind_merge }}"
    {{ ...attributes }}
>
    <span>Next</span>
    <twig:ux:icon name="lucide:chevron-right" class="size-4" />
</twig:Pagination:Link>

@seb-jean seb-jean requested a review from Kocal as a code owner February 19, 2026 08:11
@carsonbot carsonbot added Status: Needs Review Needs to be reviewed Bug Bug Fix Toolkit labels Feb 19, 2026
@seb-jean seb-jean force-pushed the improve-toolkit branch 2 times, most recently from 18590e8 to 1a968ca Compare February 19, 2026 08:31
@Kocal
Copy link
Member

Kocal commented Feb 19, 2026

Oops, nice catch!

@Kocal
Copy link
Member

Kocal commented Feb 19, 2026

Thank you @seb-jean.

@Kocal Kocal merged commit fe5e0d0 into symfony:2.x Feb 19, 2026
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Bug Fix Status: Needs Review Needs to be reviewed Toolkit

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants