_navigation.scss 3.29 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
// LMS -- elements -- navigation
// ====================

// in this document:
// --------------------
// +notes
// +skip navigation
// +utility navigation
// +toggling utilities
// +case - calculator spacing

// +notes:
// --------------------
// this Sass partial should have its contents eventually abstracted out so that onboarding/non-coureware navigation is separate from in course-based navigation systems


// +skip navigation
// --------------------
%nav-skip {
  @extend %text-sr;
}

23
.nav-contents, .nav-skip, .transcript-skip {
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117
  @extend %nav-skip;
}

// +utility navigation (course utiltiies)
// --------------------
.nav-utilities {
  @extend %ui-depth3;
  position: fixed;
  right: ($baseline/4);
  bottom: 0;

  .wrapper-utility {
    @extend %wipe-last-child;
    display: inline-block;
    vertical-align: bottom;
    @include margin-right(6px);
  }

  .utility-control {
    @include transition(background-color $tmg-f2 ease-in-out 0s, color $tmg-f2 ease-in-out 0s);
    position: relative;
    bottom: -($baseline/5);
    display: inline-block;
    vertical-align: middle;
    padding: ($baseline/2) ($baseline*0.75) ($baseline*0.75) ($baseline*0.75);
    background: $black-t1;
    color: $white;

    // STATE: hover/active
    &:hover, &:active {
      background: $gray-d1;
    }

    // STATE: is active/in use
    &.is-active {
      background: $gray-d1;
    }
  }

  // specific reset styling for any controls that are button elements
  .utility-control-button {
    border: none;
    box-shadow: none;
    text-shadow: none;
    font-size: inherit;
    font-weight: inherit;
    line-height: 0;
    border-radius: 0;

    // STATE: hover/active
    &:hover, &:active, &:focus {
      border: none;
      box-shadow: none;
    }
  }

  // specific utility navigation - student notes toggling
  .action-toggle-notes {
    @extend %no-outline;

    // STATE: is active/in use
    &.is-active {
      color: $student-notes-highlight-color-base;
    }
  }

  // +toggling utilities
  // --------------------
  .action-toggle-message {
    @extend %t-title8;
    @extend %t-strong;
    position: absolute;
    bottom: 0;
    @include right($baseline*2.5);
    display: inline-block;
    min-width: ($baseline*5);
    padding: ($baseline/2) ($baseline*0.75);
    opacity: 0;
    background-color: $gray-d1;
    color: $white;
    text-align: center;

    // STATE: is fleeting/temporary
    &.is-fleeting {
      @include animation(pulse-out $tmg-s2 ease-in-out);
    }
  }

  // +case - calculator spacing (needed for overriding calculator positioning)
  // --------------------
  &.has-utility-calculator {
    @include right($baseline*2.50);
  }
}
118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153

%button-reset {
  box-shadow: none;
  border: none;
  border-radius: 0;
  background: transparent none;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
}

%page-content-nav {
  margin-bottom: $baseline;
  border-bottom: 3px solid $gray-l5;

  .nav-item {
    @extend %button-reset;
    display: inline-block;
    margin-bottom: -3px; // to match the border
    border-bottom: 3px solid $gray-l5;
    padding: ($baseline*.75);
    color: $gray-d2;

    &.is-active {
      border-bottom: 3px solid $gray-d2;
      color: $gray-d2;
    }

    // STATE: hover and focus
    &:hover,
    &:focus {
      border-bottom: 3px solid $link-color;
      color: $link-color;
    }
  }
}