BigW Consortium Gitlab

typography.scss 4.32 KB
Newer Older
1
@mixin md-typography {
2
  color: $gl-text-color;
3
  word-wrap: break-word;
4 5 6 7 8 9 10 11 12 13 14 15 16

  a {
    color: $md-link-color;
  }

  img {
    max-width: 100%;
  }

  *:first-child {
    margin-top: 0;
  }

17
  // Single code lines should wrap
18 19
  code {
    font-family: $monospace_font;
20
    white-space: pre-wrap;
21 22 23
    word-wrap: normal;
  }

24 25 26 27 28 29 30
  // Multi-line code blocks should scroll horizontally
  pre {
    code {
      white-space: pre;
    }
  }

31 32 33 34 35
  kbd {
    display: inline-block;
    padding: 3px 5px;
    font-size: 11px;
    line-height: 10px;
36
    color: $kdb-color;
37
    vertical-align: middle;
38
    background-color: $kdb-bg;
39 40
    border-width: 1px;
    border-style: solid;
41
    border-color: $kdb-border $kdb-border $kdb-border-bottom;
42 43
    border-image: none;
    border-radius: 3px;
44
    box-shadow: 0 -1px 0 $kdb-shadow inset;
45 46 47
  }

  h1 {
48
    font-size: 1.75em;
49
    font-weight: 600;
50
    margin: 16px 0 10px;
51
    padding: 0 0 0.3em;
52
    border-bottom: 1px solid $white-dark;
53
    color: $gl-text-color;
54 55 56
  }

  h2 {
57
    font-size: 1.5em;
58
    font-weight: 600;
59
    margin: 16px 0 10px;
60
    color: $gl-text-color;
61 62 63
  }

  h3 {
64 65
    margin: 16px 0 10px;
    font-size: 1.3em;
66 67 68
  }

  h4 {
69 70
    margin: 16px 0 10px;
    font-size: 1.2em;
71 72 73
  }

  h5 {
74
    margin: 16px 0 10px;
75
    font-size: 1em;
76 77 78
  }

  h6 {
79
    margin: 16px 0 10px;
80
    font-size: 0.95em;
81 82 83
  }

  blockquote {
84
    color: $gl-grayish-blue;
85
    font-size: inherit;
86
    padding: 8px 21px;
87
    margin: 12px 0;
88
    border-left: 3px solid $white-dark;
89 90
  }

91 92
  blockquote:dir(rtl) {
    border-left: 0;
93
    border-right: 3px solid $white-dark;
94 95
  }

96
  blockquote p {
97
    color: $gl-grayish-blue !important;
98
    font-size: inherit;
99 100 101 102
    line-height: 1.5;
  }

  p {
103
    color: $gl-text-color;
104
    margin: 6px 0 0;
105 106 107 108 109
  }

  table {
    @extend .table;
    @extend .table-bordered;
110
    margin: 12px 0;
111
    color: $gl-text-color;
112

113
    th {
114
      background: $label-gray-bg;
115 116 117
    }
  }

118 119 120 121
  table:dir(rtl) th {
    text-align: right;
  }

122
  pre {
123
    margin: 12px 0;
124 125 126
    font-size: 13px;
    line-height: 1.6em;
    overflow-x: auto;
Clement Ho committed
127
    border-radius: 2px;
128 129 130 131 132 133
  }

  p > code {
    font-weight: inherit;
  }

134 135
  ul,
  ol {
136
    padding: 0;
137
    margin: 3px 0 3px 28px !important;
138 139
  }

140 141
  ul:dir(rtl),
  ol:dir(rtl) {
142 143 144
    margin: 3px 28px 3px 0 !important;
  }

145 146 147 148
  li {
    line-height: 1.6em;
  }

149 150
  a[href*="/uploads/"],
  a[href*="storage.googleapis.com/google-code-attachments/"] {
151
    &::before {
152 153 154 155 156 157 158 159 160
      margin-right: 4px;

      font: normal normal normal 14px/1 FontAwesome;
      font-size: inherit;
      text-rendering: auto;
      -webkit-font-smoothing: antialiased;
      content: "\f0c6";
    }

161
    &:hover::before {
162 163 164
      text-decoration: none;
    }
  }
165

166
  a.no-attachment-icon {
167
    &::before {
168 169 170 171
      display: none;
    }
  }

172
  /* Link to current header. */
173 174 175 176 177 178
  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
179 180 181
    position: relative;

    a.anchor {
182 183 184
      left: -16px;
      position: absolute;
      text-decoration: none;
185
      outline: none;
186

187
      &::after {
188
        content: image-url('icon_anchor.svg');
189 190
        visibility: hidden;
      }
191 192
    }

193
    &:hover > a.anchor::after {
194
      visibility: visible;
195 196
    }
  }
197 198 199
}


200
/**
201
 * Headers
202
 *
203
 */
Andrey committed
204
body {
205
  -webkit-text-shadow: $body-text-shadow 0 0 1px;
Andrey committed
206
}
207

208
.page-title {
209
  margin-top: $gl-padding;
210 211 212
  line-height: 1.3;
  font-size: 1.25em;
  font-weight: 600;
213 214 215 216

  &:last-child {
    margin-bottom: 0;
  }
Andrey committed
217 218 219
}

.page-title-empty {
220
  margin-top: 0;
Andrey committed
221 222 223
  line-height: 1.3;
  font-size: 1.25em;
  font-weight: 600;
224
  margin: 12px 7px;
225 226
}

227 228 229 230 231 232
h1,
h2,
h3,
h4,
h5,
h6 {
233
  color: $gl-text-color;
Phil Hughes committed
234
  font-weight: 600;
235 236
}

237 238 239 240
.light-header {
  font-weight: 600;
}

241 242
/** CODE **/
pre {
243
  font-family: $monospace_font;
244

245 246 247 248 249 250 251
  &.plain-readme {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font-size: 14px;
  }
252 253
}

254
.monospace {
255
  font-family: $monospace_font;
256
  font-size: 90%;
257
}
258

259 260 261 262 263 264 265
code {
  &.key-fingerprint {
    background: $body-bg;
    color: $text-color;
  }
}

266 267 268 269
a > code {
  color: $link-color;
}

270
/**
271
 * Apply Markdown typography
272 273 274
 *
 */
.wiki {
275
  @include md-typography;
276
}
277 278 279 280

.md {
  @include md-typography;
}
281 282 283 284 285

/**
 * Textareas intended for GFM
 *
 */
286 287
.strikethrough {
  text-decoration: line-through;
288
}
289

290 291 292 293
h1,
h2,
h3,
h4 {
294
  small {
295
    color: $gl-text-color;
296 297
  }
}
298 299 300 301 302 303

.text-right-lg {
  @media (min-width: $screen-lg-min) {
    text-align: right;
  }
}
304 305

.idiff.deletion {
306
  background: $line-removed-dark;
307 308 309
}

.idiff.addition {
310
  background: $line-added-dark;
311
}