_headings.scss 2.6 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 20 21 22 23 24 25 26 27
 */

$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 {
    margin: 0;
    font-weight: $headings-font-weight-normal;
    font-size: inherit;
    line-height: inherit;
    color: $headings-base-color;
}

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


%hd-2 {
35
    font-size: 1.5em;
36
    font-weight: $headings-font-weight-bold;
37
    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 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89
}

%hd-7 {
    margin-bottom: ($baseline / 4);
    font-size: 14px;
    font-weight: $headings-font-weight-bold;
    text-transform: uppercase;
    line-height: 1.6em;
    letter-spacing: 1px;
}

%hd-8 {
    margin-bottom: ($baseline / 8);
    font-size: 12px;
    font-weight: $headings-font-weight-bold;
    text-transform: uppercase;
    line-height: 1.5em;
    letter-spacing: 1px;
}

90 91 92 93 94 95 96 97 98 99 100 101 102
// 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 {
    @extend %reset-headings;
}

103

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

114
// H3 was problematic in xblocks, we so we'll keep it as it was
115

116
.xblock .xblock {
117

118
    h2 {
119
        @extend %hd-2;
120
        font-weight: $headings-font-weight-bold;
121 122
        // override external modules and xblocks that use inline CSS
        text-transform: initial;
123

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