From 6fb93311a0b0b41b8058e59168dff0f372d4af56 Mon Sep 17 00:00:00 2001 From: Filip Ganyicz Date: Tue, 21 Jul 2026 13:20:43 +0200 Subject: [PATCH 1/7] Fix asymmetric padding on buttons with icons --- stubs/resources/views/flux/button/index.blade.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/stubs/resources/views/flux/button/index.blade.php b/stubs/resources/views/flux/button/index.blade.php index c716cadb..c2c21633 100644 --- a/stubs/resources/views/flux/button/index.blade.php +++ b/stubs/resources/views/flux/button/index.blade.php @@ -76,8 +76,16 @@ // If we have an icon, we want to reduce the padding on the side that has the icon... : ($iconLeading && $iconLeading !== '' ? 'ps-3' : 'ps-4') . ' ' . ($iconTrailing && $iconTrailing !== '' ? 'pe-3' : 'pe-4') ), - 'sm' => 'h-8 text-sm rounded-md' . ' ' . ($square ? 'w-8' : 'px-3'), - 'xs' => 'h-6 text-xs rounded-md' . ' ' . ($square ? 'w-6' : 'px-2'), + 'sm' => 'h-8 text-sm rounded-md' . ' ' . ( + $square + ? 'w-8' + : ($iconLeading && $iconLeading !== '' ? 'ps-2.5' : 'ps-3') . ' ' . ($iconTrailing && $iconTrailing !== '' ? 'pe-2.5' : 'pe-3') + ), + 'xs' => 'h-6 text-xs rounded-md' . ' ' . ( + $square + ? 'w-6' + : ($iconLeading && $iconLeading !== '' ? 'ps-1.5' : 'ps-2') . ' ' . ($iconTrailing && $iconTrailing !== '' ? 'pe-1.5' : 'pe-2') + ), }) ->add('inline-flex') // Buttons are inline by default but links are blocks, so inline-flex is needed here to ensure link-buttons are displayed the same as buttons... ->add($inset ? match ($size) { // Inset... From 0269db2eff0c2bfedfde6b15ef27016f7dbdde14 Mon Sep 17 00:00:00 2001 From: Filip Ganyicz Date: Tue, 21 Jul 2026 13:49:07 +0200 Subject: [PATCH 2/7] Fix --- stubs/resources/views/flux/button/index.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stubs/resources/views/flux/button/index.blade.php b/stubs/resources/views/flux/button/index.blade.php index c2c21633..16ec2d7a 100644 --- a/stubs/resources/views/flux/button/index.blade.php +++ b/stubs/resources/views/flux/button/index.blade.php @@ -74,7 +74,7 @@ $square ? 'w-10' // If we have an icon, we want to reduce the padding on the side that has the icon... - : ($iconLeading && $iconLeading !== '' ? 'ps-3' : 'ps-4') . ' ' . ($iconTrailing && $iconTrailing !== '' ? 'pe-3' : 'pe-4') + : ($iconLeading && $iconLeading !== '' ? 'ps-3.5' : 'ps-4') . ' ' . ($iconTrailing && $iconTrailing !== '' ? 'pe-3' : 'pe-4') ), 'sm' => 'h-8 text-sm rounded-md' . ' ' . ( $square From bbbcf9efae5b8fe75abc379bf7071eda124fbf88 Mon Sep 17 00:00:00 2001 From: Filip Ganyicz Date: Tue, 21 Jul 2026 15:42:32 +0200 Subject: [PATCH 3/7] Fix --- stubs/resources/views/flux/button/index.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stubs/resources/views/flux/button/index.blade.php b/stubs/resources/views/flux/button/index.blade.php index 16ec2d7a..efa8fd72 100644 --- a/stubs/resources/views/flux/button/index.blade.php +++ b/stubs/resources/views/flux/button/index.blade.php @@ -74,7 +74,7 @@ $square ? 'w-10' // If we have an icon, we want to reduce the padding on the side that has the icon... - : ($iconLeading && $iconLeading !== '' ? 'ps-3.5' : 'ps-4') . ' ' . ($iconTrailing && $iconTrailing !== '' ? 'pe-3' : 'pe-4') + : ($iconLeading && $iconLeading !== '' ? 'ps-3.5' : 'ps-4') . ' ' . ($iconTrailing && $iconTrailing !== '' ? 'pe-3.5' : 'pe-4') ), 'sm' => 'h-8 text-sm rounded-md' . ' ' . ( $square From eda33c417054f11a9680b1325c47389982c4ce45 Mon Sep 17 00:00:00 2001 From: Filip Ganyicz Date: Wed, 22 Jul 2026 10:59:52 +0200 Subject: [PATCH 4/7] Fix --- stubs/resources/views/flux/button/index.blade.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/stubs/resources/views/flux/button/index.blade.php b/stubs/resources/views/flux/button/index.blade.php index efa8fd72..ecd9b9b5 100644 --- a/stubs/resources/views/flux/button/index.blade.php +++ b/stubs/resources/views/flux/button/index.blade.php @@ -74,17 +74,17 @@ $square ? 'w-10' // If we have an icon, we want to reduce the padding on the side that has the icon... - : ($iconLeading && $iconLeading !== '' ? 'ps-3.5' : 'ps-4') . ' ' . ($iconTrailing && $iconTrailing !== '' ? 'pe-3.5' : 'pe-4') + : ($iconLeading && $iconLeading !== '' ? 'ps-3' : 'ps-4') . ' ' . ($iconTrailing && $iconTrailing !== '' ? 'pe-3' : 'pe-4') ), 'sm' => 'h-8 text-sm rounded-md' . ' ' . ( $square ? 'w-8' - : ($iconLeading && $iconLeading !== '' ? 'ps-2.5' : 'ps-3') . ' ' . ($iconTrailing && $iconTrailing !== '' ? 'pe-2.5' : 'pe-3') + : ($iconLeading && $iconLeading !== '' ? 'ps-2' : 'ps-3') . ' ' . ($iconTrailing && $iconTrailing !== '' ? 'pe-2' : 'pe-3') ), 'xs' => 'h-6 text-xs rounded-md' . ' ' . ( $square ? 'w-6' - : ($iconLeading && $iconLeading !== '' ? 'ps-1.5' : 'ps-2') . ' ' . ($iconTrailing && $iconTrailing !== '' ? 'pe-1.5' : 'pe-2') + : ($iconLeading && $iconLeading !== '' ? 'ps-1' : 'ps-2') . ' ' . ($iconTrailing && $iconTrailing !== '' ? 'pe-1' : 'pe-2') ), }) ->add('inline-flex') // Buttons are inline by default but links are blocks, so inline-flex is needed here to ensure link-buttons are displayed the same as buttons... From d99c2612a638fe479c0434dd168760bff4efd63e Mon Sep 17 00:00:00 2001 From: Filip Ganyicz Date: Wed, 22 Jul 2026 12:08:17 +0200 Subject: [PATCH 5/7] Fix --- stubs/resources/views/flux/button/index.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stubs/resources/views/flux/button/index.blade.php b/stubs/resources/views/flux/button/index.blade.php index ecd9b9b5..e8334996 100644 --- a/stubs/resources/views/flux/button/index.blade.php +++ b/stubs/resources/views/flux/button/index.blade.php @@ -91,7 +91,7 @@ ->add($inset ? match ($size) { // Inset... 'base' => $square ? Flux::applyInset($inset, top: '-mt-2.5', right: '-me-2.5', bottom: '-mb-2.5', left: '-ms-2.5') - : Flux::applyInset($inset, top: '-mt-2.5', right: '-me-4', bottom: '-mb-3', left: '-ms-4'), + : Flux::applyInset($inset, top: '-mt-2.5', right: ($iconTrailing && $iconTrailing !== '' ? '-me-3' : '-me-4'), bottom: '-mb-3', left: ($iconLeading && $iconLeading !== '' ? '-ms-3' : '-ms-4')), 'sm' => $square ? Flux::applyInset($inset, top: '-mt-1.5', right: '-me-1.5', bottom: '-mb-1.5', left: '-ms-1.5') : Flux::applyInset($inset, top: '-mt-1.5', right: '-me-3', bottom: '-mb-1.5', left: '-ms-3'), From 6af1f1623e0e3acf4828846f20663afd1e6113f7 Mon Sep 17 00:00:00 2001 From: Filip Ganyicz Date: Wed, 22 Jul 2026 12:14:43 +0200 Subject: [PATCH 6/7] Fix --- stubs/resources/views/flux/button/index.blade.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stubs/resources/views/flux/button/index.blade.php b/stubs/resources/views/flux/button/index.blade.php index e8334996..40c181e7 100644 --- a/stubs/resources/views/flux/button/index.blade.php +++ b/stubs/resources/views/flux/button/index.blade.php @@ -94,10 +94,10 @@ : Flux::applyInset($inset, top: '-mt-2.5', right: ($iconTrailing && $iconTrailing !== '' ? '-me-3' : '-me-4'), bottom: '-mb-3', left: ($iconLeading && $iconLeading !== '' ? '-ms-3' : '-ms-4')), 'sm' => $square ? Flux::applyInset($inset, top: '-mt-1.5', right: '-me-1.5', bottom: '-mb-1.5', left: '-ms-1.5') - : Flux::applyInset($inset, top: '-mt-1.5', right: '-me-3', bottom: '-mb-1.5', left: '-ms-3'), + : Flux::applyInset($inset, top: '-mt-1.5', right: ($iconTrailing && $iconTrailing !== '' ? '-me-2' : '-me-3'), bottom: '-mb-1.5', left: ($iconLeading && $iconLeading !== '' ? '-ms-2' : '-ms-3')), 'xs' => $square ? Flux::applyInset($inset, top: '-mt-1', right: '-me-1', bottom: '-mb-1', left: '-ms-1') - : Flux::applyInset($inset, top: '-mt-1', right: '-me-2', bottom: '-mb-1', left: '-ms-2'), + : Flux::applyInset($inset, top: '-mt-1', right: ($iconTrailing && $iconTrailing !== '' ? '-me-1' : '-me-2'), bottom: '-mb-1', left: ($iconLeading && $iconLeading !== '' ? '-ms-1' : '-ms-2')), } : '') ->add(match ($variant) { // Background color... 'primary' => 'bg-[var(--color-accent)] hover:bg-[color-mix(in_oklab,_var(--color-accent),_transparent_10%)]', From eb38578541879d2dff8b76e301a6e93545a7f652 Mon Sep 17 00:00:00 2001 From: Filip Ganyicz Date: Fri, 24 Jul 2026 16:23:35 +0200 Subject: [PATCH 7/7] Update index.blade.php --- stubs/resources/views/flux/button/index.blade.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/stubs/resources/views/flux/button/index.blade.php b/stubs/resources/views/flux/button/index.blade.php index 40c181e7..26c8dfc8 100644 --- a/stubs/resources/views/flux/button/index.blade.php +++ b/stubs/resources/views/flux/button/index.blade.php @@ -62,7 +62,7 @@ } $classes = Flux::classes() - ->add('relative items-center font-medium justify-center gap-2 whitespace-nowrap') + ->add('relative items-center font-medium justify-center whitespace-nowrap') ->add('disabled:opacity-75 dark:disabled:opacity-75 disabled:cursor-default disabled:pointer-events-none') ->add(match ($align) { 'start' => 'justify-start', @@ -70,18 +70,18 @@ 'end' => 'justify-end', }) ->add(match ($size) { // Size... - 'base' => 'h-10 text-sm rounded-lg' . ' ' . ( + 'base' => 'h-10 text-sm rounded-lg gap-2' . ' ' . ( $square ? 'w-10' // If we have an icon, we want to reduce the padding on the side that has the icon... : ($iconLeading && $iconLeading !== '' ? 'ps-3' : 'ps-4') . ' ' . ($iconTrailing && $iconTrailing !== '' ? 'pe-3' : 'pe-4') ), - 'sm' => 'h-8 text-sm rounded-md' . ' ' . ( + 'sm' => 'h-8 text-sm rounded-md gap-2' . ' ' . ( $square ? 'w-8' : ($iconLeading && $iconLeading !== '' ? 'ps-2' : 'ps-3') . ' ' . ($iconTrailing && $iconTrailing !== '' ? 'pe-2' : 'pe-3') ), - 'xs' => 'h-6 text-xs rounded-md' . ' ' . ( + 'xs' => 'h-6 text-xs rounded-md gap-1' . ' ' . ( $square ? 'w-6' : ($iconLeading && $iconLeading !== '' ? 'ps-1' : 'ps-2') . ' ' . ($iconTrailing && $iconTrailing !== '' ? 'pe-1' : 'pe-2')