_headings.scss 2.41 KB
Newer Older
1 2 3 4 5
/*
 * This comes from the UXPL, and is modified for use.
 * The UXPL isn't available retroactively, so this shims
 * the headings from the UXPL with what we're using in
 * the platform to better sync things up in the meantime.
6
 * These are available to entire LMS.
7
 *
8
 * Once the UXPL is fitted retroactively (if ever then), this can be removed.
9 10 11 12 13 14 15 16 17 18 19
 */

$headings-count: 8;

$headings-font-weight-light:                200;
$headings-font-weight-normal:               400;
$headings-font-weight-bold:                 600;
$headings-base-font-family:                 inherit;
$headings-base-color:                       $gray-d2;

%reset-headings {
20 21 22 23 24
  margin: 0;
  font-weight: $headings-font-weight-normal;
  font-size: inherit;
  line-height: inherit;
  color: $headings-base-color;
25 26 27
}

%hd-1 {
28 29 30
  margin-bottom: 1.41575em;
  font-size: 2em;
  line-height: 1.4em;
31 32 33 34
}


%hd-2 {
35 36 37
  font-size: 1.5em;
  font-weight: $headings-font-weight-bold;
  line-height: 1.4em;
38 39 40 41
}


%hd-3 {
42 43 44 45
  margin-bottom: ($baseline / 2);
  font-size: 1.35em;
  font-weight: $headings-font-weight-normal;
  line-height: 1.4em;
46 47 48 49
}


%hd-4 {
50 51 52 53
  margin-bottom: ($baseline / 2);
  font-size: 1.25em;
  font-weight: $headings-font-weight-bold;
  line-height: 1.4em;
54 55 56 57
}


%hd-5 {
58 59 60 61
  margin-bottom: ($baseline / 2);
  font-size: 1.1em;
  font-weight: $headings-font-weight-bold;
  line-height: 1.4em;
62 63 64 65
}


%hd-6 {
66 67 68 69
  margin-bottom: ($baseline / 2);
  font-size: 1em;
  font-weight: $headings-font-weight-bold;
  line-height: 1.4em;
70 71 72
}

%hd-7 {
73 74 75 76 77
  margin-bottom: ($baseline / 4);
  font-size: 14px;
  font-weight: $headings-font-weight-bold;
  line-height: 1.6em;
  letter-spacing: 1px;
78 79 80
}

%hd-8 {
81 82 83 84 85
  margin-bottom: ($baseline / 8);
  font-size: 12px;
  font-weight: $headings-font-weight-bold;
  line-height: 1.5em;
  letter-spacing: 1px;
86 87
}

88 89 90 91 92 93 94 95 96 97
// let's make these classnames available to the entire LMS!

.hd-1,
.hd-2,
.hd-3,
.hd-4,
.hd-5,
.hd-6,
.hd-7,
.hd-8 {
98
  @extend %reset-headings;
99 100
}

101

102 103 104 105 106
// ----------------------------
// #CANNED
// ----------------------------
// canned heading classes
@for $i from 1 through $headings-count {
107 108 109
  .hd-#{$i} {
    @extend %hd-#{$i};
  }
110
}
111

112
// H3 was problematic in xblocks, we so we'll keep it as it was
113

114
.xblock .xblock {
115 116
  h2 {
    @extend %hd-2;
117

118 119 120
    font-weight: $headings-font-weight-bold;
    // override external modules and xblocks that use inline CSS
    text-transform: initial;
121

122 123 124
    &.discussion-module-title {
      margin-bottom: 0;
      display: inline-block;
125
    }
126
  }
127
}
128