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

704 lines
11 KiB
SCSS
Raw Normal View History

2019-07-07 11:18:12 +05:30
/**
2019-09-30 21:07:59 +05:30
* Apply Markup (Markdown/AsciiDoc) typography
2019-07-07 11:18:12 +05:30
*
*/
2019-12-04 20:38:33 +05:30
.md {
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-07-07 11:18:12 +05:30
[dir='auto'] {
2017-09-10 17:25:29 +05:30
text-align: initial;
}
2019-07-07 11:18:12 +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-07-07 11:18:12 +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-07-07 11:18:12 +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
}
2019-12-04 20:38:33 +05:30
details {
margin-bottom: $gl-padding;
}
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-07-07 11:18:12 +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-07-07 11:18:12 +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-07-07 11:18:12 +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-07-07 11:18:12 +05:30
width: auto;
display: block;
overflow-x: auto;
2016-11-03 12:29:30 +05:30
2019-07-07 11:18:12 +05:30
tbody {
background-color: $white-light;
2020-03-09 13:42:32 +05:30
td {
border-color: $gray-200;
}
2019-07-07 11:18:12 +05:30
}
tr {
th {
2020-03-09 13:42:32 +05:30
border-bottom: solid 2px $gray-300;
2019-07-07 11:18:12 +05:30
}
2015-10-24 18:46:33 +05:30
}
2019-12-21 20:55:43 +05:30
&.grid-none {
> thead > tr {
> th {
border-bottom-width: 0;
border-right-width: 0;
border-left-width: 0;
&:first-child {
border-left-width: 1px;
}
&:last-child {
border-right-width: 1px;
}
}
}
> tbody {
> tr > td {
border-width: 0;
&:first-child {
border-left-width: 1px;
}
&:last-child {
border-right-width: 1px;
}
}
> tr:last-child > td {
border-bottom-width: 1px;
}
}
}
&.grid-rows {
> thead > tr > th,
> tbody > tr > td {
border-right-width: 0;
border-left-width: 0;
}
> thead > tr {
> th:first-child {
border-left-width: 1px;
}
> th:last-child {
border-right-width: 1px;
}
}
> tbody > tr {
> td {
border-left-width: 0;
border-right-width: 0;
}
> td:first-child {
border-left-width: 1px;
}
> td:last-child {
border-right-width: 1px;
}
}
}
&.grid-cols {
> thead > tr > th {
border-bottom-width: 0;
}
> tbody > tr > td {
border-top-width: 0;
border-bottom-width: 0;
}
> tbody > tr:last-child > td {
border-bottom-width: 1px;
}
}
&.frame-sides {
> thead > tr > th {
border-top-width: 0;
}
> tbody > tr:last-child > td {
border-bottom-width: 0;
}
}
&.frame-topbot,
&.frame-ends {
> thead > tr > th:first-child,
> tbody > tr > td:first-child {
border-left-width: 0;
}
> thead > tr > th:last-child,
> tbody > tr > td:last-child {
border-right-width: 0;
}
}
&.frame-none {
> thead > tr > th {
border-top-width: 0;
}
> tbody > tr:last-child > td {
border-bottom-width: 0;
}
> thead > tr > th:first-child,
> tbody > tr > td:first-child {
border-left-width: 0;
}
> thead > tr > th:last-child,
> tbody > tr > td:last-child {
border-right-width: 0;
}
}
&.stripes-all tr,
&.stripes-odd tr:nth-of-type(odd),
&.stripes-even tr:nth-of-type(even),
&.stripes-hover tr:hover {
background: $gray-light;
}
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-07-07 11:18:12 +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;
2019-09-30 21:07:59 +05:30
ul,
ol {
margin-bottom: 0;
}
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-07-07 11:18:12 +05:30
> ul {
list-style-type: disc;
ul {
list-style-type: circle;
ul {
list-style-type: square;
}
}
}
2019-09-30 21:07:59 +05:30
ul.checklist,
ul.none,
ol.none,
ul.no-bullet,
ol.no-bullet,
ol.unnumbered,
ul.unstyled,
ol.unstyled {
list-style-type: none;
li {
margin-left: 0;
}
}
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-07-07 11:18:12 +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-07-07 11:18:12 +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-07-07 11:18:12 +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
}
}
2019-09-30 21:07:59 +05:30
.big {
font-size: larger;
}
.small {
font-size: smaller;
}
.underline {
text-decoration: underline;
}
.overline {
text-decoration: overline;
}
.line-through {
text-decoration: line-through;
}
.admonitionblock td.icon {
width: 1%;
[class^='fa icon-'] {
@extend .fa-2x;
}
.icon-note {
@extend .fa-thumb-tack;
}
.icon-tip {
@extend .fa-lightbulb-o;
}
.icon-warning {
@extend .fa-exclamation-triangle;
}
.icon-caution {
@extend .fa-fire;
}
.icon-important {
@extend .fa-exclamation-circle;
}
}
2015-10-24 18:46:33 +05:30
2019-12-21 20:55:43 +05:30
.metrics-embed {
2019-12-04 20:38:33 +05:30
h3.popover-header {
/** Override <h3> .popover-header
* as embed metrics do not follow the same
* style as default md <h3> (which are deeply nested)
*/
margin: 0;
font-size: $gl-font-size-small;
}
}
}
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-07-07 11:18:12 +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;
2019-09-04 21:01:54 +05:30
word-break: break-all;
2017-09-10 17:25:29 +05:30
}
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
2020-01-01 13:55:28 +05:30
.text-right-md {
@include media-breakpoint-up(md) {
text-align: right;
}
}
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-07-07 11:18:12 +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-07-07 11:18:12 +05:30
/* stylelint-enable */
2018-11-18 11:00:15 +05:30
.lh-100 { line-height: 1; }
2019-07-31 22:56:46 +05:30
wbr {
display: inline-block;
}