_footer.scss 7.81 KB
Newer Older
1
// Open edX: LMS footer
2
// ====================
3 4 5
@import '../base/grid-settings';
@import 'neat/neat'; // lib - Neat

6
.wrapper-footer {
7
  box-shadow: 0 -1px 5px 0 $shadow-l1;
8
  border-top: 1px solid tint($m-gray,50%);
9
  padding: 25px ($baseline/2) ($baseline*1.5) ($baseline/2);
10
  background: $footer-bg;
11
  clear: both;
12

13 14
  footer {
    @include clearfix();
15
    @include box-sizing(border-box);
16 17
    max-width: grid-width(12);
    min-width: 760px;
18
    width: flex-grid(12);
19 20 21 22 23 24 25
    margin: 0 auto;

    p, ol, ul {
      font-family: $sans-serif;
    }

    a {
26
      @include transition(link-color 0.15s ease-in-out 0s, border 0.15s ease-in-out 0s);
27 28 29 30
      border-bottom: none;
      color: $link-color;
      text-decoration: none !important;
      font-family: $sans-serif;
31

32
      &:hover, &:focus, &:active {
33 34
        border-bottom: 1px dotted $link-color;
        color: $link-color;
35 36 37 38 39
      }
    }

    // colophon
    .colophon {
40
      @include margin-right(flex-gutter());
41
      width: flex-grid(8,12);
42
      @include float(left);
43

44 45
      .nav-colophon {
        @include clearfix();
46
        margin: $footer_margin;
47 48

        li {
49
          @include float(left);
50 51 52 53 54
          margin-right: ($baseline*0.75);

          a {
            color: tint($black, 20%);

55
            &:hover, &:focus, &:active {
56
              color: $link-color;
57
            }
58 59
          }

60 61
          &:last-child {
            margin-right: 0;
62 63 64 65
          }
        }
      }

66
      .colophon-about {
67
        @include clearfix();
68

69 70 71 72 73
        img {
          width: 68px;
          height: 34px;
          margin-right: 0;
          float: left;
74 75
        }

76 77
        p {
          float: left;
78
          width: flex-grid(6,8);
79 80 81 82
          margin-left: $baseline;
          padding-left: $baseline;
          font-size: em(13);
          background: transparent url(/static/images/bg-footer-divider.jpg) 0 0 no-repeat;
83 84
        }
      }
85
    }
86

87 88
    // references
    .references {
89
      margin: -10px 0 0 0;
90
      width: flex-grid(4,12);
91 92
      display: inline-block;
    }
93

94
    .wrapper-logo {
95
      margin: ($baseline*0.75) 0;
96

97 98
      a {
        display: inline-block;
99

100 101 102 103 104
        &:hover {
          border-bottom: 0;
        }
      }
    }
105

106 107 108 109
    .copyright {
      margin: -2px 0 8px 0;
      font-size: em(11);
      color: $gray-l2;
110
      @include text-align(left);
111
    }
112

113 114
    .nav-legal {
      @include clearfix();
115
      @include text-align(left);
116

117 118 119 120
      li {
        display: inline-block;
        font-size: em(11);

121 122
      }

123
      .nav-legal-02 a {
124

125 126
        &:before {
          margin-right: ($baseline/4);
127 128
          content: "-";
        }
129
      }
130
    }
131

132 133 134
    .nav-social {
      margin: 0;
      text-align: right;
135

136 137
      li {
        display: inline-block;
138

139 140
        &:last-child {
          margin-right: 0;
141 142
        }

143 144
        a {
          display: block;
145

146 147
          &:hover, &:focus, &:active {
            border: none;
148 149
          }
        }
150 151 152 153

        img {
          display: block;
        }
154 155
      }
    }
156

157 158
    // platform Open edX logo and link
    .powered-by {
159
      @include float(right);
160 161 162
      width: flex-grid(3,12);
      display: inline-block;
      vertical-align: bottom;
163
      @include text-align(right);
164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187

      a {
        display: inline-block;

        &:hover {
          border-bottom: none;
        }
      }
    }
  }

  // edx theme overrides
  &.edx-footer {

    footer {

      .copyright {
        text-align: right;
      }

      .nav-legal {
        text-align: right;
      }
    }
188
  }
189 190 191
}

// marketing site design syncing
192
.view-register, .view-login, .view-passwordreset {
193 194 195 196 197 198 199 200

  .wrapper-footer footer {
    width: 960px;

    .colophon-about img {
      margin-top: ($baseline*1.5);
    }
  }
201
}
202 203 204 205 206 207


// edX theme: LMS Footer
// ====================
$edx-footer-spacing: ($baseline*0.75);
$edx-footer-link-color: rgb(0, 158, 231);
208
$edx-footer-bg-color: rgb(252,252,252);
209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286

%edx-footer-reset {
  @include box-sizing(border-box);
}

%edx-footer-section {
  float: left;
  min-height: ($baseline*17.5);
  margin-right: flex-gutter();
  border-right: 1px solid rgb(230, 230, 230);
  padding-right: ($baseline*1.5);

  // CASE: last child
  &:last-child {
    margin-right: 0;
    border: none;
    padding-right: 0;
  }
}

%edx-footer-title {
  // TODO: refactor _typography.scss to extend this set of styling
  @extend %t-title;
  @extend %t-weight4;
  @include font-size(15);
  @include line-height(15);
  text-transform: none;
  letter-spacing: inherit;
  color: rgb(61, 62, 63);
}

%edx-footer-link {
  @extend %t-copy-sub1;
  @include transition(color $tmg-f2 ease-in-out 0);
  display: block;
  margin-bottom: ($baseline/2);

  // NOTE: resetting poor link styles
  border: none;
  padding: 0;
  color: $edx-footer-link-color;

  .copy {
    @include transition(border-color $tmg-f2 ease-in-out 0);
    display: inline-block;
    border-bottom: 1px solid transparent;
    padding: 0 0 ($baseline/20) 0;
    color: $edx-footer-link-color;
  }

  // STATE: hover + focused
  &:hover, &:focus {
    color: saturate($edx-footer-link-color, 25%);

    // NOTE: resetting poor link styles
    border: none;

    .copy {
      border-bottom-color: saturate($edx-footer-link-color, 25%);
    }
  }

  // CASE: last child
  &:last-child {
    margin-bottom: 0;
  }

  // CASE: has visual emphasis
  &.has-emphasis {
    @extend %t-weight4;

    .copy {
      @extend %t-weight4;
    }
  }
}

.edx-footer-new {
287
  background: $edx-footer-bg-color;
288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353

  // NOTE: resetting older footer styles - can be removed once not needed
  box-shadow: none;
  border-top: none;
  padding: ($baseline*2) $baseline;

  // about
  // --------------------
  .footer-about {
    @extend %edx-footer-reset;
    @extend %edx-footer-section;
    width: flex-grid(6,12);
  }

  .footer-about-title {
    @extend %edx-footer-title;
  }

  .footer-about-logo {
    margin-bottom: $edx-footer-spacing;
  }

  .footer-about-copy {
    @extend %t-copy-sub1;
    margin-bottom: $edx-footer-spacing;
    color: rgb(61, 62, 63);

    p {
      // NOTE: needed for poor LMS span styling
      color: inherit;
    }
  }

  .footer-about-copyright {
    @extend %t-copy-sub1;
    margin-bottom: $edx-footer-spacing;
    color: rgb(138, 140, 143);

    p {
      // NOTE: needed for poor LMS span styling
      color: inherit;
    }
  }

  .footer-about-links {

    a {
      @extend %edx-footer-link;
      margin-bottom: ($edx-footer-spacing/2);
    }

    .note {
      color: rgb(138, 140, 143);
    }
  }

  // nav (learn more links)
  // --------------------
  .footer-nav {
    @extend %edx-footer-reset;
    @extend %edx-footer-section;
    width: flex-grid(3,12);
  }

  .footer-nav-title {
    @extend %edx-footer-title;
354
    margin-top: $baseline;
355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370
  }

  .footer-nav-links {
    margin-bottom: ($edx-footer-spacing*2.25);

    a {
      @extend %edx-footer-link;
    }
  }

  // follow (social media)
  // --------------------
  .footer-follow {
    @extend %edx-footer-reset;
    @extend %edx-footer-section;
    width: flex-grid(3,12);
371

372 373 374 375
  }

  .footer-follow-title {
    @extend %edx-footer-title;
376
    margin-top: $baseline;
377 378 379 380 381 382
  }

  .footer-follow-links {

    a {
      @extend %edx-footer-link;
383
      margin-top: $baseline;
384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402

      .icon, .copy {
        display: inline-block;
        vertical-align: middle;
      }

      .icon {
        @extend %t-icon3;
        margin-right: ($baseline/4);
        text-align: center;
        min-width: ($baseline*1.5);
      }

      .copy {
        // NOTE: needed for poor LMS span styling
        color: inherit;
      }
    }
  }
403 404 405 406 407 408 409 410 411 412 413 414

  &.rwd {
    @include box-sizing(border-box);
    @include outer-container;

    &.wrapper-footer footer {
      min-width: 0;
    }

    .footer-about,
    .footer-nav,
    .footer-follow {
415
      @include span-columns(12);
416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431
    }

    @include media( $tablet ) {
    }

    @include media( $desktop ) {
      .footer-about {
        @include span-columns(6);
      }

      .footer-nav,
      .footer-follow {
        @include span-columns(3);
      }
    }
  }
432
}