gitlab-org--gitlab-foss/app/assets/stylesheets/framework/typography.scss

312 lines
4.3 KiB
SCSS
Raw Normal View History

@mixin md-typography {
color: $md-text-color;
word-wrap: break-word;
a {
color: $md-link-color;
}
img {
max-width: 100%;
}
*:first-child {
margin-top: 0;
}
// Single code lines should wrap
code {
font-family: $monospace_font;
white-space: pre-wrap;
word-wrap: normal;
}
// Multi-line code blocks should scroll horizontally
pre {
code {
white-space: pre;
}
}
kbd {
display: inline-block;
padding: 3px 5px;
font-size: 11px;
line-height: 10px;
2016-11-30 08:25:25 -05:00
color: $kdb-color;
vertical-align: middle;
2016-11-30 08:25:25 -05:00
background-color: $kdb-bg;
border-width: 1px;
border-style: solid;
2016-11-30 08:25:25 -05:00
border-color: $kdb-border $kdb-border $kdb-border-bottom;
border-image: none;
border-radius: 3px;
2016-11-30 08:25:25 -05:00
box-shadow: 0 -1px 0 $kdb-shadow inset;
}
h1 {
font-size: 1.75em;
font-weight: 600;
margin: 16px 0 10px;
2016-06-28 12:36:41 -04:00
padding: 0 0 0.3em;
2016-10-17 16:23:28 -04:00
border-bottom: 1px solid $white-dark;
2016-04-25 16:02:15 -04:00
color: $gl-gray-dark;
}
h2 {
font-size: 1.5em;
font-weight: 600;
margin: 16px 0 10px;
2016-04-25 16:02:15 -04:00
color: $gl-gray-dark;
}
h3 {
margin: 16px 0 10px;
font-size: 1.3em;
}
h4 {
margin: 16px 0 10px;
font-size: 1.2em;
}
h5 {
margin: 16px 0 10px;
2016-06-28 12:36:41 -04:00
font-size: 1em;
}
h6 {
margin: 16px 0 10px;
2016-06-28 12:36:41 -04:00
font-size: 0.95em;
}
blockquote {
2016-11-30 08:25:25 -05:00
color: $gl-grayish-blue;
font-size: inherit;
padding: 8px 21px;
margin: 12px 0;
2016-10-17 16:23:28 -04:00
border-left: 3px solid $white-dark;
}
2016-09-11 12:08:09 -04:00
blockquote:dir(rtl) {
border-left: 0;
2016-10-17 16:23:28 -04:00
border-right: 3px solid $white-dark;
2016-09-11 12:08:09 -04:00
}
blockquote p {
2016-11-30 08:25:25 -05:00
color: $gl-grayish-blue !important;
font-size: inherit;
line-height: 1.5;
}
p {
2016-11-30 08:25:25 -05:00
color: $gl-text-color-dark;
margin: 6px 0 0;
}
table {
@extend .table;
@extend .table-bordered;
margin: 12px 0;
2016-11-30 08:25:25 -05:00
color: $gl-text-color-dark;
th {
2016-11-30 08:25:25 -05:00
background: $label-gray-bg;
}
}
2016-09-11 12:08:09 -04:00
table:dir(rtl) th {
text-align: right;
}
pre {
margin: 12px 0;
2016-01-25 05:42:47 -05:00
font-size: 13px;
line-height: 1.6em;
overflow-x: auto;
2016-09-09 12:59:36 -04:00
border-radius: 2px;
}
p > code {
font-weight: inherit;
}
ul,
ol {
padding: 0;
2016-06-28 12:36:41 -04:00
margin: 3px 0 3px 28px !important;
}
ul:dir(rtl),
ol:dir(rtl) {
2016-09-11 12:08:09 -04:00
margin: 3px 28px 3px 0 !important;
}
li {
line-height: 1.6em;
}
a[href*="/uploads/"],
a[href*="storage.googleapis.com/google-code-attachments/"] {
2016-10-24 16:58:50 -04:00
&::before {
margin-right: 4px;
font: normal normal normal 14px/1 FontAwesome;
font-size: inherit;
text-rendering: auto;
-webkit-font-smoothing: antialiased;
content: "\f0c6";
}
2016-10-24 16:58:50 -04:00
&:hover::before {
text-decoration: none;
}
}
a.no-attachment-icon {
2016-10-24 16:58:50 -04:00
&::before {
display: none;
}
}
/* Link to current header. */
h1,
h2,
h3,
h4,
h5,
h6 {
position: relative;
a.anchor {
2016-07-30 15:23:46 -04:00
left: -16px;
position: absolute;
text-decoration: none;
outline: none;
2016-07-30 15:23:46 -04:00
2016-10-24 16:58:50 -04:00
&::after {
content: image-url('icon_anchor.svg');
2016-07-30 15:23:46 -04:00
visibility: hidden;
}
}
2016-10-24 16:58:50 -04:00
&:hover > a.anchor::after {
2016-07-30 15:23:46 -04:00
visibility: visible;
}
}
}
/**
* Headers
*
*/
body {
2016-11-30 08:25:25 -05:00
-webkit-text-shadow: $body-text-shadow 0 0 1px;
}
2015-03-06 23:02:34 -05:00
.page-title {
margin-top: $gl-padding;
line-height: 1.3;
font-size: 1.25em;
font-weight: 600;
2015-12-02 08:43:23 -05:00
&:last-child {
margin-bottom: 0;
}
2015-09-28 11:58:30 -04:00
}
.page-title-empty {
margin-top: 0;
2015-09-28 11:58:30 -04:00
line-height: 1.3;
font-size: 1.25em;
font-weight: 600;
margin: 12px 7px;
}
h1,
h2,
h3,
h4,
h5,
h6 {
2016-09-08 17:38:14 -04:00
color: $gl-title-color;
2016-03-02 05:28:17 -05:00
font-weight: 600;
}
.light-header {
font-weight: 600;
}
/** CODE **/
pre {
font-family: $monospace_font;
&.plain-readme {
background: none;
border: none;
padding: 0;
margin: 0;
font-size: 14px;
}
}
2012-11-22 23:24:09 -05:00
.monospace {
font-family: $monospace_font;
font-size: 90%;
2012-11-22 23:24:09 -05:00
}
2013-01-10 11:09:12 -05:00
code {
&.key-fingerprint {
background: $body-bg;
color: $text-color;
}
}
a > code {
color: $link-color;
}
2013-01-10 11:09:12 -05:00
/**
* Apply Markdown typography
2013-01-10 11:09:12 -05:00
*
*/
.wiki {
2013-03-04 14:34:26 -05:00
@include md-typography;
2013-01-10 11:09:12 -05:00
}
2013-03-04 15:00:51 -05:00
.md {
@include md-typography;
}
/**
* Textareas intended for GFM
*
*/
2014-11-05 15:45:18 -05:00
.strikethrough {
text-decoration: line-through;
}
h1,
h2,
h3,
h4 {
small {
color: $gl-gray;
}
}
.text-right-lg {
@media (min-width: $screen-lg-min) {
text-align: right;
}
}
.idiff.deletion {
background: $line-removed-dark;
}
.idiff.addition {
background: $line-added-dark;
}