Files
frost-navigation/src/assets/css/global.less

200 lines
3.0 KiB
Plaintext
Raw Normal View History

// 全局样式
2021-02-06 23:36:46 +08:00
// 滚动条
::-webkit-scrollbar {
2021-06-05 11:08:28 +08:00
width: 0.5rem;
height: 0.5rem;
2021-02-06 23:36:46 +08:00
}
::-webkit-scrollbar-track {
background-color: transparent;
}
::-webkit-scrollbar-thumb {
border-radius: 1rem;
2021-06-14 00:58:13 +08:00
background-color: #DFDFDF;
2021-02-06 23:36:46 +08:00
&:hover {
2021-06-14 00:58:13 +08:00
background-color: #CCCCCC;
2021-02-06 23:36:46 +08:00
}
}
2021-06-05 11:08:28 +08:00
// 选中文本
::selection {
background-color: @colorPrimary;
color: #FFF;
}
2021-02-06 23:36:46 +08:00
// 标签
html {
2021-05-09 15:54:36 +08:00
transition: font-size calc(@transitionTime * 2);
}
2021-02-06 23:36:46 +08:00
body {
2021-06-14 00:58:13 +08:00
color: @textPrimary;
2021-02-08 00:46:15 +08:00
overflow: hidden;
2021-05-04 00:30:12 +08:00
user-select: none;
2021-02-08 00:46:15 +08:00
-webkit-tap-highlight-color: transparent;
}
// 限制长度
.limitLine(@line) {
display: -webkit-box;
-webkit-line-clamp: @line;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
}
.limit-line-1 {
2021-05-28 21:49:13 +08:00
overflow: hidden;
text-overflow: ellipsis
}
.limit-line-2 {
.limitLine(2);
2021-02-06 23:36:46 +08:00
}
2021-04-06 20:50:24 +08:00
.limit-line-3 {
.limitLine(3);
}
// 背景居中
.bgCenter() {
background-position: center;
background-repeat: no-repeat;
}
.bg-center-contain {
.bgCenter();
background-size: contain;
}
.bg-center-cover {
.bgCenter();
background-size: cover;
}
2021-02-06 23:36:46 +08:00
// 阴影
.shadow-1 {
2021-06-05 11:08:28 +08:00
box-shadow: 0 0 0.5rem rgba(0, 0, 0, 0.1);
2021-02-06 23:36:46 +08:00
}
2021-02-08 00:46:15 +08:00
.shadow-2 {
2021-06-05 11:08:28 +08:00
box-shadow: 0 0.2rem 0.5rem rgba(0, 0, 0, 0.05);
}
.shadow-3 {
2021-06-05 11:08:28 +08:00
box-shadow: 0 0.5rem 1rem -0.4rem rgba(0, 0, 0, 0.12);
2021-02-08 00:46:15 +08:00
}
// 载入中(链接列表)
2021-02-06 23:36:46 +08:00
.loading-link {
2021-06-05 11:08:28 +08:00
background-color: rgba(255, 255, 255, 0.5) !important;
2021-06-14 00:58:13 +08:00
backdrop-filter: blur(0.2rem);
2021-02-06 23:36:46 +08:00
2021-05-30 00:30:56 +08:00
.el-loading-spinner {
transform: translateY(-50%);
}
2021-02-06 23:36:46 +08:00
.el-icon-loading {
font-size: 2rem !important;
}
.el-loading-text {
2021-05-30 00:30:56 +08:00
margin: 0.5rem 0;
font-size: 1.25rem !important;
2021-02-06 23:36:46 +08:00
}
}
2021-02-08 00:46:15 +08:00
2021-05-04 00:30:12 +08:00
// Element UI
2021-05-04 22:01:58 +08:00
.el-checkbox {
font-weight: inherit;
}
2021-05-04 00:30:12 +08:00
.el-drawer.drawer-full {
.el-drawer__header {
z-index: 500;
margin: 0 !important;
padding: 1rem 1.5rem !important;
background-color: @colorPrimary;
color: #FFF;
2021-06-05 11:08:28 +08:00
.shadow-3;
2021-05-04 00:30:12 +08:00
}
.el-drawer__body {
padding: 2rem;
overflow-y: auto;
}
}
2021-06-05 11:08:28 +08:00
.el-form-item {
margin-bottom: 0.5rem;
}
2021-05-04 00:30:12 +08:00
.el-input {
input::-webkit-inner-spin-button,
input::-webkit-outer-spin-button {
-webkit-appearance: none;
}
input[type="number"] {
-moz-appearance: textfield;
}
}
2021-02-08 00:46:15 +08:00
2021-05-04 22:01:58 +08:00
.el-link {
font-size: inherit;
font-weight: inherit;
}
2021-06-01 23:05:21 +08:00
.el-menu-item {
.fa {
margin-right: 0.3125rem;
width: 1.5rem;
text-align: center;
font-size: 1.125rem;
vertical-align: middle;
}
}
2021-06-05 11:08:28 +08:00
.el-message {
width: 80%;
min-width: 16rem;
max-width: 25rem;
.shadow-2;
&.el-message--info {
background-color: #FFF;
}
}
.el-message-box {
display: block;
position: fixed;
top: 50%;
left: 50%;
width: 90%;
min-width: 16rem;
max-width: 25rem;
transform: translate(-50%, -50%);
}
2021-02-08 00:46:15 +08:00
.el-select-dropdown {
border: none !important;
}
2021-05-04 22:55:48 +08:00
.el-switch {
.el-switch__core {
width: 2.5rem !important;
}
}