CoreFiles by mySites.guru
_css-grid.scss145 lines, 3,777 bytes, from Joomla_4.0.0-alpha10-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha9
md5
cfb1c523bf0889507ff5645939a511e9
sha1
e9c10ac4a02a89a76dd47db946f24580c5518784
sha256
adf4c31b1f9cc152d7dafa6988ab7fa04c1a2d7e2072fbfaa1224449022e6dbc
// 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 ."
      ". 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 .";
    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-down(xs) {
      grid-template-areas:
        ". head head head head ."
        ". banner banner banner banner ."
        ". comp comp comp comp ."
        ". side-l side-l side-l side-l ."
        ". side-r side-r side-r side-r ."
        ". top-a top-a top-a top-a ."
        ". top-b top-b top-b top-b ."
        ". bot-a bot-a bot-a bot-a ."
        ". bot-b bot-b bot-b bot-b ."
        ". footer footer footer footer ."
        ". debug debug debug debug .";
    }

    .container-header {
      margin-top: 0;
      margin-bottom: 20px;

      + div:not(.container-banner) {
        margin-top: $cassiopeia-grid-gutter;
      }
    }

    &.wrapper-fluid {
      .grid-child, .container-header header {
        grid-column: full-start / full-end;
        max-width: none;
        margin-left: 0;
        margin-right: 0;
        padding-right: 0;
        padding-left: 0;
      }

      > .grid-child {
        padding-right: ($cassiopeia-grid-gutter * 2);
        padding-left: ($cassiopeia-grid-gutter * 2);     
      }

      .container-main {
        padding-right: ($cassiopeia-grid-gutter * 1.5);
        padding-left: ($cassiopeia-grid-gutter * 1.5);
      }
    }
  }

  .container-banner {
    z-index: 5;
    margin: -2rem 0 0;
    padding: 0 ($cassiopeia-grid-gutter / 2);

    p {
      margin-bottom: 0;
    }

    @include media-breakpoint-up(xl) {
      margin-top: -3rem;
    }
  }
}

.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: repeat(auto-fit, minmax(24%, 1fr));

  > div {
    margin: 0;
  }

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

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

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