CoreFiles by mySites.guru
_css-grid.scss152 lines, 2,993 bytes, from Joomla_4.0.0-beta1-Beta-Full_Package.zip
Raw History Compare with 3.9.0-beta4
md5
2400aaac776b342bd9be3a31f3856388
sha1
63644af3dee6d980faac860206642a2bc3e2d056
sha256
5a49244f3f49a9b13fa74d80801edebf0edeb6e00e9c820e6444a8490a58bb66
// CSS Grid

@supports (display: grid) {
  .site-grid {
    display: grid;
    grid-template-areas: ". head head head head ."
    ". banner banner banner banner ."
    ". top-a top-a top-a top-a ."
    ". top-b top-b top-b top-b ."
    ". comp comp comp comp ."
    ". side-r side-r side-r side-r ."
    ". side-l side-l side-l side-l ."
    ". bot-a bot-a bot-a bot-a ."
    ". bot-b bot-b bot-b bot-b ."
    ". footer footer footer footer ."
    ". debug debug debug debug .";
    grid-template-columns: [full-start] minmax(0, 1fr) [main-start] repeat(4, minmax(0, 270px)) [main-end] minmax(0, 1fr) [full-end];
    grid-gap: 0 $cassiopeia-grid-gutter;

    > [class^='container-'],
    > [class*=' container-'] {
      width: auto;
      max-width: none;
      margin: 0 0 $cassiopeia-grid-gutter;
    }

    .container-component,
    .container-sidebar-left,
    .container-sidebar-right {
      display: flex;
      flex-direction: column;

      > div + div {
        margin-top: cassiopeia-grid-gutter;
      }
    }

    &:not(.has-sidebar-left) .container-component {
      grid-column-start: main-start;
    }

    &:not(.has-sidebar-right) .container-component {
      grid-column-end: main-end;
    }

    > .full-width {
      grid-column: full-start / full-end;
    }

    @include media-breakpoint-up(md) {
      grid-template-areas:
        ". head head head head ."
        ". banner banner banner banner ."
        ". top-a top-a top-a top-a ."
        ". top-b top-b top-b top-b ."
        ". side-l comp comp side-r ."
        ". bot-a bot-a bot-a bot-a ."
        ". bot-b bot-b bot-b bot-b ."
        ". footer footer footer footer ."
        ". debug debug debug debug .";
    }

    &.wrapper-fluid {
      grid-template-columns: [full-start] minmax(0, 1fr) [main-start] repeat(4, minmax(0, 25%)) [main-end] minmax(0, 1fr) [full-end];
    }
  }

  .container-banner {
    padding: 0 ($cassiopeia-grid-gutter / 2);
  }
}

.container-header {
  grid-area: head;
}

.container-banner {
  grid-area: banner;
}

.container-top-a {
  grid-area: top-a;
}

.container-top-b {
  grid-area: top-b;
}

.container-main {
  grid-area: main;
}

.container-component {
  grid-area: comp;
}

.container-sidebar-left {
  grid-area: side-l;
}

.container-sidebar-right {
  grid-area: side-r;
}

.container-main-top {
  grid-area: main-t;
}

.container-main-bottom {
  grid-area: main-b;
}

.container-bradcrumbs {
  grid-area: bread;
}

.container-bottom-a {
  grid-area: bot-a;
}

.container-bottom-b {
  grid-area: bot-b;
}

.container-footer {
  grid-area: footer;
}

.system-debug {
  grid-area: debug;
}

.container-top-a,
.container-top-b,
.container-bottom-a,
.container-bottom-b {
  display: grid;
  grid-gap: $cassiopeia-grid-gutter;
  grid-template-columns: 1fr;

  > div {
    margin: 0;
  }

  @include media-breakpoint-up(sm) {
    grid-template-columns: 1fr 1fr;
  }

  @include media-breakpoint-up(md) {
    grid-template-columns: repeat(auto-fit, minmax(24%, 1fr));
  }
}

The same content is in 2 releases, Joomla 4.0.0-beta to 4.0.0-beta2. See them all, or every version of this file.