UNPKG

tntd

Version:

tntd是基于 TNT Design 设计体系的 React UI 组件库,主要用于研发企业级中后台产品。

235 lines (231 loc) 4.04 kB
.tntd-title { & { position: relative; display: flex; align-items: center; justify-content: space-between; .tntd-title-text { height: 100%; } } &.has-number { .tntd-title-text { h3 { margin-left: 0; } &::before { display: none; } } &.is-simple { .count::before { display: none; } } &.small { .count { font-size: 20px; margin-right: 12px; &::before { width: 20px; height: 15px; top: 44%; left: 60%; } } } &.middle { .count { font-size: 24px; margin-right: 12px; &::before { width: 24px; height: 15px; left: 56%; } } } &.large { .count { font-size: 28px; margin-right: 12px; &::before { width: 28px; height: 18px; left: 56%; } } } .count { position: relative; top: -1px; color: @primary-color; font-size: 22px; font-style: normal; margin-right: 12px; position: relative; vertical-align: top; font-weight: 400; font-family: 'OswaldLight', Roboto, 'Helvetica Neue', Helvetica, Tahoma, Arial, 'PingFang SC', 'Microsoft YaHei' !important; letter-spacing: 1px; } .count::before { position: absolute; display: block; content: ''; width: 22px; height: 15px; border-top: 1px solid @primary-color; background-color: #fff; top: 45%; left: 58%; transform: rotate(-45deg); } } &.is-bold { .tntd-title-text { h3 { font-weight: bold; } } } &.large, &.h1 { & { height: 40px; line-height: 40px; } .tntd-title-text { h3 { font-size: 20px; } &::before { height: 16px; } .sub-title { font-size: 16px; } } } &.middle, &.h2 { & { height: 36px; line-height: 36px; } .tntd-title-text { h3 { font-size: 18px; } &::before { height: 14px; } } } &.h3, &.h4, &.h5, &.small { & { height: 22px; line-height: 22px; .tntd-title-text { h3 { font-size: 14px; } .sub-title { font-size: 14px; } } } } // 默认h3 和 small &.h3, &.small { .tntd-title-text { &::before { height: 12px; } h3 { font-weight: bold; } } } &.h4 { .tntd-title-text { &::before { display: none; } h3 { font-weight: bold; margin-left: 0; } } } &.h5 { .tntd-title-text { &::before { display: none; } h3 { margin-left: 0; font-weight: normal; } } } .tntd-title-text { & { position: relative; display: flex; align-items: center; flex: 1; min-width: 0; } h3 { font-size: 16px; color: @text-color; font-weight: normal; margin: 0; margin-left: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; &.has-sub-title { max-width: 70%; } } .sub-title { position: relative; font-size: 14px; color: #8b919e; max-width: 30%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-left: 8px; } .sub-tip { margin-left: 4px; font-size: 16px; color: @text-color; } &::before { position: absolute; left: 0; background-color: @primary-color; content: ''; width: 4px; height: 12px; margin-right: 4px; border-radius: 2px; } } .tntd-title-extra { & { position: relative; margin-left: 16px; color: @primary-color; } } }