BigW Consortium Gitlab

typography.scss 3.91 KB
Newer Older
1 2
@mixin md-typography {
  color: $md-text-color;
3
  word-wrap: break-word;
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29

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

  img {
    max-width: 100%;
  }

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

  code {
    font-family: $monospace_font;
    white-space: pre;
    word-wrap: normal;
  }

  kbd {
    display: inline-block;
    padding: 3px 5px;
    font-size: 11px;
    line-height: 10px;
    color: #555;
    vertical-align: middle;
30
    background-color: #fcfcfc;
31 32
    border-width: 1px;
    border-style: solid;
33
    border-color: #ccc #ccc #bbb;
34 35
    border-image: none;
    border-radius: 3px;
36
    box-shadow: 0 -1px 0 #bbb inset;
37 38 39 40 41
  }

  h1 {
    font-size: 1.3em;
    font-weight: 600;
42 43
    margin: 24px 0 12px;
    padding: 0 0 10px;
44 45 46 47 48 49 50
    border-bottom: 1px solid #e7e9ed;
    color: #313236;
  }

  h2 {
    font-size: 1.2em;
    font-weight: 600;
51
    margin: 24px 0 12px;
52 53 54 55
    color: #313236;
  }

  h3 {
56
    margin: 24px 0 12px;
Andriy Dyadyura committed
57
    font-size: 1.1em;
58 59 60
  }

  h4 {
61
    margin: 24px 0 12px;
Andriy Dyadyura committed
62
    font-size: 0.98em;
63 64 65
  }

  h5 {
66
    margin: 24px 0 12px;
Andriy Dyadyura committed
67
    font-size: 0.95em;
68 69 70
  }

  h6 {
71
    margin: 24px 0 12px;
72 73 74 75
    font-size: 0.90em;
  }

  blockquote {
76 77
    color: #7f8fa4;
    font-size: inherit;
78
    padding: 8px 21px;
79
    margin: 12px 0;
80 81 82 83 84
    border-left: 3px solid #e7e9ed;
  }

  blockquote p {
    color: #7f8fa4 !important;
85
    font-size: inherit;
86 87 88 89
    line-height: 1.5;
  }

  p {
90
    color: #5c5d5e;
91
    margin: 6px 0 0;
92 93 94 95 96
  }

  table {
    @extend .table;
    @extend .table-bordered;
97
    margin: 12px 0;
98 99 100 101 102 103 104
    color: #5c5d5e;
    th {
      background: #f8fafc;
    }
  }

  pre {
105
    margin: 12px 0;
106 107 108
    font-size: 13px;
    line-height: 1.6em;
    overflow-x: auto;
109 110 111 112 113 114 115
    @include border-radius(2px);
  }

  p > code {
    font-weight: inherit;
  }

116 117
  ul, ol {
    padding: 0;
118
    margin: 6px 0 6px 28px !important;
119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139
  }

  li {
    line-height: 1.6em;
  }

  a[href*="/uploads/"], a[href*="storage.googleapis.com/google-code-attachments/"] {
    &:before {
      margin-right: 4px;

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

    &:hover:before {
      text-decoration: none;
    }
  }
140

141 142 143 144 145 146
  a.no-attachment-icon {
    &:before {
      display: none;
    }
  }

147 148 149 150 151 152 153 154 155 156 157
  /* Link to current header. */
  h1, h2, h3, h4, h5, h6 {
    position: relative;

    a.anchor {
      // Setting `display: none` would prevent the anchor being scrolled to, so
      // instead we set the height to 0 and it gets updated on hover.
      height: 0;
    }

    &:hover > a.anchor {
158
      $size: 14px;
159 160 161
      position: absolute;
      right: 100%;
      top: 50%;
162 163 164
      margin-top: -11px;
      margin-right: 0;
      padding-right: 15px;
165 166 167 168 169 170 171 172
      display: inline-block;
      width: $size;
      height: $size;
      background-image: image-url("icon-link.png");
      background-size: contain;
      background-repeat: no-repeat;
    }
  }
173 174 175
}


176
/**
177
 * Headers
178
 *
179
 */
Andrey committed
180 181 182
body {
  -webkit-text-shadow: rgba(255,255,255,0.01) 0 0 1px;
}
183

184
.page-title {
185
  margin-top: $gl-padding;
186 187 188
  line-height: 1.3;
  font-size: 1.25em;
  font-weight: 600;
189 190 191 192

  &:last-child {
    margin-bottom: 0;
  }
Andrey committed
193 194 195
}

.page-title-empty {
196
  margin-top: 0;
Andrey committed
197 198 199
  line-height: 1.3;
  font-size: 1.25em;
  font-weight: 600;
200
  margin: 12px 7px;
201 202
}

203 204
h1, h2, h3, h4, h5, h6 {
  color: $gl-header-color;
Phil Hughes committed
205
  font-weight: 600;
206 207
}

208 209
/** CODE **/
pre {
210
  font-family: $monospace_font;
211

212 213 214 215 216 217 218
  &.plain-readme {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font-size: 14px;
  }
219 220
}

221
.monospace {
222
  font-family: $monospace_font;
223
  font-size: 90%;
224
}
225

226 227 228 229 230 231 232
code {
  &.key-fingerprint {
    background: $body-bg;
    color: $text-color;
  }
}

233 234 235 236
a > code {
  color: $link-color;
}

237
/**
238
 * Apply Markdown typography
239 240 241
 *
 */
.wiki {
242
  @include md-typography;
243
}
244 245 246 247

.md {
  @include md-typography;
}
248 249 250 251 252

/**
 * Textareas intended for GFM
 *
 */
253 254
.strikethrough {
  text-decoration: line-through;
255
}
256 257 258 259 260 261

h1, h2, h3, h4 {
  small {
    color: $gl-gray;
  }
}