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

426 lines
6.4 KiB
SCSS
Raw Normal View History

@mixin md-typography {
2016-12-30 20:18:27 +00:00
color: $gl-text-color;
word-wrap: break-word;
[dir="auto"] {
text-align: initial;
}
a {
color: $md-link-color;
}
img:not(.emoji) {
margin: 0 0 8px;
}
img.lazy {
min-width: 200px;
min-height: 100px;
background-color: $gray-lightest;
}
img.js-lazy-loaded,
img.emoji {
2017-07-28 11:34:58 +00:00
min-width: inherit;
min-height: inherit;
background-color: inherit;
max-width: 100%;
}
p a:not(.no-attachment-icon) img {
// Remove bottom padding because
// <p> already has $gl-padding bottom
margin-bottom: 0;
}
2017-01-12 17:17:14 +00:00
*:first-child:not(.katex-display) {
margin-top: 0;
}
> :last-child {
margin-bottom: 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 13:25:25 +00:00
color: $kdb-color;
vertical-align: middle;
2016-11-30 13:25:25 +00:00
background-color: $kdb-bg;
border-width: 1px;
border-style: solid;
2016-11-30 13:25:25 +00:00
border-color: $kdb-border $kdb-border $kdb-border-bottom;
border-image: none;
border-radius: 3px;
2016-11-30 13:25:25 +00:00
box-shadow: 0 -1px 0 $kdb-shadow inset;
}
h1 {
font-size: 1.75em;
font-weight: $gl-font-weight-bold;
margin: 24px 0 16px;
padding-bottom: 0.3em;
2016-10-17 20:23:28 +00:00
border-bottom: 1px solid $white-dark;
2016-12-30 20:18:27 +00:00
color: $gl-text-color;
&:first-child {
margin-top: 0;
}
}
h2 {
font-size: 1.5em;
font-weight: $gl-font-weight-bold;
margin: 24px 0 16px;
padding-bottom: 0.3em;
border-bottom: 1px solid $white-dark;
2016-12-30 20:18:27 +00:00
color: $gl-text-color;
}
h3 {
margin: 24px 0 16px;
font-size: 1.3em;
}
h4 {
margin: 24px 0 16px;
font-size: 1.2em;
}
h5 {
margin: 24px 0 16px;
2016-06-28 16:36:41 +00:00
font-size: 1em;
}
h6 {
margin: 24px 0 16px;
2016-06-28 16:36:41 +00:00
font-size: 0.95em;
}
blockquote {
2016-11-30 13:25:25 +00:00
color: $gl-grayish-blue;
font-size: inherit;
padding: 8px 24px;
margin: 16px 0;
2016-10-17 20:23:28 +00:00
border-left: 3px solid $white-dark;
}
2016-09-11 16:08:09 +00:00
blockquote:dir(rtl) {
border-left: 0;
2016-10-17 20:23:28 +00:00
border-right: 3px solid $white-dark;
2016-09-11 16:08:09 +00:00
}
blockquote p {
2016-11-30 13:25:25 +00:00
color: $gl-grayish-blue !important;
font-size: inherit;
line-height: 1.5;
&:last-child {
margin: 0;
}
}
p {
2016-12-30 20:18:27 +00:00
color: $gl-text-color;
margin: 0 0 16px;
}
table {
@extend .table;
@extend .table-bordered;
margin: 16px 0;
2016-12-30 20:18:27 +00:00
color: $gl-text-color;
th {
2016-11-30 13:25:25 +00:00
background: $label-gray-bg;
}
}
2016-09-11 16:08:09 +00:00
table:dir(rtl) th {
text-align: right;
}
pre {
margin-bottom: 16px;
2016-01-25 10:42:47 +00:00
font-size: 13px;
line-height: 1.6em;
overflow-x: auto;
2016-09-09 16:59:36 +00:00
border-radius: 2px;
&.plain-readme {
background: none;
2017-11-02 23:59:51 +00:00
border: 0;
padding: 0;
margin: 0;
font-size: 14px;
}
}
p > code {
font-weight: inherit;
}
2018-01-03 18:36:18 +00:00
dd {
margin-left: $gl-padding;
}
ul,
ol {
padding: 0;
margin: 0 0 16px;
}
ul:dir(rtl),
ol:dir(rtl) {
2016-09-11 16:08:09 +00:00
margin: 3px 28px 3px 0 !important;
}
li {
line-height: 1.6em;
margin-left: 25px;
padding-left: 3px;
/* Normalize the bullet position on webkit. */
@include on-webkit-only {
margin-left: 28px;
padding-left: 0;
}
}
ul.task-list {
2017-05-17 18:38:52 +00:00
> li.task-list-item {
list-style-type: none;
position: relative;
min-height: 22px;
padding-left: 28px;
margin-left: 0 !important;
2017-05-17 18:38:52 +00:00
> input.task-list-item-checkbox {
position: absolute;
left: 8px;
top: 5px;
}
}
}
a[href*="/uploads/"],
a[href*="storage.googleapis.com/google-code-attachments/"] {
2016-10-24 20:58:50 +00: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 20:58:50 +00:00
&:hover::before {
text-decoration: none;
}
}
a.no-attachment-icon {
2016-10-24 20:58:50 +00:00
&::before {
display: none;
}
}
/* Link to current header. */
h1,
h2,
h3,
h4,
h5,
h6 {
position: relative;
a.anchor {
2016-07-30 19:23:46 +00:00
left: -16px;
position: absolute;
text-decoration: none;
outline: none;
2016-07-30 19:23:46 +00:00
2016-10-24 20:58:50 +00:00
&::after {
content: image-url('icon_anchor.svg');
2016-07-30 19:23:46 +00:00
visibility: hidden;
}
}
2016-10-24 20:58:50 +00:00
&:hover > a.anchor::after {
2016-07-30 19:23:46 +00:00
visibility: visible;
}
}
}
/**
* Headers
*
*/
body {
2016-11-30 13:25:25 +00:00
-webkit-text-shadow: $body-text-shadow 0 0 1px;
}
2015-03-07 04:02:34 +00:00
.page-title {
margin-top: $gl-padding;
line-height: 1.3;
font-size: 1.25em;
font-weight: $gl-font-weight-bold;
2015-12-02 13:43:23 +00:00
&:last-child {
margin-bottom: 0;
}
2015-09-28 15:58:30 +00:00
}
.page-title-empty {
margin-top: 0;
2015-09-28 15:58:30 +00:00
line-height: 1.3;
font-size: 1.25em;
font-weight: $gl-font-weight-bold;
margin: 12px 7px;
}
h1,
h2,
h3,
h4,
h5,
h6 {
2016-12-30 20:18:27 +00:00
color: $gl-text-color;
font-weight: $gl-font-weight-bold;
}
.light-header {
font-weight: $gl-font-weight-bold;
}
/** CODE **/
pre {
font-family: $monospace_font;
}
code {
&.key-fingerprint {
background: $body-bg;
color: $text-color;
}
}
a > code {
color: $link-color;
}
.monospace {
font-family: $monospace_font;
}
.commit-sha,
.ref-name {
@extend .monospace;
font-size: 95%;
}
.git-revision-dropdown-toggle {
@extend .monospace;
}
.git-revision-dropdown .dropdown-content ul li a {
@extend .ref-name;
}
2013-01-10 16:09:12 +00:00
/**
* Apply Markdown typography
2013-01-10 16:09:12 +00:00
*
*/
.wiki {
2013-03-04 19:34:26 +00:00
@include md-typography;
2013-01-10 16:09:12 +00:00
}
2013-03-04 20:00:51 +00:00
.md {
@include md-typography;
}
/**
* Textareas intended for GFM
*
*/
textarea.js-gfm-input {
font-family: $monospace_font;
font-size: 13px;
}
2014-11-05 20:45:18 +00:00
.strikethrough {
text-decoration: line-through;
}
h1,
h2,
h3,
h4 {
small {
2016-12-30 20:18:27 +00:00
color: $gl-text-color;
}
}
.text-right-lg {
@media (min-width: $screen-lg-min) {
text-align: right;
}
}
.idiff.deletion {
background: $line-removed-dark;
}
.idiff.addition {
background: $line-added-dark;
}
2017-04-20 01:48:58 +00:00
/**
* form text input i.e. search bar, comments, forms, etc.
*/
input,
textarea {
&::-webkit-input-placeholder {
color: $placeholder-text-color;
}
// support firefox 19+ vendor prefix
&::-moz-placeholder {
color: $placeholder-text-color;
opacity: 1; // FF defaults to 0.54
}
// scss-lint:disable PseudoElement
// support Edge vendor prefix
&::-ms-input-placeholder {
color: $placeholder-text-color;
}
// scss-lint:disable PseudoElement
// support IE vendor prefix
&:-ms-input-placeholder {
color: $placeholder-text-color;
}
}