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

container macro doesn't work properly with dynamic layout

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 12.8-rc-1
    • 8.4.4, 9.2
    • Rendering
    • Unknown
    • N/A
    • N/A
    • Pull Request accepted

    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

        Issue Links

          Activity

            People

              lucaa Anca Luca
              valdisvi Valdis Vitolins
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: