UNPKG

unique-interface

Version:

无UI组件库

322 lines (314 loc) 7.32 kB
@import "layout.less"; @import "page_loading.less"; @import (reference) "function.less"; ::-webkit-scrollbar {width: 10px;height: 6px;} ::-webkit-scrollbar-track {background-color: @color-border-regular;} ::-webkit-scrollbar-thumb {background-color: fade(@color-base, 20%); border-radius: 8px} /* Icon -------------------------- */ .uicon { font-size: 1em; } .notice-icon { background-size: contain; width: 48px; height: 48px; display: inline-block; } .notice-icon-failed { background-image: url('/assets/img/notice-failed.png'); } .notice-icon-success { background-image: url('/assets/img/notice-success.png'); } .notice-icon-warning { background-image: url('/assets/img/notice-warning.png'); } .uicon-sort { color: @color-green; cursor: pointer; } // 警告叹号 .icon-warning::before { content: "!"; display: inline-block; width: 1em; height: 1em; line-height: 1; text-align: center; border-radius: 50%; background-color: @color-warn; color: #fff; font-weight: bold; } .uicon.left.space { margin-right: @uicon-space } .uicon.right.space { margin-left: @uicon-space } // new .label-new { position: relative; &::after { content: 'new'; display: block; position: absolute; right: 6px; top: 2px; transform: translate(100%, -100%); font-size: @font-size-xs; padding: 0 3px; line-height: 1; color:@color-white; background-color: @color-new; border-radius: 100px; } } /* Modal -------------------------- */ .ui-modal-close { color: #ddd; font-family: "uicon"; font-style: normal; &::before { content: "\E619"; } } /* Table -------------------------- */ .table { width: 100%; th, td { padding: @tableInV - 5px @tableInH; vertical-align: middle; word-break: break-all; line-height: @font-line-height-base; &:first-child { padding-left: @tableSizeInH; } &:last-child { padding-right: @tableSizeInH; } } th { color: @color-text-primary; background-color: @color-bg-table-th; } td { background-color: @color-bg; } tr + tr { border-top: @border-base; } // 表格第一列 .table-text-title { color: @color-text-primary; } // 强调和弱化文字 .table-text-emphasis { color: @color-text-primary; font-size: @font-size-lger; font-weight: bold; } .table-text-weak { color: fade(@color-text-primary, 40%); font-size: @font-size-xs; } // 操作按钮一行展示 .table-text-h + .table-text-h { margin-left: 16px; } } .table-with-border { border: @border-base; } /* empty -------------------------- */ // 普通列表 .empty-list { padding: 235px 0 100px; line-height: 24px; background-repeat: no-repeat; background-position: center 100px; background-size: 120px 120px; color: @color-text-secondary; text-align: center; background-image: url('/assets/img/empty-item.png'); &::before { content: "内容为空"; } } // 搜索列表 .empty-list-search { background-image: url('/assets/img/empty-result.png'); &::before { content: "结果为空"; } } /* Text -------------------------- */ // 标题 .form-title { margin-bottom: 32px; font-size: @font-size-lger; font-weight: bold; color: @color-text-primary; } .h3 { display: flex; align-items: center; padding-left: 16px; margin-bottom: 32px; color: @color-text-primary; font-size: @font-size-lg; font-weight: bold; border-left: 4px solid @color-primary; .h3-tip { flex: 1; text-align: right; font-size: @font-size-base; font-weight: normal; color: @color-text-regular; } } .h4 { margin-bottom: 24px; font-size: @font-size-base; color: @color-text-primary; } // 隐式链接 .ui-link-implict { &:hover { color: @color-primary; cursor: pointer; } } // 提醒tips .text-tips { color: @color-text-secondary; .text-tips-title { margin-bottom: 16px; } .text-tips-content { .paragraph-xs; &.have-dot { .ui-ul; .ui-ul-xs; } } } // 段落 .paragraph-base { font-size: @font-size-base; line-height: @font-line-height-base; margin: -(@font-line-height-base - @font-size-base) / 2 0; } .paragraph-sm { font-size: @font-size-sm; line-height: @font-line-height-sm; margin: -(@font-line-height-sm - @font-size-sm) / 2 0; } .paragraph-xs { font-size: @font-size-xs; line-height: @font-line-height-xs; margin: -(@font-line-height-xs - @font-size-xs) / 2 0; } .paragraph-lg { font-size: @font-size-lg; line-height: @font-line-height-lg; margin: -(@font-line-height-lg - @font-size-lg) / 2 0; } // 无序列表 .ui-ul { > li { position: relative; padding-left: calc(1em - 2px); &::before { content: ''; position: absolute; width: calc(1em - 10px); height: calc(1em - 10px); border-radius: 50%; background-color: fade(#222, 40%); left: 0; transform: translateY(-50%); } } } .ui-ul-base { .paragraph-base; > li { &::before { top: @font-line-height-base / 2; } } } .ui-ul-xs { .paragraph-xs; > li { &::before { top: @font-line-height-xs / 2; } } } // 搜索飘红 .text-search-result { em { color: @color-text-hit; } } .v-text-item { .paragraph-base; & + & { margin: 32px - (@font-line-height-base - @font-size-base) / 2 0 -(@font-line-height-base - @font-size-base) / 2; } .text-item-title { font-weight: bold; color: @color-text-primary; } .text-item-content { font-size: @font-size-xs; line-height: @font-line-height-xs; } .text-item-address { .overflow-ellipsis(1); } } /* 竖直方向时间线 ------------------------ */ .v-timeline { line-height: @font-line-height-base; padding-left: @block-inner-vertical; padding-bottom: 32px - (@font-line-height-base - @font-size-base); position: relative; &::before { content: ''; display: inline-block; position: absolute; left: 0; top: @font-line-height-base / 2; transform: translateY(-50%); width: 5px; height: 5px; border-radius: 50%; background-color: @color-border-regular; } &::after { content: ''; display: block; position: absolute; box-sizing: border-box; width: 1px; height: calc(100% - 8px); left: 2px; top: calc(50% + @font-line-height-base / 2); transform: translateY(-50%); background-color: @color-border-regular; } &:last-child { padding-bottom: 0; &::after { display: none; } } } .v-timeline-done { &::before { background-color: fade(@color-text-primary, 80%); } }