<commit_before>$notificationHeight: 56px;

// we need to override some of the toolbar styling
.app-toolbar mat-toolbar-row.notification-container {
  padding: 0;
  height: auto;
  overflow: hidden;
}

aio-notification {
  background: $darkgray;
  display: flex;
  position: relative;
  align-items: center;
  width: 100%;
  height: $notificationHeight;
  justify-content: center;

  @media (max-width: 430px) {
    justify-content: flex-start;
    padding-left: 10px;
  }

  .close-button {
    position: absolute;
    top: 0;
    right: 0;
    width: $notificationHeight;
    height: $notificationHeight;
    background: $darkgray;
  }

  .content {
    max-width: calc(100% - #{$notificationHeight});
    background: $darkgray;
    text-transform: none;
    padding: 0;

    > * {
      display: flex;
    }

    .icon {
      margin-right: 10px;
      @media (max-width: 464px) {
        display: none;
      }
    }

    .message {
      overflow: hidden;
      text-overflow: ellipsis;
      margin-right: 10px;
    }

    .action-button {
      background: $brightred;
      border-radius: 15px;
      text-transform: uppercase;
      padding: 0 10px;
      @include font-size(12);
      @media (max-width: 780px) {
        display: none;
      }
    }
  }
}

// Here are all the hacks to make the content and sidebars the right height
// when the notification is visible
.aio-notification-show {
  mat-sidenav-container.sidenav-container {
    .sidenav-content {
      padding-top: 80px + $notificationHeight;
    }

    mat-sidenav.sidenav {
      top: 64px + $notificationHeight;

      @media (max-width: 600px) {
        top: 56px + $notificationHeight;
      }
    }
  }

  .toc-container {
    top: 76px + $notificationHeight;
  }

  .search-results {
    padding-top: $notificationHeight;
  }

  &.page-home, &.page-resources, &.page-events, &.page-features, &.page-presskit, &.page-contribute  {
    .sidenav-content {
      padding-top: $notificationHeight;
    }
  }
}

// Animate the content when the notification bar is dismissed
// this should be kept in sync with the animation durations in
// - aio/src/app/layout/notification/notification.component.ts
// - aio/src/app/app.component.ts : notificationDismissed()
.aio-notification-animating {
  .sidenav-content {
    transition: padding-top 250ms ease;
  }

  mat-sidenav.sidenav, .toc-container {
    transition: top 250ms ease;
  }
}<commit_msg>fix(docs-infra): fix top padding of main content when a notification is visible (#40802)<commit_after>$notificationHeight: 56px;

// we need to override some of the toolbar styling
.app-toolbar mat-toolbar-row.notification-container {
  padding: 0;
  height: auto;
  overflow: hidden;
}

aio-notification {
  background: $darkgray;
  display: flex;
  position: relative;
  align-items: center;
  width: 100%;
  height: $notificationHeight;
  justify-content: center;

  @media (max-width: 430px) {
    justify-content: flex-start;
    padding-left: 10px;
  }

  .close-button {
    position: absolute;
    top: 0;
    right: 0;
    width: $notificationHeight;
    height: $notificationHeight;
    background: $darkgray;
  }

  .content {
    max-width: calc(100% - #{$notificationHeight});
    background: $darkgray;
    text-transform: none;
    padding: 0;

    > * {
      display: flex;
    }

    .icon {
      margin-right: 10px;
      @media (max-width: 464px) {
        display: none;
      }
    }

    .message {
      overflow: hidden;
      text-overflow: ellipsis;
      margin-right: 10px;
    }

    .action-button {
      background: $brightred;
      border-radius: 15px;
      text-transform: uppercase;
      padding: 0 10px;
      @include font-size(12);
      @media (max-width: 780px) {
        display: none;
      }
    }
  }
}

// Here are all the hacks to make the content and sidebars the right height
// when the notification is visible
.aio-notification-show {
  .toc-container {
    top: 76px + $notificationHeight;
  }

  .search-results {
    padding-top: $notificationHeight;
  }

  mat-sidenav-container.sidenav-container {
    .sidenav-content {
      padding-top: 80px + $notificationHeight;
    }

    mat-sidenav.sidenav {
      top: 64px + $notificationHeight;

      @media (max-width: 600px) {
        top: 56px + $notificationHeight;
      }
    }
  }

  &.page-home, &.page-resources, &.page-events, &.page-features, &.page-presskit, &.page-contribute  {
    mat-sidenav-container.sidenav-container {
      .sidenav-content {
        padding-top: $notificationHeight;
      }
    }
  }
}

// Animate the content when the notification bar is dismissed
// this should be kept in sync with the animation durations in
// - aio/src/app/layout/notification/notification.component.ts
// - aio/src/app/app.component.ts : notificationDismissed()
.aio-notification-animating {
  .sidenav-content {
    transition: padding-top 250ms ease;
  }

  mat-sidenav.sidenav, .toc-container {
    transition: top 250ms ease;
  }
}
{'fraction_non_alphanumeric': 0.12246129097124472, 'fraction_numerical': 0.021516187412024934, 'mean_word_length': 2.565591397849462, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3509410', 'n_tokens_mistral': 1755, 'n_tokens_neox': 1613, 'n_words': 381}