rsuite
Version:
A suite of react components
254 lines (248 loc) • 7.79 kB
CSS
*[class*=rs-],*[class*=rs-]::before, *[class*=rs-]::after{
box-sizing:border-box;
}
html{
-webkit-tap-highlight-color:transparent;
font-size:16px;
}
body{
font-family:var(--rs-font-family-base);
font-size:var(--rs-font-size-sm);
line-height:var(--rs-line-height-md);
color:var(--rs-text-primary);
background-color:var(--rs-body);
}
:root{
--rs-gray-0:#fff;
--rs-gray-50:#f7f7fa;
--rs-gray-300:#d9d9d9;
--rs-gray-500:#939393;
--rs-gray-800:#343434;
--rs-gray-900:#121212;
--rs-primary-500:#3498ff;
--rs-body:var(--rs-gray-0);
--rs-text-primary:var(--rs-gray-800);
--rs-timeline-indicator-bg:var(--rs-gray-300);
--rs-timeline-indicator-active-bg:var(--rs-primary-500);
}
[data-theme=dark],
.rs-theme-dark{
--rs-gray-0:#fff;
--rs-gray-50:#e9ebf0;
--rs-gray-300:#858b94;
--rs-gray-500:#5c6066;
--rs-gray-800:#1a1d24;
--rs-gray-900:#0f131a;
--rs-primary-500:#34c3ff;
--rs-body:var(--rs-gray-900);
--rs-text-primary:var(--rs-gray-50);
--rs-timeline-indicator-bg:var(--rs-gray-500);
--rs-timeline-indicator-active-bg:var(--rs-primary-500);
}
[data-theme=high-contrast],
.rs-theme-high-contrast{
--rs-gray-0:#fff;
--rs-gray-50:#e9ebf0;
--rs-gray-300:#858b94;
--rs-gray-500:#5c6066;
--rs-gray-800:#1a1d24;
--rs-gray-900:#0f131a;
--rs-primary-500:#ffff00;
--rs-body:var(--rs-gray-900);
--rs-text-primary:var(--rs-gray-50);
--rs-timeline-indicator-bg:var(--rs-gray-500);
--rs-timeline-indicator-active-bg:var(--rs-primary-500);
}
:root{
--rs-font-family-base:-apple-system, BlinkMacSystemFont, Arial, Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", STXihei, sans-serif;
--rs-font-size-sm:0.875rem;
--rs-line-height-md:calc(20 / 14);
--rs-radius-full:62.5rem;
}
@media (max-width: calc(576px - 1px)){
[data-visible-from=xs]{
display:none ;
}
}
@media (min-width: 576px){
[data-hidden-from=xs]{
display:none ;
}
}
@media (max-width: calc(768px - 1px)){
[data-visible-from=sm]{
display:none ;
}
}
@media (min-width: 768px){
[data-hidden-from=sm]{
display:none ;
}
}
@media (max-width: calc(992px - 1px)){
[data-visible-from=md]{
display:none ;
}
}
@media (min-width: 992px){
[data-hidden-from=md]{
display:none ;
}
}
@media (max-width: calc(1200px - 1px)){
[data-visible-from=lg]{
display:none ;
}
}
@media (min-width: 1200px){
[data-hidden-from=lg]{
display:none ;
}
}
@media (max-width: calc(1400px - 1px)){
[data-visible-from=xl]{
display:none ;
}
}
@media (min-width: 1400px){
[data-hidden-from=xl]{
display:none ;
}
}
.rs-timeline{
--rs-time-line-tail-min-height:2.375rem;
--rs-time-line-item-content-margin:12px;
--rs-time-line-dot-side-length:10px;
--rs-time-line-alternate-time-offset:calc(
var(--rs-time-line-dot-side-length) / 2 + var(--rs-time-line-item-content-margin)
);
--rs-time-line-dot-center-gap:calc(var(--rs-time-line-dot-side-length) / 2);
--rs-time-line-item-content-padding-bottom:18px;
--rs-time-line-tail-width:2px;
--rs-time-line-item-padding:calc(
var(--rs-time-line-item-content-margin) + var(--rs-time-line-dot-side-length)
);
list-style:none;
padding:0;
margin-bottom:0;
direction:ltr;
}
.rs-timeline-item{
position:relative;
text-align:start;
}
.rs-timeline-item:not(:last-child) .rs-timeline-item-content{
padding-bottom:var(--rs-time-line-item-content-padding-bottom);
}
.rs-timeline-item-dot{
position:absolute;
top:var(--rs-time-line-dot-center-gap);
}
.rs-timeline-item-dot::before{
content:"";
display:block;
width:var(--rs-time-line-dot-side-length);
height:var(--rs-time-line-dot-side-length);
background-color:var(--rs-timeline-indicator-bg);
border-radius:var(--rs-radius-full);
}
.rs-timeline-item-custom-dot{
text-align:center;
}
.rs-timeline-item-custom-dot::before{
display:none;
}
.rs-timeline-item-active .rs-timeline-item-dot::before{
background-color:var(--rs-timeline-indicator-active-bg);
}
.rs-timeline-item-tail{
position:absolute;
top:0;
bottom:0;
width:var(--rs-time-line-tail-width);
background-color:var(--rs-timeline-indicator-bg);
}
.rs-timeline-item:first-child .rs-timeline-item-tail{
top:var(--rs-time-line-dot-center-gap);
}
.rs-timeline-item:last-child .rs-timeline-item-tail{
bottom:auto;
height:calc(var(--rs-time-line-dot-center-gap) + var(--rs-time-line-dot-side-length));
}
.rs-timeline-endless .rs-timeline-item:last-child .rs-timeline-item-tail{
height:auto;
min-height:var(--rs-time-line-tail-min-height);
}
.rs-timeline-item:only-child .rs-timeline-item-tail{
display:none;
}
.rs-timeline-align-left .rs-timeline-item-dot{
left:0;
}
.rs-timeline-align-left .rs-timeline-item-tail{
left:calc(var(--rs-time-line-dot-side-length) / 2 - var(--rs-time-line-tail-width) / 2);
}
.rs-timeline-align-left .rs-timeline-item{
padding-left:var(--rs-time-line-item-content-margin-left);
padding-inline-start:var(--rs-time-line-item-padding);
}
.rs-timeline-align-right .rs-timeline-item-dot{
right:0;
}
.rs-timeline-align-right .rs-timeline-item-tail{
right:calc(var(--rs-time-line-dot-side-length) / 2 - var(--rs-time-line-tail-width) / 2);
}
.rs-timeline-align-right .rs-timeline-item{
padding-right:var(--rs-time-line-item-content-margin-left);
padding-inline-end:var(--rs-time-line-item-padding);
}
.rs-timeline-align-right .rs-timeline-item-content{
text-align:end;
}
.rs-timeline-align-alternate .rs-timeline-item-dot{
inset-inline-start:calc(50% - var(--rs-time-line-dot-side-length) / 2);
}
.rs-timeline-align-alternate .rs-timeline-item-tail{
inset-inline-start:calc(50% - var(--rs-time-line-tail-width) / 2);
}
.rs-timeline-align-alternate .rs-timeline-item-content{
width:50%;
}
.rs-timeline-align-alternate .rs-timeline-item:nth-child(even) .rs-timeline-item-content,.rs-timeline-align-alternate .rs-timeline-item:nth-child(odd){
text-align:end;
}
.rs-timeline-align-alternate .rs-timeline-item:nth-child(odd) .rs-timeline-item-content{
display:inline-block;
text-align:start;
}
.rs-timeline-with-time .rs-timeline-item{
display:flex;
padding-inline-start:0;
}
.rs-timeline-with-time .rs-timeline-item-dot{
inset-inline-start:calc(50% - var(--rs-time-line-dot-side-length) / 2);
}
.rs-timeline-with-time .rs-timeline-item-tail{
inset-inline-start:calc(50% - var(--rs-time-line-tail-width) / 2);
}
.rs-timeline-with-time .rs-timeline-item-time, .rs-timeline-with-time .rs-timeline-item-content{
flex:1 0 50%;
}
.rs-timeline-align-alternate .rs-timeline-item:nth-child(2n), .rs-timeline-with-time.rs-timeline-align-right .rs-timeline-item{
flex-direction:row-reverse;
}
.rs-timeline-with-time.rs-timeline-align-right .rs-timeline-item{
padding-inline-end:0;
}
.rs-timeline-with-time.rs-timeline-align-left .rs-timeline-item-time{
text-align:end;
}
.rs-timeline-with-time.rs-timeline-align-right .rs-timeline-item-time{
text-align:start;
}
.rs-timeline-with-time.rs-timeline-align-left .rs-timeline-item-time, .rs-timeline-with-time.rs-timeline-align-right .rs-timeline-item-content, .rs-timeline-align-alternate .rs-timeline-item:nth-child(2n+1) .rs-timeline-item-time, .rs-timeline-align-alternate .rs-timeline-item:nth-child(2n) .rs-timeline-item-content{
padding-inline-end:var(--rs-time-line-alternate-time-offset);
}
.rs-timeline-with-time.rs-timeline-align-left .rs-timeline-item-content, .rs-timeline-with-time.rs-timeline-align-right .rs-timeline-item-time, .rs-timeline-align-alternate .rs-timeline-item:nth-child(2n+1) .rs-timeline-item-content, .rs-timeline-align-alternate .rs-timeline-item:nth-child(2n) .rs-timeline-item-time{
padding-inline-start:var(--rs-time-line-alternate-time-offset);
}