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

476 lines
7.5 KiB
SCSS
Raw Normal View History

2019-05-18 00:54:41 +05:30
/**
* Apply Markdown typography
*
*/
.md:not(.use-csslab) {
2017-08-17 22:00:37 +05:30
color: $gl-text-color;
2015-10-24 18:46:33 +05:30
word-wrap: break-word;
2019-05-18 00:54:41 +05:30
[dir='auto'] {
2017-09-10 17:25:29 +05:30
text-align: initial;
}
2019-05-18 00:54:41 +05:30
*:first-child {
margin-top: 0;
}
> :last-child {
margin-bottom: 0;
}
p {
color: $gl-text-color;
margin: 0 0 16px;
> code {
font-weight: inherit;
}
a:not(.no-attachment-icon) img {
// Remove bottom padding because
// <p> already has $gl-padding bottom
margin-bottom: 0;
}
}
2015-10-24 18:46:33 +05:30
a {
2018-11-20 20:47:30 +05:30
color: $blue-600;
2019-05-18 00:54:41 +05:30
> code {
color: $blue-600;
}
2015-10-24 18:46:33 +05:30
}
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%;
}
2019-05-18 00:54:41 +05:30
&:not(.md-file) img:not(.emoji) {
border: 1px solid $white-normal;
padding: 5px;
margin: 5px 0;
// Ensure that image does not exceed viewport
max-height: calc(100vh - 100px);
2017-09-10 17:25:29 +05:30
}
2016-09-13 17:45:13 +05:30
// Single code lines should wrap
2015-10-24 18:46:33 +05:30
code {
2018-11-18 11:00:15 +05:30
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;
2019-05-18 00:54:41 +05:30
word-break: keep-all;
2016-09-13 17:45:13 +05:30
}
2015-10-24 18:46:33 +05:30
kbd {
display: inline-block;
padding: 3px 5px;
font-size: 11px;
line-height: 10px;
2018-12-05 23:21:45 +05:30
color: $gl-gray-700;
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;
2018-12-05 23:21:45 +05:30
border-color: $gl-gray-200 $gl-gray-200 $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
}
2018-11-08 19:23:39 +05:30
blockquote,
.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;
2018-11-08 19:23:39 +05:30
&:dir(rtl) {
border-left: 0;
border-right: 3px solid $white-dark;
}
2015-10-24 18:46:33 +05:30
2018-11-08 19:23:39 +05:30
p {
color: $gl-grayish-blue !important;
font-size: inherit;
line-height: 1.5;
2017-09-10 17:25:29 +05:30
2018-11-08 19:23:39 +05:30
&:last-child {
margin: 0;
}
2017-09-10 17:25:29 +05:30
}
2015-10-24 18:46:33 +05:30
}
2019-05-18 00:54:41 +05:30
hr {
// Darken 'whitesmoke' a bit to make it more visible in note bodies
border-color: darken($gray-normal, 8%);
margin: 10px 0;
2015-10-24 18:46:33 +05:30
}
2019-05-18 00:54:41 +05:30
table:not(.code) {
2015-10-24 18:46:33 +05:30
@extend .table;
@extend .table-bordered;
2017-08-17 22:00:37 +05:30
margin: 16px 0;
color: $gl-text-color;
2019-03-02 22:35:43 +05:30
border: 0;
2019-05-18 00:54:41 +05:30
width: auto;
display: block;
overflow-x: auto;
2016-11-03 12:29:30 +05:30
2019-05-18 00:54:41 +05:30
tbody {
background-color: $white-light;
}
tr {
th {
border-bottom: solid 2px $gl-gray-200;
}
td {
border-color: $gl-gray-200;
}
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
2019-05-18 00:54:41 +05:30
// Multi-line code blocks should scroll horizontally
code {
white-space: pre;
}
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
}
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;
}
2019-05-18 00:54:41 +05:30
> ul {
list-style-type: disc;
ul {
list-style-type: circle;
ul {
list-style-type: square;
}
}
}
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;
}
}
}
2019-05-18 00:54:41 +05:30
a[href*='/uploads/'],
a[href*='storage.googleapis.com/google-code-attachments/'] {
2017-08-17 22:00:37 +05:30
&::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;
2019-05-18 00:54:41 +05:30
content: '\f0c6';
2015-10-24 18:46:33 +05:30
}
2017-08-17 22:00:37 +05:30
&:hover::before {
2015-10-24 18:46:33 +05:30
text-decoration: none;
}
2019-05-18 00:54:41 +05:30
&.no-attachment-icon {
&::before {
display: none;
}
2016-06-02 11:05:42 +05:30
}
}
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 {
2018-12-05 23:21:45 +05:30
margin: #{2 * $grid-size} 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;
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 {
2019-05-18 00:54:41 +05:30
margin: 12px 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;
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 {
2018-11-18 11:00:15 +05:30
font-family: $monospace-font;
2018-11-08 19:23:39 +05:30
display: block;
2018-11-20 20:47:30 +05:30
padding: $gl-padding-8 $input-horizontal-padding;
2018-11-08 19:23:39 +05:30
margin: 0 0 $gl-padding-8;
font-size: 13px;
word-break: break-all;
word-wrap: break-word;
color: $gl-text-color;
background-color: $gray-light;
border: 1px solid $border-color;
border-radius: $border-radius-small;
2015-10-24 18:46:33 +05:30
}
code {
&.key-fingerprint {
background: $body-bg;
color: $text-color;
}
}
2017-09-10 17:25:29 +05:30
.monospace {
2018-11-18 11:00:15 +05:30
font-family: $monospace-font;
2017-09-10 17:25:29 +05:30
}
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,
2018-11-08 19:23:39 +05:30
.ref-name,
.pipeline-number {
2017-09-10 17:25:29 +05:30
@extend .monospace;
font-size: 95%;
}
.git-revision-dropdown .dropdown-content ul li a {
@extend .ref-name;
}
2015-10-24 18:46:33 +05:30
/**
* Textareas intended for GFM
*
*/
2017-08-17 22:00:37 +05:30
textarea.js-gfm-input {
2018-11-18 11:00:15 +05:30
font-family: $monospace-font;
2017-08-17 22:00:37 +05:30
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 {
2018-11-08 19:23:39 +05:30
@include media-breakpoint-up(lg) {
2016-06-02 11:05:42 +05:30
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.
*/
2019-05-18 00:54:41 +05:30
/* stylelint-disable selector-no-vendor-prefix */
2017-08-17 22:00:37 +05:30
input,
textarea {
&::-webkit-input-placeholder {
2018-11-20 20:47:30 +05:30
color: $gl-text-color-tertiary;
2017-08-17 22:00:37 +05:30
}
// support firefox 19+ vendor prefix
&::-moz-placeholder {
2018-11-20 20:47:30 +05:30
color: $gl-text-color-tertiary;
2017-08-17 22:00:37 +05:30
opacity: 1; // FF defaults to 0.54
}
// scss-lint:disable PseudoElement
// support Edge vendor prefix
&::-ms-input-placeholder {
2018-11-20 20:47:30 +05:30
color: $gl-text-color-tertiary;
2017-08-17 22:00:37 +05:30
}
// scss-lint:disable PseudoElement
// support IE vendor prefix
&:-ms-input-placeholder {
2018-11-20 20:47:30 +05:30
color: $gl-text-color-tertiary;
2017-08-17 22:00:37 +05:30
}
}
2019-05-18 00:54:41 +05:30
/* stylelint-enable */
2018-11-18 11:00:15 +05:30
.lh-100 { line-height: 1; }