<commit_before>/**
 *    Copyright 2015-2018 ppy Pty. Ltd.
 *
 *    This file is part of osu!web. osu!web is distributed with the hope of
 *    attracting more community contributions to the core ecosystem of osu!.
 *
 *    osu!web is free software: you can redistribute it and/or modify
 *    it under the terms of the Affero GNU General Public License version 3
 *    as published by the Free Software Foundation.
 *
 *    osu!web is distributed WITHOUT ANY WARRANTY; without even the implied
 *    warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 *    See the GNU Affero General Public License for more details.
 *
 *    You should have received a copy of the GNU Affero General Public License
 *    along with osu!web.  If not, see <http://www.gnu.org/licenses/>.
 */

.nav2 {
  @_top: nav2;
  @_sticky: nav2-header--sticky;
  @_icon-size: 40px;
  @_button-content-size: 16px;
  @_menu-gutter: 10px;
  @_link-padding-vertical: 6px;
  @_link-highlight-margin-vertical: 2px;
  @_padding-vertical: ((@nav2-height - @nav2-menu-height) / 2);

  .own-layer();
  padding: @_padding-vertical 0;
  width: 100%;
  height: @nav2-height;
  display: flex;
  font-size: @font-size--title-small;
  font-weight: 500;
  z-index: @z-index--nav2;

  .@{_sticky} & {
    height: 50px;
  }

  &__button {
    .reset-input();
    .circle(@_icon-size);
    .center-content();
    .link-plain();
    border: 3px solid fade(#fff, 25%);
    font-size: @_button-content-size;
    color: #fff;
    margin: 0 3px;

    &.js-click-menu--active, &:hover {
      background-color: fade(#000, 50%);
      border-color: #fff;
      color: #fff;
    }

    &--social {
      &:hover {
        color: #fff;
      }
    }

    &--stadium {
      width: auto;
      border-radius: @_icon-size;
      padding: 0 10px;
    }

    &--support {
      &:hover {
        color: @pink;
      }
    }
  }

  &__click-popup {
    position: absolute;
    top: 100%;
    right: 0; // avoid overflow before repositioned
    height: 0; // avoid covering page when the content is hidden
    margin-top: -5px;

    &--user {
      margin-top: 20px;
    }
  }

  &__col {
    display: flex;
    align-items: center;
    flex: none;

    &--avatar {
      margin-left: 6px;
    }

    &--logo {
      margin-right: 10px;
    }

    &--menu {
      align-items: stretch;
    }
  }

  &__colgroup {
    display: flex;
    flex: none;

    &--menu {
      margin-right: auto;
    }
  }

  &__locale-current-flag {
    height: @_button-content-size;
  }

  &__logo {
    .full-size();
    background-size: contain;
    background-repeat: no-repeat;
    transition: all 100ms ease-in-out;
    will-change: opacity, transform;

    background-image: url('/images/layout/osu-logo-white.svg');

    .@{_top}__logo-link:hover & {
      // be careful of weird snapping at the end of animation on Firefox (with 1.1, ~60px).
      transform: scale(1.11);
    }

    &--bg {
      background-image: url('/images/layout/osu-logo-triangles.svg');
      opacity: 0;

      .@{_top}__logo-link:hover & {
        opacity: 1;
      }
    }
  }

  &__logo-link {
    @__logo-whitespace: 5px;
    @_logo-size: (@nav2-menu-height + @__logo-whitespace * 2);
    width: @_logo-size;
    height: @_logo-size;
    margin: -@__logo-whitespace;

    .@{_sticky} & {
      height: 40px;
    }
  }

  &__menu-link {
    .link-plain();
    padding: 6px @_menu-gutter;
    line-height: 1;

    color: @pink-light;

    &::after {
      content: '';
      position: absolute;

      border-radius: 10px;
      top: (@_link-padding-vertical + @_link-highlight-margin-vertical);
      right: 100%;
      width: 3px;
      height: calc(100% ~'-' (@_link-padding-vertical * 2 + @_link-highlight-margin-vertical * 2));
      background-color: @yellow;
      opacity: 0;
      will-change: opacity;
    }

    &:hover {
      color: #fff;

      &::after {
        opacity: 1;
      }
    }

    &:active {
      color: #fff;
    }
  }

  &__menu-link-main {
    .link-white();
    .link-plain();
    padding: 10px @_menu-gutter;
    display: flex;
    align-items: center;

    .@{_top}__colgroup:hover & {
      color: fade(#fff, 70%);

      &:hover, &.js-menu--active {
        color: #fff;
      }
    }

    &--search {
      .center-content();
      .circle(40px);
      align-self: center;
      padding: 0;
    }
  }

  &__menu-link-bar {
    position: absolute;
    top: 100%;
    margin-top: 5px;
    height: 3px;
    border-radius: 10px;
    width: 100%;
    display: block;
  }

  &__menu-popup {
    position: absolute;
    top: 100%;
    height: 0; // avoid covering page when the content is hidden
    margin-top: -5px;
    left: @_menu-gutter;
    white-space: nowrap;
    display: flex;
    flex-direction: column;

    &[data-visibility] {
      transition: none;
    }
  }

  &__notification-count {
    margin-left: 5px;
    font-size: @font-size--small;
  }
}
<commit_msg>slightly better menu position when header is sticky<commit_after>/**
 *    Copyright 2015-2018 ppy Pty. Ltd.
 *
 *    This file is part of osu!web. osu!web is distributed with the hope of
 *    attracting more community contributions to the core ecosystem of osu!.
 *
 *    osu!web is free software: you can redistribute it and/or modify
 *    it under the terms of the Affero GNU General Public License version 3
 *    as published by the Free Software Foundation.
 *
 *    osu!web is distributed WITHOUT ANY WARRANTY; without even the implied
 *    warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 *    See the GNU Affero General Public License for more details.
 *
 *    You should have received a copy of the GNU Affero General Public License
 *    along with osu!web.  If not, see <http://www.gnu.org/licenses/>.
 */

.nav2 {
  @_top: nav2;
  @_sticky: nav2-header--sticky;
  @_icon-size: 40px;
  @_button-content-size: 16px;
  @_menu-gutter: 10px;
  @_link-padding-vertical: 6px;
  @_link-highlight-margin-vertical: 2px;
  @_padding-vertical: ((@nav2-height - @nav2-menu-height) / 2);
  @_padding-vertical--sticky: (abs(@nav2-height--sticky - @nav2-menu-height) / 2);

  .own-layer();
  padding: @_padding-vertical 0;
  width: 100%;
  height: @nav2-height;
  display: flex;
  font-size: @font-size--title-small;
  font-weight: 500;
  z-index: @z-index--nav2;

  .@{_sticky} & {
    padding: @_padding-vertical--sticky 0;
    height: 50px;
  }

  &__button {
    .reset-input();
    .circle(@_icon-size);
    .center-content();
    .link-plain();
    border: 3px solid fade(#fff, 25%);
    font-size: @_button-content-size;
    color: #fff;
    margin: 0 3px;

    &.js-click-menu--active, &:hover {
      background-color: fade(#000, 50%);
      border-color: #fff;
      color: #fff;
    }

    &--social {
      &:hover {
        color: #fff;
      }
    }

    &--stadium {
      width: auto;
      border-radius: @_icon-size;
      padding: 0 10px;
    }

    &--support {
      &:hover {
        color: @pink;
      }
    }
  }

  &__click-popup {
    position: absolute;
    top: 100%;
    right: 0; // avoid overflow before repositioned
    height: 0; // avoid covering page when the content is hidden
    margin-top: -5px;

    &--user {
      margin-top: 20px;
    }
  }

  &__col {
    display: flex;
    align-items: center;
    flex: none;

    &--avatar {
      margin-left: 6px;
    }

    &--logo {
      margin-right: 10px;
    }

    &--menu {
      align-items: stretch;
    }
  }

  &__colgroup {
    display: flex;
    flex: none;

    &--menu {
      margin-right: auto;
    }
  }

  &__locale-current-flag {
    height: @_button-content-size;
  }

  &__logo {
    .full-size();
    background-size: contain;
    background-repeat: no-repeat;
    transition: all 100ms ease-in-out;
    will-change: opacity, transform;

    background-image: url('/images/layout/osu-logo-white.svg');

    .@{_top}__logo-link:hover & {
      // be careful of weird snapping at the end of animation on Firefox (with 1.1, ~60px).
      transform: scale(1.11);
    }

    &--bg {
      background-image: url('/images/layout/osu-logo-triangles.svg');
      opacity: 0;

      .@{_top}__logo-link:hover & {
        opacity: 1;
      }
    }
  }

  &__logo-link {
    @__logo-whitespace: 5px;
    @_logo-size: (@nav2-menu-height + @__logo-whitespace * 2);
    width: @_logo-size;
    height: @_logo-size;
    margin: -@__logo-whitespace;

    .@{_sticky} & {
      height: 40px;
    }
  }

  &__menu-link {
    .link-plain();
    padding: 6px @_menu-gutter;
    line-height: 1;

    color: @pink-light;

    &::after {
      content: '';
      position: absolute;

      border-radius: 10px;
      top: (@_link-padding-vertical + @_link-highlight-margin-vertical);
      right: 100%;
      width: 3px;
      height: calc(100% ~'-' (@_link-padding-vertical * 2 + @_link-highlight-margin-vertical * 2));
      background-color: @yellow;
      opacity: 0;
      will-change: opacity;
    }

    &:hover {
      color: #fff;

      &::after {
        opacity: 1;
      }
    }

    &:active {
      color: #fff;
    }
  }

  &__menu-link-main {
    .link-white();
    .link-plain();
    padding: 10px @_menu-gutter;
    display: flex;
    align-items: center;

    .@{_top}__colgroup:hover & {
      color: fade(#fff, 70%);

      &:hover, &.js-menu--active {
        color: #fff;
      }
    }

    &--search {
      .center-content();
      .circle(40px);
      align-self: center;
      padding: 0;
    }
  }

  &__menu-link-bar {
    position: absolute;
    top: 100%;
    margin-top: 5px;
    height: 3px;
    border-radius: 10px;
    width: 100%;
    display: block;
  }

  &__menu-popup {
    position: absolute;
    top: 100%;
    height: 0; // avoid covering page when the content is hidden
    margin-top: -5px;
    left: @_menu-gutter;
    white-space: nowrap;
    display: flex;
    flex-direction: column;

    &[data-visibility] {
      transition: none;
    }
  }

  &__notification-count {
    margin-left: 5px;
    font-size: @font-size--small;
  }
}

{'fraction_non_alphanumeric': 0.1466120327803318, 'fraction_numerical': 0.02298620827503498, 'mean_word_length': 2.1311013767209013, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '2214318', 'n_tokens_mistral': 3794, 'n_tokens_neox': 3493, 'n_words': 842}