| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639 |
- @import 'variables';
- .section {
- position: relative;
- padding-left: $p-spacd2;
- margin: $p-spac 0;
- &.s-fz,
- &.ss-fz {
- padding-left: calc($p-spac / 1.5);
- margin-top: calc($p-spac / 1.5);
- margin-bottom: calc($p-spac / 1.5);
- }
- // &.b-fz {
- // padding-left: $p-spac;
- // }
- &::before {
- position: absolute;
- top: 0;
- bottom: 0;
- left: 0;
- display: block;
- width: 4px;
- margin: auto;
- content: '';
- background-color: $p-color;
- border-radius: 2px;
- }
- }
- %center {
- display: flex;
- align-items: center;
- justify-content: center;
- }
- %chunk-base {
- position: relative;
- box-sizing: border-box;
- padding: $p-spac;
- margin-bottom: $p-spac;
- overflow: hidden;
- &.m0 {
- margin: 0;
- }
- }
- .chunk {
- @extend %chunk-base;
- @extend %box-shadow;
- border: 1px solid $border-color;
- border-radius: $p-spacd2;
- line-height: normal;
- // &:last-child {
- // margin-bottom: 0;
- // }
- &.checked {
- border-color: $p-color;
- }
- &.checked-full {
- color: $p-color;
- background-color: rgba($p-color, .2);
- border-color: $p-color;
- }
- }
- // 第一层子元素 左对齐
- %childs-fc-mbd2 {
- font-size: $s-fz;
- >div,
- >view {
- @apply flex;
- justify-content: start;
- >div:first-child,
- >view:first-child,
- >span:first-child,
- >label:first-child {
- // margin-right: $p-spac;
- // white-space: nowrap;
- }
- // >div:nth-child(2),
- // >view:nth-child(2),
- // >span:nth-child(2),
- // >label:nth-child(2) {
- // flex: 1;
- // }
- }
- >div,
- >view,
- >span,
- >label {
- margin-bottom: $p-spacd2;
- &:last-child {
- margin-bottom: 0;
- }
- }
- >span,
- >label {
- display: inline-block;
- }
- }
- .childs-fc-mbd2 {
- @extend %childs-fc-mbd2
- }
- // 第一层子元素 两端对齐
- .childs-fcjb-mbd2 {
- @extend .childs-fc-mbd2;
- >div,
- >view {
- @extend %center;
- @extend .justify-between;
- // align-items: start;
- flex-wrap: wrap;
- }
- }
- .chunk1 {
- @extend %chunk-base;
- @extend %childs-fc-mbd2;
- border-bottom: solid $border-color 1px;
- }
- .chunk2 {
- @extend %chunk-base;
- @extend .childs-fcjb-mbd2;
- padding-top: 0;
- border-bottom: solid $border-color 1px;
- >div,
- >view {
- >div:nth-child(2) {
- flex: 1;
- text-align: right;
- margin-left: $p-spac;
- }
- }
- }
- .chunk3 {
- @extend %chunk-base;
- padding-top: 0;
- display: flex;
- align-items: center;
- border-bottom: solid $border-color 1px;
- }
- .chunk4 {
- @extend %chunk-base;
- margin-bottom: 0;
- >div {
- margin-top: $p-spacd2;
- }
- }
- .chunk,
- .chunk1,
- .chunk2 {
- >div,
- >view {
- >span:first-child,
- >label:first-child {
- color: $gray-color;
- }
- }
- }
- // 间距对象
- $spac-map: (
- 0: (0: 't',
- 1: 'top',
- ),
- 1: (0: 'b',
- 1: 'bottom',
- ),
- 2: (0: 'l',
- 1: 'left',
- ),
- 3: (0: 'r',
- 1: 'right',
- ),
- );
- // 循环 $p-spac $j
- @for $j from 1 to 5 {
- // 除以 $j
- $suffix: if($j ==1, '', 'd' + $j);
- // 乘以 $j
- $suffixm: if($j ==1, '', 'm' + $j);
- // margin $p-spac除数
- #{$container}.m-spac#{$suffix} {
- margin: ($p-spac / $j);
- }
- // margin $p-spac倍数
- #{$container}.m-spac#{$suffixm} {
- margin: $p-spac * $j;
- }
- // margin $p-spac除数 负值
- #{$container}.nm-spac#{$suffix} {
- margin: ($p-spac / -$j);
- }
- // padding $p-spac除数
- #{$container}.p-spac#{$suffix} {
- padding: ($p-spac / $j);
- }
- // padding $p-spac倍数
- #{$container}.p-spac#{$suffixm} {
- padding: $p-spac * $j;
- }
- }
- // 循环 $p-spac $j
- @for $j from 1 to 5 {
- // 除以 $j
- $suffix: if($j ==1, '', 'd' + $j);
- // 乘以 $j
- $suffixm: if($j ==1, '', 'm' + $j);
- //循环$spac-map
- @for $i from 0 to 4 {
- $t: map-get($spac-map, $i);
- // 4方向 $p-spac除数
- #{$container}.#{map-get($t,0)}-spac#{ $suffix} {
- #{map-get($t,1)}: ($p-spac / $j);
- }
- // margin 4方向 $p-spac倍数
- #{$container}.m#{map-get($t,0)}-spac#{ $suffixm} {
- margin-#{map-get($t,1)}: $p-spac * $j;
- }
- // margin 4方向 $p-spac除数
- @if($j>1) {
- #{$container}.m#{map-get($t,0)}-spac#{ $suffix} {
- margin-#{map-get($t,1)}: ($p-spac / $j);
- }
- }
- // margin 4方向 $p-spac除数 负值
- #{$container}.nm#{map-get($t,0)}-spac#{ $suffix} {
- margin-#{map-get($t,1)}: ($p-spac / -$j);
- }
- // padding 4方向 $p-spac倍数
- #{$container}.p#{map-get($t,0)}-spac#{ $suffixm} {
- padding-#{map-get($t,1)}: $p-spac * $j;
- }
- // padding 4方向 $p-spac除数
- #{$container}.p#{map-get($t,0)}-spac#{ $suffix} {
- padding-#{map-get($t,1)}: ($p-spac / $j);
- }
- }
- }
- // 单行省略,优先使用 unocss: text-ellipsis
- .ellipsis {
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- // 两行省略
- .ellipsis-2 {
- display: -webkit-box;
- overflow: hidden;
- text-overflow: ellipsis;
- -webkit-line-clamp: 2;
- -webkit-box-orient: vertical;
- }
- // 三行省略
- .ellipsis-3 {
- display: -webkit-box;
- overflow: hidden;
- text-overflow: ellipsis;
- -webkit-line-clamp: 3;
- -webkit-box-orient: vertical;
- }
- body {
- .order-pull-refresh .van-list__finished-text {
- margin-top: 5px;
- background-color: transparent;
- }
- .fixed-bottom {
- position: fixed;
- bottom: 0;
- left: 0;
- z-index: 10;
- box-sizing: border-box;
- width: 100%;
- padding: $p-spac;
- background-color: $bg-color;
- }
- .btns {
- display: flex;
- position: fixed;
- bottom: 0;
- left: 0;
- z-index: 10;
- box-sizing: border-box;
- width: 100%;
- padding: $p-spac;
- background-color: $bg-color;
- button {
- margin-right: $p-spac;
- // background-color: $bg-color;
- &:last-child {
- margin-right: 0;
- }
- }
- // 指定type的按钮
- button[type="submit"] {
- flex: 1;
- }
- }
- .bbb {
- border-bottom: solid $b-color 1px;
- }
- .bbt {
- border-top: solid $b-color 1px;
- }
- .pcbb {
- border-bottom: solid $p-color 1px;
- }
- .defb {
- border: solid $border-color 1px;
- }
- .defbb {
- border-bottom: solid $border-color 1px;
- }
- .defbt {
- border-top: solid $border-color 1px;
- }
- .defbrd4 {
- border-radius: $p-spacd4;
- }
- .relative {
- position: relative;
- }
- .absolute {
- position: absolute;
- }
- .flex {
- display: flex;
- }
- .flex-column {
- display: flex;
- flex-direction: column;
- }
- .flex1 {
- flex: 1;
- }
- .flex-start {
- justify-content: start;
- }
- .flex-items-start {
- align-items: start;
- }
- .flex-baseline {
- align-items: baseline;
- }
- .center {
- @extend %center
- }
- .justify-between {
- justify-content: space-between;
- }
- .vh100 {
- height: 100vh;
- }
- .min-vh100 {
- min-height: 100vh;
- }
- .w0 {
- width: 0;
- }
- .w100 {
- width: 100%;
- }
- .w30 {
- width: 30%;
- }
- .m-t-0 {
- margin-top: 0;
- }
- .m-b-0 {
- margin-bottom: 0;
- }
- .p-t-0 {
- padding-top: 0;
- }
- .p-lr-0 {
- padding-left: 0;
- padding-right: 0;
- }
- .p-b-0 {
- padding-bottom: 0;
- }
- .font-bold {
- font-weight: bold;
- }
- .text-center {
- text-align: center;
- }
- .text-left {
- text-align: left;
- }
- .text-right {
- text-align: right;
- }
- .inline-block {
- display: inline-block;
- }
- .inline {
- display: inline;
- }
- .gradient {
- opacity: 1;
- // transition: opacity 0.5s ease;
- transition-duration: 0.5s;
- }
- .hide {
- display: none;
- &.gradient {
- display: none;
- opacity: 0;
- // visibility: hidden;
- // transform: rotateX(90deg);
- height: 0;
- padding: 0;
- }
- }
- .s-fz {
- font-size: $s-fz;
- }
- .ss-fz {
- font-size: $ss-fz;
- }
- .p-fz {
- font-size: $p-fz;
- }
- .bs-fz {
- font-size: $bs-fz;
- }
- .b-fz {
- font-size: $b-fz;
- }
- .lh16 {
- line-height: 16px;
- }
- .p-color {
- color: $p-color;
- }
- .p-wcolor {
- color: $p-wcolor;
- }
- .p-dcolor {
- color: $p-dcolor;
- }
- .price-color {
- color: $p-price-color;
- }
- .gray-color {
- color: $gray-color;
- }
- .money-bg {
- background-color: rgba($p-price-color, 0.1);
- }
- .bg-color {
- background-color: $bg-color;
- }
- .border-box {
- box-sizing: border-box;
- }
- .green-color {
- color: $green-color;
- }
- .nowrap {
- white-space: nowrap;
- }
- .flex-nowrap {
- flex-wrap: nowrap;
- }
- .flex-wrap {
- flex-wrap: wrap;
- }
- .space-around {
- justify-content: space-around;
- }
- .com-btn-add {
- width: 40px;
- height: 40px;
- line-height: 40px;
- text-align: center;
- position: fixed;
- right: 10px;
- background: rgba(25, 137, 250, .8);
- border-radius: 50%;
- color: #fff;
- font-size: 30px;
- bottom: 20px;
- z-index: 1;
- }
- .checked {
- color: $p-color;
- border-color: rgba($p-color, 0.4);
- background-color: rgba($p-color, 0.1);
- }
- .sticky {
- top: 0;
- position: sticky;
- z-index: 1;
- background: $bg-color;
- }
- .pre-line {
- white-space: pre-line;
- }
- .required::before {
- content: '*';
- color: #F56C6C;
- margin-right: 4px;
- }
- .hide-child {
- * {
- display: none;
- }
- }
- .pointer {
- cursor: pointer;
- }
- }
- .container {
- background-color: $bg-color;
- padding: $p-spac;
- min-height: 100vh;
- box-sizing: border-box;
- text-align: left;
- }
|