Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-4663

a button with a font awesome icon is higher than a default button on Windows Chromium-based browsers

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • 8.5.1
    • Browser Issue, Components
    • Windows Chromium-based browsers:

      • Edge 85
      • Chrome 85
    • None

      Steps to Reproduce

      1. run the zul

      <zk>
      	<button label="submit"></button>
      	<button label="submit" iconSclass="z-icon-search"></button>
      </zk>
      

      Current Result

      a button with a font awesome icon is higher than a default button

      Only found on Windows Chromium-based browsers. The image below was captured on macOS Chrome 85.

      Expected Result

      both have the same height by default.

      Font awesome is a built-in icon set, users would expect it works by default without any issue. Therefore, a button with an icon should look consistent in size.

      Debug Information

      line-height: normal;
      

      Depends on the user agent. Desktop browsers (including Firefox) use a default value of roughly 1.2, depending on the element's font-family.

      Since the used font-family is different between macOS (Helvetica Neue) and Windows (Arial), it could be a root cause.

      Workaround

      .z-button i {
      	font-size: 14px;
      }
      

            DevChu DevChu
            rudyhuang rudyhuang
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: