From 536fccc54a802942a6f5895aaa5489615e8a4ec8 Mon Sep 17 00:00:00 2001 From: Cagatay Civici Date: Thu, 9 Jan 2025 18:17:41 +0300 Subject: [PATCH] fix: Button icon only regression. Fixed: #17338 --- apps/showcase/assets/styles/layout/_core.scss | 2 +- packages/primeng/src/button/button.ts | 2 +- packages/primeng/src/button/style/buttonstyle.ts | 6 ++++++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/apps/showcase/assets/styles/layout/_core.scss b/apps/showcase/assets/styles/layout/_core.scss index 11069f90fdd..99c9336c344 100644 --- a/apps/showcase/assets/styles/layout/_core.scss +++ b/apps/showcase/assets/styles/layout/_core.scss @@ -2,7 +2,7 @@ html { font-size: 14px; font-family: "Inter var", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; font-feature-settings: "cv02","cv03","cv04","cv11"; - line-height: normal; + line-height: 1.2; } .material { diff --git a/packages/primeng/src/button/button.ts b/packages/primeng/src/button/button.ts index 6c7fe94ad18..3ded2413b52 100755 --- a/packages/primeng/src/button/button.ts +++ b/packages/primeng/src/button/button.ts @@ -460,7 +460,7 @@ export class ButtonDirective extends BaseComponent implements AfterViewInit, OnD - {{ label || ' ' }} + {{ label }} `, diff --git a/packages/primeng/src/button/style/buttonstyle.ts b/packages/primeng/src/button/style/buttonstyle.ts index 1e70562bf28..c85c4051bc6 100644 --- a/packages/primeng/src/button/style/buttonstyle.ts +++ b/packages/primeng/src/button/style/buttonstyle.ts @@ -25,6 +25,12 @@ const theme = ({ dt }) => ` gap: ${dt('button.gap')}; } +.p-button-icon, +.p-button-icon:before, +.p-button-icon:after { + line-height: inherit; +} + .p-button:disabled { cursor: default; }