typography.scss 3.99 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 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75

  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;
    background-color: #FCFCFC;
    border-width: 1px;
    border-style: solid;
    border-color: #CCC #CCC #BBB;
    border-image: none;
    border-radius: 3px;
    box-shadow: 0px -1px 0px #BBB inset;
  }

  h1 {
    font-size: 1.3em;
    font-weight: 600;
    margin: 24px 0 12px 0;
    padding: 0 0 10px 0;
    border-bottom: 1px solid #e7e9ed;
    color: #313236;
  }

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

  h3 {
    margin: 24px 0 12px 0;
    font-size: 1.25em;
  }

  h4 {
    margin: 24px 0 12px 0;
    font-size: 1.1em;
  }

  h5 {
    margin: 24px 0 12px 0;
    font-size: 1em;
  }

  h6 {
    margin: 24px 0 12px 0;
    font-size: 0.90em;
  }

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

  blockquote p {
    color: #7f8fa4 !important;
85
    font-size: inherit;
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105
    line-height: 1.5;
  }

  p {
    color:#5c5d5e;
    margin:6px 0 0 0;
  }

  table {
    @extend .table;
    @extend .table-bordered;
    margin: 12px 0 12px 0;
    color: #5c5d5e;
    th {
      background: #f8fafc;
    }
  }

  pre {
    margin: 12px 0 12px 0 !important;
106
    background-color: #f8fafc;
107
    font-size: 13px !important;
108
    color: #5b6169;
109 110 111 112 113 114 115 116
    line-height: 1.6em !important;
    @include border-radius(2px);
  }

  p > code {
    font-weight: inherit;
  }

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

  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;
    }
  }
141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167

  /* 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 {
      $size: 16px;
      position: absolute;
      right: 100%;
      top: 50%;
      margin-top: -$size/2;
      margin-right: 0px;
      padding-right: 20px;
      display: inline-block;
      width: $size;
      height: $size;
      background-image: image-url("icon-link.png");
      background-size: contain;
      background-repeat: no-repeat;
    }
  }
168 169 170
}


171
/**
172
 * Headers
173
 *
174
 */
Andrey's avatar
Andrey committed
175 176 177
body {
  -webkit-text-shadow: rgba(255,255,255,0.01) 0 0 1px;
}
178

179
.page-title {
180
  margin-top: 0px;
181 182 183
  line-height: 1.3;
  font-size: 1.25em;
  font-weight: 600;
Andrey's avatar
Andrey committed
184 185 186 187 188 189 190
}

.page-title-empty {
  margin-top: 0px;
  line-height: 1.3;
  font-size: 1.25em;
  font-weight: 600;
191
  margin: 12px 7px 12px 7px;
192 193
}

194 195 196 197 198
h1, h2, h3, h4, h5, h6 {
  color: $gl-header-color;
  font-weight: 500;
}

199 200
/** CODE **/
pre {
201
  font-family: $monospace_font;
202 203 204

  &.dark {
    background: #333;
205
    color: $background-color;
206
  }
207 208 209 210 211 212 213 214

  &.plain-readme {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font-size: 14px;
  }
215 216
}

217
.monospace {
218
  font-family: $monospace_font;
219
}
220

221 222 223 224 225 226 227
code {
  &.key-fingerprint {
    background: $body-bg;
    color: $text-color;
  }
}

228 229 230 231
a > code {
  color: $link-color;
}

232
/**
233
 * Apply Markdown typography
234 235 236
 *
 */
.wiki {
237
  @include md-typography;
238
}
239 240 241 242

.md {
  @include md-typography;
}
243 244 245 246 247 248 249

/**
 * Textareas intended for GFM
 *
 */
textarea.js-gfm-input {
  font-family: $monospace_font;
250
  color: $gl-text-color;
251
}
252

253 254 255
.md-preview {
}

256 257
.strikethrough {
  text-decoration: line-through;
258
}