Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-14210

container macro doesn't work properly with dynamic layout

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 8.4.4, 9.2
    • Fix Version/s: None
    • Component/s: Rendering
    • Labels:
      None
    • Difficulty:
      Unknown
    • Similar issues:

      Description

      Create document with content:

      {{container layoutStyle="columns"}}
      (((first column)))
      (((second column)))
      {{/container}}
      

      Note that columns are not moved in one column with small screen width anymore.
      Problem is that macro generates HTML with another class container-columns-2

      <div class="container-columns container-columns-2">
      <div class="column first-column">
      <p>first column</p></div>
      <div class="column last-column">
      <p>second column</p></div>
      <div class="clearfloats"></div></div>
      

      But .../xwiki/resources/uicomponents/container/columns.css generates CSS just class container-columns:

      .container-justified{text-align:justify}.container-columns
      .column{float:left}@media...etc.
      

      As a workaround I "fixed" it myself by adding following Theme's lessCode (which is working only with 2 column layout):

      /* -------------------- Fix for 2-column container */
      @media(max-width:1023px) {
      .container-columns.container-columns-2 .column {
          width: 100%;
          padding-right: 0;
          padding-left: 0;
        }
      }
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              valdisvi Valdis Vitolins
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: