forked from liweijie/education
249 lines
4.5 KiB
SCSS
249 lines
4.5 KiB
SCSS
@import './variables.scss';
|
||
@import './mixin.scss';
|
||
@import './transition.scss';
|
||
@import './element-ui.scss';
|
||
@import './sidebar.scss';
|
||
@import './btn.scss';
|
||
@import './education-theme.scss';
|
||
|
||
/* ================= 系统主题色(教育绿) ================= */
|
||
:root {
|
||
/* 基础绿 */
|
||
--edu-green: #0b6b55;
|
||
--edu-green-hover: #085442;
|
||
--edu-green-bg: #e8f3ef;
|
||
|
||
/* 主色:导航、按钮、主题色 */
|
||
--edu-green-primary: #0b6b55;
|
||
/* hover 加深 */
|
||
--edu-green-dark: #084c3f;
|
||
/* 浅色背景、标签底色 */
|
||
--edu-green-light: #e8f3ef;
|
||
}
|
||
|
||
body {
|
||
height: 100%;
|
||
-moz-osx-font-smoothing: grayscale;
|
||
-webkit-font-smoothing: antialiased;
|
||
text-rendering: optimizeLegibility;
|
||
font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif;
|
||
}
|
||
|
||
label {
|
||
font-weight: 700;
|
||
}
|
||
|
||
html {
|
||
height: 100%;
|
||
box-sizing: border-box;
|
||
}
|
||
|
||
#app {
|
||
height: 100%;
|
||
}
|
||
|
||
/* ================= 全局自适应加固 =================
|
||
与 src/utils/adaptive.js 的视口等比缩放配合,
|
||
兜底避免极端情况下出现页面级横向溢出与内容崩塌。 */
|
||
html,
|
||
body {
|
||
width: 100%;
|
||
}
|
||
|
||
body {
|
||
/* 禁止页面级横向滚动,防止因个别固定宽度元素把整页撑破;
|
||
表格自身的横向滚动由 el-table 内部滚动容器承担,不受影响 */
|
||
overflow-x: hidden;
|
||
}
|
||
|
||
/* 弹性布局子项允许收缩,避免 flex 容器被子项固有宽度撑破 */
|
||
#app,
|
||
.app-wrapper,
|
||
.main-container,
|
||
.lower-container {
|
||
min-width: 0;
|
||
}
|
||
|
||
/* ===== Element 浮层逆缩放(配合 adaptive.js) =====
|
||
挂到 body 的浮层(下拉/气泡/日期/对话框/消息等)基于 getBoundingClientRect 定位,
|
||
该值受 html 的 zoom 缩放影响;若浮层自身也继承同一 zoom,坐标会被“重复缩放”而错位。
|
||
这里用 adaptive.js 注入的 --adaptive-scale-inv(= 1/当前缩放倍数)把这些浮层还原为 1:1,
|
||
使其与触发元素在视觉坐标上正确对齐。缩放=1 时该变量为 1,不产生任何影响。 */
|
||
:root {
|
||
--adaptive-scale: 1;
|
||
}
|
||
|
||
.el-popper,
|
||
.el-select-dropdown,
|
||
.el-dropdown-menu,
|
||
.el-picker-panel,
|
||
.el-cascader__dropdown,
|
||
.el-message-box__wrapper,
|
||
.el-dialog__wrapper,
|
||
.el-message,
|
||
.el-notification,
|
||
.el-loading-mask,
|
||
.v-modal {
|
||
zoom: var(--adaptive-scale-inv, 1);
|
||
}
|
||
|
||
/* 通用长文本换行,避免 url/数字/英文长串将布局撑破 */
|
||
a,
|
||
.el-button,
|
||
.el-table .cell,
|
||
.el-form-item__content,
|
||
.el-form-item__label {
|
||
word-break: break-word;
|
||
}
|
||
|
||
*,
|
||
*: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: #eef1f6;
|
||
padding: 8px 24px;
|
||
margin-bottom: 20px;
|
||
border-radius: 2px;
|
||
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: #2c3e50;
|
||
-webkit-font-smoothing: antialiased;
|
||
-moz-osx-font-smoothing: grayscale;
|
||
|
||
a {
|
||
color: var(--edu-green-primary);
|
||
cursor: pointer;
|
||
|
||
&:hover {
|
||
color: var(--edu-green-dark);
|
||
}
|
||
}
|
||
}
|
||
|
||
//main-container全局样式
|
||
.app-container {
|
||
padding: 20px;
|
||
}
|
||
|
||
.components-container {
|
||
margin: 30px 50px;
|
||
position: relative;
|
||
}
|
||
|
||
.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, var(--edu-green-primary) 0%, var(--edu-green-primary) 0%, var(--edu-green-dark) 100%, var(--edu-green-dark) 100%);
|
||
|
||
.subtitle {
|
||
font-size: 20px;
|
||
color: #fff;
|
||
}
|
||
|
||
&.draft {
|
||
background: #d0d0d0;
|
||
}
|
||
|
||
&.deleted {
|
||
background: #d0d0d0;
|
||
}
|
||
}
|
||
|
||
.link-type,
|
||
.link-type:focus {
|
||
color: var(--edu-green-primary);
|
||
cursor: pointer;
|
||
|
||
&:hover {
|
||
color: var(--edu-green-dark);
|
||
}
|
||
}
|
||
|
||
.filter-container {
|
||
padding-bottom: 10px;
|
||
|
||
.filter-item {
|
||
display: inline-block;
|
||
vertical-align: middle;
|
||
margin-bottom: 10px;
|
||
}
|
||
}
|