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

    Details

    • Type: Bug
    • Status: Open
    • Priority: Normal
    • Resolution: Unresolved
    • Affects Version/s: 8.5.1
    • Fix Version/s: None
    • Component/s: Browser Issue, Components
    • Labels:
      None
    • Environment:

      Windows Chromium-based browsers:

      • Edge 85
      • Chrome 85

      Description

      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;
      }
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              rudyhuang rudyhuang
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated: