debian-mirror-gitlab/app/assets/stylesheets/framework/typography.scss

435 lines
6.5 KiB
SCSS
Raw Normal View History

2015-10-24 18:46:33 +05:30
@mixin md-typography {
2017-08-17 22:00:37 +05:30
color: $gl-text-color;
2015-10-24 18:46:33 +05:30
word-wrap: break-word;
2017-09-10 17:25:29 +05:30
[dir="auto"] {
text-align: initial;
}
2015-10-24 18:46:33 +05:30
a {
color: $md-link-color;
}
2018-03-17 18:26:18 +05:30
img:not(.emoji) {
2017-08-17 22:00:37 +05:30
margin: 0 0 8px;
2015-10-24 18:46:33 +05:30
}
2017-09-10 17:25:29 +05:30
img.lazy {
min-width: 200px;
min-height: 100px;
background-color: $gray-lightest;
}
img.js-lazy-loaded,
img.emoji {
min-width: inherit;
min-height: inherit;
background-color: inherit;
max-width: 100%;
}
2017-08-17 22:00:37 +05:30
p a:not(.no-attachment-icon) img {
// Remove bottom padding because
// <p> already has $gl-padding bottom
margin-bottom: 0;
}
*:first-child:not(.katex-display) {
2015-10-24 18:46:33 +05:30
margin-top: 0;
}
2017-09-10 17:25:29 +05:30
> :last-child {
margin-bottom: 0;
}
2016-09-13 17:45:13 +05:30
// Single code lines should wrap
2015-10-24 18:46:33 +05:30
code {
font-family: $monospace_font;
2016-09-13 17:45:13 +05:30
white-space: pre-wrap;
2015-10-24 18:46:33 +05:30
word-wrap: normal;
}
2016-09-13 17:45:13 +05:30
// Multi-line code blocks should scroll horizontally
pre {
code {
white-space: pre;
}
}
2015-10-24 18:46:33 +05:30
kbd {
display: inline-block;
padding: 3px 5px;
font-size: 11px;
line-height: 10px;
2017-08-17 22:00:37 +05:30
color: $kdb-color;
2015-10-24 18:46:33 +05:30
vertical-align: middle;
2017-08-17 22:00:37 +05:30
background-color: $kdb-bg;
2015-10-24 18:46:33 +05:30
border-width: 1px;
border-style: solid;
2017-08-17 22:00:37 +05:30
border-color: $kdb-border $kdb-border $kdb-border-bottom;
2015-10-24 18:46:33 +05:30
border-image: none;
border-radius: 3px;
2017-08-17 22:00:37 +05:30
box-shadow: 0 -1px 0 $kdb-shadow inset;
2015-10-24 18:46:33 +05:30
}
h1 {
2016-11-03 12:29:30 +05:30
font-size: 1.75em;
2018-03-17 18:26:18 +05:30
font-weight: $gl-font-weight-bold;
2017-08-17 22:00:37 +05:30
margin: 24px 0 16px;
padding-bottom: 0.3em;
2016-11-03 12:29:30 +05:30
border-bottom: 1px solid $white-dark;
2017-08-17 22:00:37 +05:30
color: $gl-text-color;
&:first-child {
margin-top: 0;
}
2015-10-24 18:46:33 +05:30
}
h2 {
2016-11-03 12:29:30 +05:30
font-size: 1.5em;
2018-03-17 18:26:18 +05:30
font-weight: $gl-font-weight-bold;
2017-08-17 22:00:37 +05:30
margin: 24px 0 16px;
padding-bottom: 0.3em;
border-bottom: 1px solid $white-dark;
color: $gl-text-color;
2015-10-24 18:46:33 +05:30
}
h3 {
2017-08-17 22:00:37 +05:30
margin: 24px 0 16px;
2016-11-03 12:29:30 +05:30
font-size: 1.3em;
2015-10-24 18:46:33 +05:30
}
h4 {
2017-08-17 22:00:37 +05:30
margin: 24px 0 16px;
2016-11-03 12:29:30 +05:30
font-size: 1.2em;
2015-10-24 18:46:33 +05:30
}
h5 {
2017-08-17 22:00:37 +05:30
margin: 24px 0 16px;
2016-09-13 17:45:13 +05:30
font-size: 1em;
2015-10-24 18:46:33 +05:30
}
h6 {
2017-08-17 22:00:37 +05:30
margin: 24px 0 16px;
2016-09-13 17:45:13 +05:30
font-size: 0.95em;
2015-10-24 18:46:33 +05:30
}
blockquote {
2017-08-17 22:00:37 +05:30
color: $gl-grayish-blue;
2015-10-24 18:46:33 +05:30
font-size: inherit;
2017-08-17 22:00:37 +05:30
padding: 8px 24px;
margin: 16px 0;
2016-11-03 12:29:30 +05:30
border-left: 3px solid $white-dark;
}
blockquote:dir(rtl) {
border-left: 0;
border-right: 3px solid $white-dark;
2015-10-24 18:46:33 +05:30
}
blockquote p {
2017-08-17 22:00:37 +05:30
color: $gl-grayish-blue !important;
2015-10-24 18:46:33 +05:30
font-size: inherit;
line-height: 1.5;
2017-09-10 17:25:29 +05:30
&:last-child {
margin: 0;
}
2015-10-24 18:46:33 +05:30
}
p {
2017-08-17 22:00:37 +05:30
color: $gl-text-color;
margin: 0 0 16px;
2015-10-24 18:46:33 +05:30
}
table {
@extend .table;
@extend .table-bordered;
2017-08-17 22:00:37 +05:30
margin: 16px 0;
color: $gl-text-color;
2016-11-03 12:29:30 +05:30
2015-10-24 18:46:33 +05:30
th {
2017-08-17 22:00:37 +05:30
background: $label-gray-bg;
2015-10-24 18:46:33 +05:30
}
}
2016-11-03 12:29:30 +05:30
table:dir(rtl) th {
text-align: right;
}
2015-10-24 18:46:33 +05:30
pre {
2017-08-17 22:00:37 +05:30
margin-bottom: 16px;
2016-02-05 20:25:01 +05:30
font-size: 13px;
line-height: 1.6em;
overflow-x: auto;
2016-11-03 12:29:30 +05:30
border-radius: 2px;
2017-09-10 17:25:29 +05:30
&.plain-readme {
background: none;
2018-03-17 18:26:18 +05:30
border: 0;
2017-09-10 17:25:29 +05:30
padding: 0;
margin: 0;
font-size: 14px;
}
2015-10-24 18:46:33 +05:30
}
p > code {
font-weight: inherit;
}
2018-03-17 18:26:18 +05:30
dd {
margin-left: $gl-padding;
}
2017-08-17 22:00:37 +05:30
ul,
ol {
2015-10-24 18:46:33 +05:30
padding: 0;
2017-09-10 17:25:29 +05:30
margin: 0 0 16px;
2015-10-24 18:46:33 +05:30
}
2017-08-17 22:00:37 +05:30
ul:dir(rtl),
ol:dir(rtl) {
2016-11-03 12:29:30 +05:30
margin: 3px 28px 3px 0 !important;
}
2015-10-24 18:46:33 +05:30
li {
line-height: 1.6em;
2017-08-17 22:00:37 +05:30
margin-left: 25px;
padding-left: 3px;
/* Normalize the bullet position on webkit. */
@include on-webkit-only {
margin-left: 28px;
padding-left: 0;
}
2015-10-24 18:46:33 +05:30
}
2017-08-17 22:00:37 +05:30
ul.task-list {
2017-09-10 17:25:29 +05:30
> li.task-list-item {
2017-08-17 22:00:37 +05:30
list-style-type: none;
position: relative;
min-height: 22px;
padding-left: 28px;
margin-left: 0 !important;
2017-09-10 17:25:29 +05:30
> input.task-list-item-checkbox {
2017-08-17 22:00:37 +05:30
position: absolute;
left: 8px;
top: 5px;
}
}
}
a[href*="/uploads/"],
a[href*="storage.googleapis.com/google-code-attachments/"] {
&::before {
2015-10-24 18:46:33 +05:30
margin-right: 4px;
font: normal normal normal 14px/1 FontAwesome;
font-size: inherit;
text-rendering: auto;
-webkit-font-smoothing: antialiased;
content: "\f0c6";
}
2017-08-17 22:00:37 +05:30
&:hover::before {
2015-10-24 18:46:33 +05:30
text-decoration: none;
}
}
2016-06-02 11:05:42 +05:30
a.no-attachment-icon {
2017-08-17 22:00:37 +05:30
&::before {
2016-06-02 11:05:42 +05:30
display: none;
}
}
2015-10-24 18:46:33 +05:30
/* Link to current header. */
2017-08-17 22:00:37 +05:30
h1,
h2,
h3,
h4,
h5,
h6 {
2015-10-24 18:46:33 +05:30
position: relative;
a.anchor {
2016-09-29 09:46:39 +05:30
left: -16px;
position: absolute;
text-decoration: none;
2017-08-17 22:00:37 +05:30
outline: none;
2016-09-29 09:46:39 +05:30
2017-08-17 22:00:37 +05:30
&::after {
2016-09-29 09:46:39 +05:30
content: image-url('icon_anchor.svg');
visibility: hidden;
}
2015-10-24 18:46:33 +05:30
}
2017-08-17 22:00:37 +05:30
&:hover > a.anchor::after {
2016-09-29 09:46:39 +05:30
visibility: visible;
2015-10-24 18:46:33 +05:30
}
}
}
/**
* Headers
*
*/
body {
2017-08-17 22:00:37 +05:30
-webkit-text-shadow: $body-text-shadow 0 0 1px;
2015-10-24 18:46:33 +05:30
}
.page-title {
margin-top: $gl-padding;
2015-10-24 18:46:33 +05:30
line-height: 1.3;
font-size: 1.25em;
2018-03-17 18:26:18 +05:30
font-weight: $gl-font-weight-bold;
2015-12-23 02:04:40 +05:30
&:last-child {
margin-bottom: 0;
}
2018-05-09 12:01:36 +05:30
&.with-button {
line-height: 34px;
}
2015-10-24 18:46:33 +05:30
}
.page-title-empty {
2016-06-02 11:05:42 +05:30
margin-top: 0;
2015-10-24 18:46:33 +05:30
line-height: 1.3;
font-size: 1.25em;
2018-03-17 18:26:18 +05:30
font-weight: $gl-font-weight-bold;
2018-03-27 19:54:05 +05:30
margin: 12px 0;
2015-10-24 18:46:33 +05:30
}
2017-08-17 22:00:37 +05:30
h1,
h2,
h3,
h4,
h5,
h6 {
color: $gl-text-color;
2018-03-17 18:26:18 +05:30
font-weight: $gl-font-weight-bold;
2016-06-02 11:05:42 +05:30
}
.light-header {
2018-03-17 18:26:18 +05:30
font-weight: $gl-font-weight-bold;
2015-10-24 18:46:33 +05:30
}
/** CODE **/
pre {
font-family: $monospace_font;
}
code {
&.key-fingerprint {
background: $body-bg;
color: $text-color;
}
}
a > code {
color: $link-color;
}
2017-09-10 17:25:29 +05:30
.monospace {
font-family: $monospace_font;
}
2018-03-27 19:54:05 +05:30
.weight-normal {
font-weight: $gl-font-weight-normal;
}
2017-09-10 17:25:29 +05:30
.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;
}
2015-10-24 18:46:33 +05:30
/**
* Apply Markdown typography
*
*/
.wiki {
@include md-typography;
}
.md {
@include md-typography;
}
/**
* Textareas intended for GFM
*
*/
2017-08-17 22:00:37 +05:30
textarea.js-gfm-input {
font-family: $monospace_font;
font-size: 13px;
}
2015-10-24 18:46:33 +05:30
.strikethrough {
text-decoration: line-through;
}
2015-12-23 02:04:40 +05:30
2017-08-17 22:00:37 +05:30
h1,
h2,
h3,
h4 {
2015-12-23 02:04:40 +05:30
small {
2017-08-17 22:00:37 +05:30
color: $gl-text-color;
2015-12-23 02:04:40 +05:30
}
}
2016-06-02 11:05:42 +05:30
.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-08-17 22:00:37 +05:30
/**
* 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;
}
}