153 lines
2.6 KiB
SCSS
Raw Normal View History

@use '@/styles/mixins.scss' as *;
/**
* 3D态势感知公共样式
*/
// 公共颜色变量
:root {
--primary-color: rgba(28, 161, 255, 1);
--primary-light: rgba(28, 161, 255, 0.44);
--primary-lighter: rgba(28, 161, 255, 0.2);
--bg-dark: rgba(9, 22, 40, 1);
--bg-panel: rgba(20, 53, 118, 1);
--text-white: rgba(255, 255, 255, 1);
--text-gray: rgba(179, 204, 226, 1);
--success-color: rgba(17, 187, 119, 1);
--warning-color: rgba(255, 128, 11, 1);
--danger-color: rgba(255, 6, 36, 1);
--border-color: rgba(28, 161, 255, 0.3);
}
// 公共面板样式
.panel {
display: flex;
flex-direction: column;
background-size: 100% 100%;
background-repeat: no-repeat;
&--scrollable {
overflow-y: auto;
overscroll-behavior: contain;
scrollbar-width: thin;
scrollbar-color: var(--primary-light) transparent;
&::-webkit-scrollbar {
width: vw(4);
}
&::-webkit-scrollbar-track {
background: transparent;
}
&::-webkit-scrollbar-thumb {
background: var(--primary-light);
border-radius: vw(2);
&:hover {
background: rgba(28, 161, 255, 0.6);
}
}
}
}
// 公共文字样式
.text {
&--title {
color: var(--text-white);
font-family: SourceHanSansCN-Bold, sans-serif;
font-weight: 700;
}
&--subtitle {
color: var(--text-gray);
font-family: SourceHanSansCN-Medium, sans-serif;
font-weight: 500;
}
&--label {
color: var(--text-white);
font-family: SourceHanSansCN-Medium, sans-serif;
font-weight: 500;
}
&--value {
color: var(--text-white);
font-family: PingFangSC-Semibold, sans-serif;
font-weight: 600;
}
&--success {
color: var(--success-color);
}
&--warning {
color: var(--warning-color);
}
&--danger {
color: var(--danger-color);
}
}
// 公共按钮样式
.button {
border: none;
cursor: pointer;
transition: opacity 0.3s, transform 0.2s;
font-family: SourceHanSansCN-Medium, sans-serif;
&:hover {
opacity: 0.8;
}
&:active {
transform: scale(0.98);
}
&--primary {
background: var(--primary-color);
color: var(--text-white);
}
&--secondary {
background: var(--bg-panel);
color: var(--text-white);
border: 1px solid var(--border-color);
}
}
// Flexbox 工具类
.flex {
display: flex;
&-row {
flex-direction: row;
}
&-col {
flex-direction: column;
}
&-center {
align-items: center;
justify-content: center;
}
&-between {
justify-content: space-between;
}
&-around {
justify-content: space-around;
}
&-end {
justify-content: flex-end;
}
}