瀏覽代碼

Fix icon alignment for btn-sm and btn-xl sizes #2474 (#2478)

Co-authored-by: Paweł Kuna <[email protected]>
Vedang Shelatkar 4 天之前
父節點
當前提交
c860288558
共有 2 個文件被更改,包括 9 次插入0 次删除
  1. 5 0
      .changeset/curvy-timers-sneeze.md
  2. 4 0
      core/scss/ui/_buttons.scss

+ 5 - 0
.changeset/curvy-timers-sneeze.md

@@ -0,0 +1,5 @@
+---
+"@tabler/core": patch
+---
+
+Fix icon alignment for `.btn-sm` and `.btn-xl` sizes

+ 4 - 0
core/scss/ui/_buttons.scss

@@ -187,6 +187,10 @@
   .icon {
     margin: calc(-1 * var(--#{$prefix}btn-padding-x));
   }
+  //[BUG] btn-sm and btn-xl with an icon looks broken 
+  //issue #2470 fixed
+  min-width: calc(var(--#{$prefix}btn-icon-size) + (var(--#{$prefix}btn-padding-x) * 2));
+  min-height: calc(var(--#{$prefix}btn-icon-size) + (var(--#{$prefix}btn-padding-y) * 2));
 }
 
 //