@import './variable.scss'; .pi-bg-success { background-color: $pi-green; } .pi-bg-gray { background-color: $pi-light-gray; } .pi-bg-blue { background-color: $pi-blue; } .pi-bg-red { background-color: $pi-red; } .pi-gray { color: $pi-gray; } .pi-red { color: $pi-red; } .pi-blue { color: $pi-blue; } .pi-link-blue { color: $pi-blue; &:hover { text-decoration: underline; color: #0056b3; cursor: pointer; } } .pi-link-red { color: $pi-red; &:hover { text-decoration: underline; color: #af1d2a; cursor: pointer; } } .pi-flex { display: flex; } .pi-flex-wrap { @extend .pi-flex; flex-wrap: wrap; } .pi-flex-row { @extend .pi-flex; flex-direction: row; } .pi-flex-column { @extend .pi-flex; flex-direction: column; } .pi-flex-sub { flex: 1; } .pi-flex-twice { flex: 2; } .pi-flex-treble { flex: 3; } .pi-align-start { @extend .pi-flex; align-items: flex-start; } .pi-align-end { @extend .pi-flex; align-items: flex-end; } .pi-align-center { @extend .pi-flex; align-items: center; } .pi-align-stretch { @extend .pi-flex; align-items: stretch; } .pi-align-baseline { @extend .pi-flex; align-items: baseline; } .pi-self-start { @extend .pi-flex; align-self: flex-start; } .pi-self-center { @extend .pi-flex; align-self: flex-center; } .pi-self-end { @extend .pi-flex; align-self: flex-end; } .pi-self-stretch { @extend .pi-flex; align-self: stretch; } .pi-justify-start { @extend .pi-flex; justify-content: flex-start; } .pi-justify-end { @extend .pi-flex; justify-content: flex-end; } .pi-justify-center { @extend .pi-flex; justify-content: center; } .pi-justify-between { @extend .pi-flex; justify-content: space-between; } .pi-justify-around { @extend .pi-flex; justify-content: space-around; } .pi-flex-row-center { @extend .pi-flex-row; @extend .pi-justify-center; @extend .pi-align-center; } .pi-flex-column-center { @extend .pi-flex-column; @extend .pi-justify-center; @extend .pi-align-center; } .pi-width-100P { width: 100%; } .pi-height-100P { height: 100%; } /* 预设常用样式 */ @for $i from 1 through 100 { /* font-size */ .pi-fz-#{$i} { font-size: 1px * $i; } /* padding */ .pi-pd-#{$i} { padding: 1px * $i; } .pi-pd-top-#{$i} { padding-top: 1px * $i; } .pi-pd-right-#{$i} { padding-right: 1px * $i; } .pi-pd-bottom-#{$i} { padding-bottom: 1px * $i; } .pi-pd-left-#{$i} { padding-left: 1px * $i; } .pi-pd-tb-#{$i} { padding-top: 1px * $i; padding-bottom: 1px * $i; } .pi-pd-lr-#{$i} { padding-right: 1px * $i; padding-left: 1px * $i; } /* margin */ .pi-mg-#{$i} { margin: 1px * $i; } .pi-mg-top-#{$i} { margin-top: 1px * $i; } .pi-mg-right-#{$i} { margin-right: 1px * $i; } .pi-mg-bottom-#{$i} { margin-bottom: 1px * $i; } .pi-mg-left-#{$i} { margin-left: 1px * $i; } .pi-mg-tb-#{$i} { margin-top: 1px * $i; margin-bottom: 1px * $i; } .pi-mg-lr-#{$i} { margin-right: 1px * $i; margin-left: 1px * $i; } // width & height .pi-width-#{$i} { width: 1px * $i; } .pi-height-#{$i} { height: 1px * $i; } // radius .pi-radius-#{$i} { border-radius: 1px * $i; } // line-height .pi-lh-#{$i} { line-height: 1px * $i; } } .pi-text-center { text-align: center; } .pi-text-left { text-align: left; } .pi-text-right { text-align: right; } /************************* 定位 **************************/ .pi-absolute { position: absolute; } .pi-relative { position: relative; } .pi-fixed { position: fixed; } // absolute .pi-absolute-top { @extend .pi-absolute; top: 0; left: 0; z-index: 2; } .pi-absolute-center { @extend .pi-absolute; top: 50%; left: 50%; z-index: 2; transform: translate(-50%, -50%); } .pi-absolute-lt { position: absolute; top: 0; left: 0; z-index: 2; } .pi-absolute-rt { position: absolute; top: 0; right: 0; z-index: 2; } .pi-absolute-lb { position: absolute; bottom: 0; left: 0; z-index: 2; } .pi-absolute-rb { position: absolute; right: 0; bottom: 0; z-index: 2; } // 公共头部 .pi-header { @extend .pi-width-100P; @extend .pi-relative; text-align: center; background: linear-gradient(#ccc, 2%, #ffffff); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05); border-bottom: 1px solid #ddd; .pi-header-left { @extend .pi-absolute-lt; left: 100px; } .pi-header-left.no-title { left: 20px; } .pi-header-center { @extend .pi-absolute-center; } .pi-header-right { @extend .pi-absolute-rt; right: 20px; } } .wrap-contaniner { display: flex; flex-direction: column; width: calc(100vw - 55px - 120px); .wrap-content { height: calc(100vh - 34px); } } // .content-wrap.hide { // width: calc(100vw - 55px); // } // 按钮 .pi-btn-secondary { color: #fff; background-color: #6c757d; border-color: #6c757d; } .pi-circle-gray { position: relative; padding-left: 14px; &::before { content: ''; position: absolute; top: 50%; transform: translateY(-50%); left: 0; width: 12px; height: 12px; background-color: #6c757d; border-radius: 50%; } } .pi-circle-yellow { position: relative; padding-left: 14px; &::before { content: ''; position: absolute; top: 0; top: 50%; transform: translateY(-50%); left: 0; width: 12px; height: 12px; background-color: $pi-yellow; border-radius: 50%; } } .pi-circle-green { position: relative; padding-left: 14px; &::before { content: ''; position: absolute; top: 0; left: 0; top: 50%; transform: translateY(-50%); width: 12px; height: 12px; background-color: $pi-green; border-radius: 50%; } } .pi-pointer { cursor: pointer; } .m-3 { margin: 1rem; } .mt-3, .my-3 { margin-top: 1rem; } .pi-table { width: 100%; margin-bottom: 1rem; color: #212529; & > thead th { vertical-align: bottom; border-bottom: 2px solid #dee2e6; } & > tbody td, & > thead td, & > tbody th, & > thead th { padding: 0.3rem; vertical-align: top; } & > tbody th, & > thead th { background: #e9ecef; font-weight: normal; color: #000; } } .pi-bordered { border: 1px solid #dee2e6; & > tbody td, & > thead td, & > tbody th, & > thead th { border: 1px solid #dee2e6; } & > thead th { border-bottom-width: 2px; } }