Proyectos de Subversion Moodle

Rev

Autoría | Ultima modificación | Ver Log |

.rui-breadcrumbs {
  margin-top: 2px;
  margin-bottom: 20px;
}

.breadcrumb,
.coursefilesbreadcrumb {
  display: flex;
  flex-wrap: wrap;
  padding: 0 2px;
  margin: 0;

  z-index: 0;

  @include font-size($breadcrumb-font-size);
  list-style: none;

  @include media-breakpoint-between(xs, sm) {
    width: max-content;
    justify-content: center;
    margin: 0 auto;
  }
}

.breadcrumbs-container {
  @include media-breakpoint-up(lg) {
    width: 100%;
  }

  @include media-breakpoint-between(xs, sm) {
    margin-left: auto;
    margin-right: auto;
    padding: 0 0 5px;
    overflow-x: auto;

    .pagelayout-incourse &,
    .pagelayout-course & {
      width: calc(100% - 100px);
    }
  }

}

.breadcrumb--in-content {
  margin: 0;
}

.breadcrumb-item {
  display: flex;
  color: $breadcrumb-color;

  &:hover {
    color: $link-hover-color;
  }

  .theme-dark & {
    color: $dm-breadcrumb-color;
  }

  &:first-child {
    a {
      color: $gray-600;

      .theme-dark & {
        color: $dm-gray-600;
      }
    }
  }

  .text-truncate {
    max-width: 300px;
  }

  // The separator between breadcrumbs (by default, a forward-slash: "/")
  +.breadcrumb-item {
    padding-left: $breadcrumb-item-padding;

    &::before {
      display: inline-flex; // Suppress underlining of the separator in modern browsers
      align-items: center;
      padding-right: $breadcrumb-item-padding;
      font-size: 12px;
      color: $breadcrumb-divider-color;
      content: escape-svg($breadcrumb-divider);

      .theme-dark & {
        color: $dm-breadcrumb-divider-color;
      }
    }
  }

  &.breadcrumb-item--last {
    opacity: .6;
  }

  .breadcrumb--in-content & {
    max-width: 300px;

    a {
      &:before {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' viewBox='0 0 24 24'%3E%3Cpath stroke='#{url-friendly-colour($breadcrumb-color)}' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M6.75 15.25V6.75H15.25'%3E%3C/path%3E%3Cpath stroke='#{url-friendly-colour($breadcrumb-color)}' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M7 7L17.25 17.25'%3E%3C/path%3E%3C/svg%3E%0A");
        background-repeat: no-repeat;
        background-position: 0;
        background-size: 18px;
        width: 17px;
        height: 17px;

        .theme-dark & {
          background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' viewBox='0 0 24 24'%3E%3Cpath stroke='#{url-friendly-colour($dm-breadcrumb-color)}' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M6.75 15.25V6.75H15.25'%3E%3C/path%3E%3Cpath stroke='#{url-friendly-colour($dm-breadcrumb-color)}' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M7 7L17.25 17.25'%3E%3C/path%3E%3C/svg%3E%0A");
        }
      }
    }
  }

  // IE9-11 hack to properly handle hyperlink underlines for breadcrumbs built
  // without `<ul>`s. The `::before` pseudo-element generates an element
  // *within* the .breadcrumb-item and thereby inherits the `text-decoration`.
  //
  // To trick IE into suppressing the underline, we give the pseudo-element an
  // underline and then immediately remove it.
  +.breadcrumb-item:hover::before {
    text-decoration: underline;
  }

  // stylelint-disable-next-line no-duplicate-selectors
  +.breadcrumb-item:hover::before {
    text-decoration: none;
  }


  &.active {
    color: $breadcrumb-active-color;

    &:after {
      content: '';
      background-color: $primary-color-100;

      border-radius: $btn-border-radius;

      position: absolute;
      left: -3px;
      top: -2px;
      width: calc(100% + 6px);
      height: calc(100% + 4px);
      z-index: -1;

      .theme-dark & {
        background-color: $dm-gray-700;
      }
    }

    .theme-dark & {
      color: $dm-breadcrumb-active-color;
    }
  }

  .breadcrumbs-textonly {
    margin: 0.25rem 0;
    display: grid;
    color: $breadcrumb-active-color;

    .theme-dark & {
      color: $dm-breadcrumb-active-color;
    }
  }

  a,
  .breadcrumbs-textonly {
    position: relative;
    display: inline-flex;
    z-index: 1;

    padding: 3px 8px;
    margin: 0.25rem 0;

    transition: $transition-base;
  }

  a {
    color: $breadcrumb-color;
    font-weight: $font-weight-medium;

    .theme-dark & {
      color: $dm-breadcrumb-color;
    }

    .text-truncate {
      display: inline-block;
      max-width: 200px;
    }

    &:hover {
      text-decoration: none;
      color: $primary-color-600;

      .theme-dark & {
        color: $dm-breadcrumb-active-color;
      }

      &:after {
        content: '';
        background-color: $primary-color-100;

        border-radius: $btn-border-radius;

        position: absolute;
        left: -3px;
        top: -2px;
        width: calc(100% + 6px);
        height: calc(100% + 4px);
        z-index: -1;

        .theme-dark & {
          background-color: $primary-color-800;
        }
      }
    }
  }
}