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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

147 lines
2.5 KiB
SCSS
Raw Normal View History

2015-04-26 12:48:37 +05:30
.file-content.code {
2018-03-17 18:26:18 +05:30
border: 0;
2014-09-02 18:07:02 +05:30
box-shadow: none;
2016-06-02 11:05:42 +05:30
margin: 0;
padding: 0;
2014-09-02 18:07:02 +05:30
table-layout: fixed;
pre {
2016-09-29 09:46:39 +05:30
padding: 10px 0;
2018-03-17 18:26:18 +05:30
border: 0;
2020-03-13 15:44:24 +05:30
border-radius: 0 0 $border-radius-default;
2018-11-18 11:00:15 +05:30
font-family: $monospace-font;
font-size: $code-font-size;
2014-09-02 18:07:02 +05:30
margin: 0;
2015-04-26 12:48:37 +05:30
overflow: auto;
overflow-y: hidden;
white-space: pre;
word-wrap: normal;
2016-02-05 20:25:01 +05:30
border-left: 1px solid;
2014-09-02 18:07:02 +05:30
code {
2016-09-29 09:46:39 +05:30
display: inline-block;
min-width: 100%;
2018-11-18 11:00:15 +05:30
font-family: $monospace-font;
2016-09-29 09:46:39 +05:30
white-space: normal;
2014-09-02 18:07:02 +05:30
word-wrap: normal;
padding: 0;
.line {
2016-09-29 09:46:39 +05:30
display: block;
width: 100%;
padding-left: 10px;
padding-right: 10px;
2022-08-27 11:52:29 +05:30
white-space: break-spaces;
word-break: break-word;
2021-09-04 01:27:46 +05:30
&:empty::before {
content: '\200b';
}
2014-09-02 18:07:02 +05:30
}
}
}
.line-numbers {
padding: 10px;
text-align: right;
float: left;
2019-09-04 21:01:54 +05:30
border-bottom-left-radius: $border-radius-default;
2014-09-02 18:07:02 +05:30
a {
2018-11-18 11:00:15 +05:30
font-family: $monospace-font;
2014-09-02 18:07:02 +05:30
white-space: nowrap;
2022-08-27 11:52:29 +05:30
@include gl-display-flex;
@include gl-justify-content-end;
2014-09-02 18:07:02 +05:30
2020-03-13 15:44:24 +05:30
i,
svg {
2016-06-02 11:05:42 +05:30
float: left;
margin-top: 3px;
margin-right: 5px;
2014-09-02 18:07:02 +05:30
visibility: hidden;
}
2017-08-17 22:00:37 +05:30
&:hover,
&:focus {
outline: none;
2020-03-13 15:44:24 +05:30
i,
svg {
2017-08-17 22:00:37 +05:30
visibility: visible;
}
2014-09-02 18:07:02 +05:30
}
}
}
2020-03-13 15:44:24 +05:30
pre .line,
.line-numbers a {
font-size: 0.8125rem;
line-height: 1.1875rem;
min-height: 1.1875rem;
}
2015-04-26 12:48:37 +05:30
}
2019-02-15 15:39:39 +05:30
// Vertically aligns <table> line numbers (eg. blame view)
2019-12-04 20:38:33 +05:30
// see https://gitlab.com/gitlab-org/gitlab-foss/issues/54048
2019-02-15 15:39:39 +05:30
td.line-numbers {
line-height: 1;
}
2021-10-29 20:43:33 +05:30
.project-highlight-puc .unicode-bidi::before {
2022-05-07 20:08:51 +05:30
content: '\FFFD';
2021-10-29 20:43:33 +05:30
cursor: pointer;
text-decoration: underline wavy $red-500;
}
2022-08-27 11:52:29 +05:30
.blob-viewer {
.line-numbers {
// for server-side-rendering
.line-links {
@include gl-display-flex;
&:first-child {
margin-top: 10px;
}
&:last-child {
margin-bottom: 10px;
}
}
// for client
&.line-links {
min-width: 6rem;
border-bottom-left-radius: 0;
+ pre {
margin-left: 6rem;
}
}
}
.line-links {
&:hover a::before,
&:focus-within a::before {
@include gl-visibility-visible;
}
}
.file-line-num {
min-width: 4.5rem;
@include gl-justify-content-end;
@include gl-flex-grow-1;
@include gl-pr-3;
}
.file-line-blame {
@include gl-ml-3;
}
.file-line-num,
.file-line-blame {
@include gl-align-items-center;
@include gl-display-flex;
}
}