@import './cottagecore.scss'; @import './variables.scss'; @import './mixin.scss'; @import './transition.scss'; @import './element-ui.scss'; @import './sidebar.scss'; @import './btn.scss'; body { height: 100%; -moz-osx-font-smoothing: grayscale; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; background: $cc-linen; color: $cc-ink-2; } label { font-weight: 600; } html { height: 100%; box-sizing: border-box; background: $cc-linen; } #app { height: 100%; } *, *:before, *:after { box-sizing: inherit; } .no-padding { padding: 0px !important; } .padding-content { padding: 4px 0; } a:focus, a:active { outline: none; } a, a:focus, a:hover { cursor: pointer; color: inherit; text-decoration: none; } div:focus { outline: none; } .fr { float: right; } .fl { float: left; } .pr-5 { padding-right: 5px; } .pl-5 { padding-left: 5px; } .block { display: block; } .pointer { cursor: pointer; } .inlineBlock { display: block; } .clearfix { &:after { visibility: hidden; display: block; font-size: 0; content: " "; clear: both; height: 0; } } aside { background: $cc-linen-2; padding: 8px 24px; margin-bottom: 20px; border-radius: 12px; display: block; line-height: 32px; font-size: 16px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; color: $cc-ink; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; a { color: $cc-grass-text; cursor: pointer; &:hover { color: $cc-grass-deep; } } } // 整页卡片由 layout 的 .page-card 统一提供,页面容器只负责内部留白 // 注意:这两张卡片都不能加 backdrop-filter / filter / transform, // 它们会创建层叠上下文,把 position:fixed 的 el-dialog 困在卡片里, // 而 Element UI 的 .v-modal 遮罩挂在 body 上(z-index:2000) → 弹窗被遮罩盖住(整页变黑、点一下才恢复) // Cottagecore 皮肤下也严格只用 background / border / box-shadow 三样做卡片。 // 另:整页卡片刻意「弱化」——去掉描边、底色贴近页面底、阴影收薄。 // 否则「页卡 > 区块卡 > 小卡」三层卡片套在一起,画面很碎(规范也禁止卡片嵌套)。 .app-container { padding: 24px; background: $cc-cream-hi; border: 0; border-radius: 20px; box-shadow: 0 2px 10px rgba(139, 115, 85, 0.07); min-height: 500px; } // 顶栏 + 标签页 + 内容 在同一张卡片里(与设计图一致) // 上边距尽量收,把高度让给下面的表格和分页 .page-card { position: relative; margin: 6px 10px 6px 0; padding: 10px 24px 24px; background: $cc-cream-hi; border: 0; border-radius: 20px; box-shadow: 0 2px 10px rgba(139, 115, 85, 0.07); min-height: calc(100vh - 150px); } /* 只有「固定顶栏」时顶栏才脱离文档流,卡片才需要给它让位; fixedHeader=false(本项目默认)时顶栏自己占位置,再加边距就会多出一条空白。 注意:标签页已并入顶栏,有/无标签页都只有一条 58px 的栏,不再区分 76 / 126px。 */ .fixed-header + .page-card { margin-top: 76px; } // 页面标题通用样式 .page-header { display: flex; align-items: baseline; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid $cc-line-2; } .page-title { margin: 0; font-size: 24px; font-weight: 700; color: $cc-ink; letter-spacing: 0.3px; } .page-subtitle { margin-left: 12px; font-size: 16px; font-weight: 500; color: $cc-ink-3; &::before { content: '·'; margin-right: 8px; color: $cc-ink-4; } } .page-description { margin-top: 8px; font-size: 14px; color: $cc-ink-3; line-height: 1.6; } .components-container { margin: 30px 50px; position: relative; } .pagination-container { margin-top: 30px; } .text-center { text-align: center } .sub-navbar { height: 50px; line-height: 50px; position: relative; width: 100%; text-align: right; padding-right: 20px; transition: 600ms ease position; background: linear-gradient(90deg, $cc-grass-deep 0%, $cc-grass-deep 0%, $cc-grass 100%, $cc-grass 100%); .subtitle { font-size: 20px; color: #fff; } &.draft { background: $cc-ink-4; } &.deleted { background: $cc-ink-4; } } .link-type, .link-type:focus { color: $cc-terra; cursor: pointer; &:hover { color: $cc-grass-text; } } .filter-container { padding-bottom: 10px; .filter-item { display: inline-block; vertical-align: middle; margin-bottom: 10px; } } // 皮肤层放最后,保证覆盖 Element UI 默认样式 @import './skin.scss'; // 开关(状态列)已改为自研组件 components/CapsuleSwitch(自带 scoped 样式), // 不再需要历史上那种全局 ::v-deep 覆盖 el-switch 内部结构的写法。