146 lines
2.5 KiB
SCSS
146 lines
2.5 KiB
SCSS
.file-content.code {
|
|
border: 0;
|
|
box-shadow: none;
|
|
margin: 0;
|
|
padding: 0;
|
|
table-layout: fixed;
|
|
|
|
pre {
|
|
padding: 10px 0;
|
|
border: 0;
|
|
border-radius: 0 0 $border-radius-default;
|
|
font-family: $monospace-font;
|
|
font-size: $code-font-size;
|
|
margin: 0;
|
|
overflow: auto;
|
|
overflow-y: hidden;
|
|
white-space: pre;
|
|
word-wrap: normal;
|
|
border-left: 1px solid;
|
|
|
|
code {
|
|
display: inline-block;
|
|
min-width: 100%;
|
|
font-family: $monospace-font;
|
|
white-space: normal;
|
|
word-wrap: normal;
|
|
padding: 0;
|
|
|
|
.line {
|
|
display: block;
|
|
width: 100%;
|
|
padding-left: 10px;
|
|
padding-right: 10px;
|
|
white-space: break-spaces;
|
|
word-break: break-word;
|
|
|
|
&:empty::before {
|
|
content: '\200b';
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
.line-numbers {
|
|
padding: 10px;
|
|
text-align: right;
|
|
float: left;
|
|
border-bottom-left-radius: $border-radius-default;
|
|
|
|
a {
|
|
font-family: $monospace-font;
|
|
white-space: nowrap;
|
|
@include gl-display-flex;
|
|
@include gl-justify-content-end;
|
|
|
|
i,
|
|
svg {
|
|
float: left;
|
|
margin-top: 3px;
|
|
margin-right: 5px;
|
|
visibility: hidden;
|
|
}
|
|
|
|
&:hover,
|
|
&:focus {
|
|
outline: none;
|
|
|
|
i,
|
|
svg {
|
|
visibility: visible;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
pre .line,
|
|
.line-numbers a {
|
|
font-size: 0.8125rem;
|
|
line-height: 1.1875rem;
|
|
min-height: 1.1875rem;
|
|
}
|
|
}
|
|
|
|
// Vertically aligns <table> line numbers (eg. blame view)
|
|
// see https://gitlab.com/gitlab-org/gitlab-foss/issues/54048
|
|
td.line-numbers {
|
|
line-height: 1;
|
|
}
|
|
|
|
.project-highlight-puc .unicode-bidi::before {
|
|
content: '\FFFD';
|
|
cursor: pointer;
|
|
text-decoration: underline wavy $red-500;
|
|
}
|
|
|
|
.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;
|
|
}
|
|
}
|