mirror of
https://github.com/lutinglt/gitea-github-theme.git
synced 2025-12-21 22:23:56 +00:00
修复对比视图内容中的圆角和背景溢出
This commit is contained in:
@@ -98,7 +98,8 @@ export const diff = css`
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 差异对比文件盒子
|
// 差异对比文件盒子
|
||||||
.repository .diff-file-box .code-diff {
|
.repository .diff-file-box {
|
||||||
|
.code-diff {
|
||||||
// 隐藏多余的空白
|
// 隐藏多余的空白
|
||||||
// 合并视图的第三列
|
// 合并视图的第三列
|
||||||
&.code-diff-unified colgroup col:nth-child(3),
|
&.code-diff-unified colgroup col:nth-child(3),
|
||||||
@@ -109,10 +110,11 @@ export const diff = css`
|
|||||||
width: 0; // 不要使用 display: none; 否则会影响布局
|
width: 0; // 不要使用 display: none; 否则会影响布局
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
}
|
}
|
||||||
// 不明白 Gitea 分列视图下默认 100% 宽度的目的, 这里设置为 auto 使行号列宽自适应
|
// Gitea 分列视图下默认 100% 宽度的目的是如果单文件只增加或只删除的情况下, 保持无内容的列的宽度一致, 始终保持左右两边的列宽度一致
|
||||||
&.code-diff-split table {
|
// 保持 Gitea 的默认设置, 不对行号宽度做处理
|
||||||
|
/* &.code-diff-split table {
|
||||||
width: auto;
|
width: auto;
|
||||||
}
|
} */
|
||||||
// 行号宽度
|
// 行号宽度
|
||||||
// 40px: 长度 = 9999 行
|
// 40px: 长度 = 9999 行
|
||||||
// 45px: 长度 = 99999 行
|
// 45px: 长度 = 99999 行
|
||||||
@@ -130,4 +132,10 @@ export const diff = css`
|
|||||||
width: 20;
|
width: 20;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// 修复对比视图内容中的圆角和背景溢出
|
||||||
|
.file-body.file-code {
|
||||||
|
border-radius: 0 0 ${otherThemeVars.border.radius} ${otherThemeVars.border.radius};
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
}
|
||||||
`;
|
`;
|
||||||
|
|||||||
Reference in New Issue
Block a user