Uploaded image for project: 'Qt Project Website'
  1. Qt Project Website
  2. QTWEBSITE-1166

Documentation content lays out wider than browser width at narrower sizes

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • None
    • None
    • doc.qt.io
    • All
    • DaVinci 106

    Description

      I noticed this on https://doc.qt.io/qt-6/qml-qtquick-textinput.html initially. However, it appears to be a general issue not limited to that particular documentation page.

      The documentation content lays out wider than the available window width, unless the browser window is at least 1320px wide. At that point, a style rule constrained with

      @media (min-width: 1320px) 

      kicks in, which sets the width of the article element on the page to calc(100% - 300px).

      When the browser is narrower than 1320px, there is no rule constraining the width of the <article> tag, and (at least in Chrome 116.0.5845.179 Linux 64-bit) the element automatically lays out to 1128px wide, far wider than its div.b-sidebar__content  container (which is currently calc(100% - 40px) == 853px wide, in my 893px-wide window).

      While I'm sure there are many ways to address this, I find that simply adding a rule capping the width of the article element is sufficient, and does not interfere with existing style rules:

      article { max-width: 100%; }
      

      It's only because the article element has NO width rules applied at all, that the excessive width issue occurs.

       

      Note: I wanted to file this against the "Qt Project Website" component instead, as I have with docs site bugs in the past. However, I was prevented by this form validation error:

      "Affects Version/s" field is required and the project "Qt Project Website" does not have any versions.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            andreas.eliasson Andreas Eliasson
            ferdnyc Frank Dana
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes