Uploaded image for project: 'Bitbucket Cloud'
  1. Bitbucket Cloud
  2. BCLOUD-14182

Line numbers do not line up

    XMLWordPrintable

Details

    Description

      Because boldness of a font can change it's content height, syntax highlighting can make line numbers not line up to lines, since line numbers will never be bolded, and line numbers will only match if the content height of the lines of the content are as tall as the line numbers.

      For example, on my Lubuntu system, the first source code font available from the given specifier on Bitbucket is Courier.

      Line numbers do not add up to lines on this file (see screenshot):

      https://bitbucket.org/progether/igd-health/src/master/modules/uke-portal-php/web/ops/i18n/client_en.properties

      I noticed that you are using "font-weight: 700" on the equal signs in this file. Elements set in bold fonts versus normal fonts do not necessarily have the same content heights. See http://stackoverflow.com/a/8376913\\
      On my Lubuntu system, from the font specifier you have ('Consolas,Menlo,"Liberation Mono",Courier,monospace', only Courier is available.

      You can see how that snippet appears in the attached screenshot. Note how the content height can differ even if the line-height and the font-size is the same.

      I use Firefox 52.0.2 on Ubuntu 16.04 on a 96x96 DPI display running in vmware with the vmware display driver in X.org.

      One proposed fix would be to absolutely position the lines or enforce their heights.

      Attachments

        Activity

          People

            Unassigned Unassigned
            5bbe20a48ac3 JanusT
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: