mirror of
https://github.com/harness/drone.git
synced 2025-05-12 23:20:10 +08:00
164 lines
3.4 KiB
SCSS
164 lines
3.4 KiB
SCSS
.main {
|
|
--border-color: var(--grey-200);
|
|
|
|
border-radius: 5px;
|
|
min-height: 36px;
|
|
|
|
:global {
|
|
.d2h-wrapper > div {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.d2h-file-wrapper {
|
|
border: 0;
|
|
|
|
.d2h-diff-tbody {
|
|
&,
|
|
tr {
|
|
position: relative;
|
|
|
|
&[data-annotated-line] {
|
|
background-color: var(--white);
|
|
|
|
// These cause one or two pixels mismatched
|
|
// calculation due to table spacing gaps
|
|
// border-top: 1px solid var(--grey-200);
|
|
// border-bottom: 1px solid var(--grey-200);
|
|
}
|
|
}
|
|
}
|
|
|
|
&.side-by-side-file-diff {
|
|
.d2h-code-side-linenumber.d2h-info {
|
|
pointer-events: none;
|
|
}
|
|
}
|
|
|
|
[data-annotated='true'] [data-content-for-line-number],
|
|
[data-content-for-line-number=''],
|
|
.d2h-emptyplaceholder[data-content-for-line-number=''] {
|
|
&,
|
|
:hover {
|
|
[data-annotation-for-line] {
|
|
pointer-events: none;
|
|
display: none;
|
|
}
|
|
}
|
|
}
|
|
|
|
[data-content-for-line-number] {
|
|
cursor: default;
|
|
|
|
[data-annotation-for-line] {
|
|
position: absolute;
|
|
top: 1px;
|
|
left: 60px;
|
|
display: flex;
|
|
height: 14px;
|
|
width: 14px;
|
|
font-weight: 600;
|
|
background: var(--primary-7);
|
|
color: var(--white);
|
|
text-align: center;
|
|
border-radius: 5px;
|
|
align-items: center;
|
|
justify-content: center;
|
|
cursor: pointer;
|
|
visibility: hidden;
|
|
}
|
|
|
|
&:hover [data-annotation-for-line] {
|
|
visibility: visible;
|
|
|
|
&:hover {
|
|
transform: scale(1.3);
|
|
transition: transform 0.75s;
|
|
}
|
|
}
|
|
}
|
|
|
|
&.line-by-line-file-diff {
|
|
[data-annotation-for-line] {
|
|
left: 102px;
|
|
}
|
|
}
|
|
}
|
|
|
|
.d2h-file-header {
|
|
display: none;
|
|
}
|
|
|
|
.d2h-files-diff {
|
|
.d2h-code-side-linenumber {
|
|
border-left: 0;
|
|
}
|
|
}
|
|
|
|
.d2h-file-side-diff {
|
|
border-bottom-left-radius: 5px;
|
|
border-bottom-right-radius: 5px;
|
|
}
|
|
|
|
.d2h-code-side-linenumber {
|
|
width: 56px;
|
|
}
|
|
}
|
|
|
|
&.collapsed {
|
|
.diffHeader {
|
|
border-bottom-left-radius: 5px;
|
|
border-bottom-right-radius: 5px;
|
|
}
|
|
|
|
.diffContent {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
.diffHeader {
|
|
display: grid;
|
|
align-items: center;
|
|
background-color: var(--grey-100);
|
|
position: sticky;
|
|
top: var(--diff-viewer-sticky-top, 0);
|
|
z-index: 1;
|
|
padding: 5px 10px 5px 5px;
|
|
border: 1px solid var(--border-color);
|
|
border-top-left-radius: 5px;
|
|
border-top-right-radius: 5px;
|
|
|
|
.fname {
|
|
font-size: 13px !important;
|
|
font-weight: 600 !important;
|
|
color: var(--grey-900) !important;
|
|
align-self: center;
|
|
}
|
|
}
|
|
|
|
.viewLabel {
|
|
display: flex;
|
|
font-size: 12px;
|
|
color: var(--grey-600);
|
|
border: 1px solid var(--grey-200);
|
|
padding: 3px 6px;
|
|
border-radius: 3px;
|
|
cursor: pointer;
|
|
|
|
input {
|
|
display: inline-block;
|
|
margin-right: var(--spacing-small);
|
|
}
|
|
}
|
|
|
|
.diffContent {
|
|
border-left: 1px solid var(--border-color);
|
|
border-right: 1px solid var(--border-color);
|
|
border-bottom: 1px solid var(--border-color);
|
|
|
|
border-bottom-left-radius: 5px;
|
|
border-bottom-right-radius: 5px;
|
|
|
|
max-width: calc(100vw - 320px);
|
|
}
|
|
}
|