Files
file-online-preview/server/src/main/resources/static/ofd/css/cnofd.css
kl b6dd8129ea refactor: 优化 OFD 表格溢出修复选择器 - 仅覆盖有 inline style 的 SVG
采纳 Copilot 的建议,改用更精准的选择器 #content svg[style="overflow:visible"]。
这样可以只覆盖有 inline style overflow:visible 的 SVG 容器,避免影响其他
已有 overflow:hidden 的元素。保留完整的注释说明问题根因和解决方案。

Ref: Copilot suggestion on PR #723
2026-03-11 20:37:01 +08:00

223 lines
5.0 KiB
Java
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
.horizontalToolbarSeparator {
display: inline-block;
margin: 0 10px -2px;
width: 1px;
height: 15px;
background-color: rgba(255,255,255,.5);
-webkit-box-shadow: 0 0 0 1px hsla(0,0%,100%,.08);
box-shadow: 0 0 0 1px hsla(0,0%,100%,.08);
}
.btn-icon {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
cursor: pointer;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
height: 28px;
padding-left: 10px;
padding-right: 10px;
//background-color: rgb(59, 95, 232);
border-radius: 1px;
border-color: #44AAFF;
font-weight: 500;
font-size: 14px;
color: white;
margin: 1px;
}
.btn-icon :active {
color: rgb(0, 245, 255);
}
.btn-icon :hover {
color: rgb(0, 245, 255);
}
.text-icon {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
cursor: pointer;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
height: 28px;
width: 90%;
background-color: rgb(59, 95, 232);
border-radius: 1px;
border-color: #44AAFF;
font-weight: 500;
font-size: 10px;
color: white;
margin-top: 20px;
}
.select-icon {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
cursor: pointer;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
height: 28px;
padding-left: 10px;
padding-right: 10px;
border-radius: 1px;
border-color: #44AAFF;
font-weight: 500;
font-size: 14px;
color: #44AAFF;
margin: 1px;
}
.hidden {
display: none !important;
}
.left-section {
position: fixed;
width: 0px;
height: 100%;
background:#F5F5F5;
border: 1px solid #e8e8e8;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column
}
.main-section {
padding-top: 0px;
margin-left: 0px;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
background: #F2F2F2;
overflow: hidden;
position: relative;
}
.main-section-font {
background: white;
margin-left: 88px;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
}
@media (max-width: 767px) {
.left-section {
position: fixed;
width: 0px;
height: 100%;
background:#F5F5F5;
border: 1px solid #e8e8e8;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
display: none;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
}
.main-section {
padding-top: 0px;
margin-left:0px;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
background: #808080;
overflow: hidden
}
.main-section-font {
background: white;
margin-left: 0px;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
}
}
#app {
font-family: "Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","微软雅黑",Arial,sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
}
body { margin: 0; }
@font-face {
font-family: "simsun";
src: url(./fonts/simsun.woff);
}
@font-face {
font-family: "simkai";
src: url(./fonts/simkai.woff);
}
@font-face {
font-family: "simhei";
src: url(./fonts/simhei.woff);
}
/* OFD 表格竖线溢出修复 */
/* 问题cnofd 库为表格竖线创建的 SVG 容器设置了 inline style overflow:visible
导致 <path> 元素超过容器高度而溢出表格底部边框。 */
/* 解决方案:精准覆盖有 inline style 的 SVG使用 !important 强制覆盖 inline style。 */
#content svg[style="overflow:visible"] {
overflow: hidden !important;
}
.gray {
-webkit-filter: grayscale(100%);
-moz-filter: grayscale(100%);
-ms-filter: grayscale(100%);
-o-filter: grayscale(100%);
filter: grayscale(100%);
-webkit-filter: gray;
filter: gray;
}