rsuite
Version:
A suite of react components
293 lines (287 loc) • 7.48 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-100:#f2f2f5;
--rs-gray-200:#e5e5ea;
--rs-gray-500:#939393;
--rs-gray-600:#717273;
--rs-gray-800:#343434;
--rs-gray-900:#121212;
--rs-body:var(--rs-gray-0);
--rs-text-primary:var(--rs-gray-800);
--rs-bg-card:var(--rs-gray-0);
--rs-placeholder:var(--rs-gray-100);
--rs-placeholder-active:var(--rs-gray-200);
}
[data-theme=dark],
.rs-theme-dark{
--rs-gray-0:#fff;
--rs-gray-50:#e9ebf0;
--rs-gray-100:#cbced4;
--rs-gray-200:#a4a9b3;
--rs-gray-500:#5c6066;
--rs-gray-600:#3c3f43;
--rs-gray-800:#1a1d24;
--rs-gray-900:#0f131a;
--rs-body:var(--rs-gray-900);
--rs-text-primary:var(--rs-gray-50);
--rs-bg-card:var(--rs-gray-800);
--rs-placeholder:var(--rs-gray-600);
--rs-placeholder-active:var(--rs-gray-500);
}
@supports not (color: rgb(from white r g b)){
[data-theme=dark],
.rs-theme-dark{
--rs-placeholder-active:rgb(69.75, 72.6, 76.4);
}
}
[data-theme=high-contrast],
.rs-theme-high-contrast{
--rs-gray-0:#fff;
--rs-gray-50:#e9ebf0;
--rs-gray-100:#cbced4;
--rs-gray-200:#a4a9b3;
--rs-gray-500:#5c6066;
--rs-gray-600:#3c3f43;
--rs-gray-800:#1a1d24;
--rs-gray-900:#0f131a;
--rs-body:var(--rs-gray-900);
--rs-text-primary:var(--rs-gray-50);
--rs-bg-card:var(--rs-gray-800);
--rs-placeholder:var(--rs-gray-600);
--rs-placeholder-active:var(--rs-gray-500);
}
@supports not (color: rgb(from white r g b)){
[data-theme=high-contrast],
.rs-theme-high-contrast{
--rs-placeholder-active:rgb(69.75, 72.6, 76.4);
}
}
: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-spacing:0.25rem;
--rs-radius-xs:0.125rem;
--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-placeholder{
--rs-placeholder-row-height:0.625rem;
--rs-placeholder-row-spacing:calc(var(--rs-spacing) * 4);
--rs-placeholder-paragraph-graph-width:3.875rem;
--rs-placeholder-graph-width:100%;
--rs-placeholder-graph-height:12.5rem;
--rs-placeholder-bg-color:var(--rs-placeholder);
--rs-placeholder-bg-size:auto;
--rs-placeholder-img-color:var(--rs-bg-card);
display:flex;
}
.rs-placeholder-paragraph{
justify-content:flex-start;
align-items:flex-start;
gap:var(--rs-placeholder-row-spacing);
}
.rs-placeholder-paragraph-graph{
flex:0 0 auto;
width:var(--rs-placeholder-paragraph-graph-width);
height:var(--rs-placeholder-paragraph-graph-width);
border-radius:var(--rs-radius-xs);
background:var(--rs-placeholder-bg-color);
background-size:var(--rs-placeholder-bg-size);
}
.rs-placeholder-paragraph-graph[data-shape=circle]{
border-radius:var(--rs-radius-full);
}
.rs-placeholder-paragraph-graph[data-shape=image]{
width:80px;
height:var(--rs-placeholder-paragraph-graph-width);
position:relative;
overflow:hidden;
}
.rs-placeholder-paragraph-graph[data-shape=image]::after{
content:"";
width:0;
height:0;
inset-inline-start:10px;
bottom:10px;
position:absolute;
border-bottom:36px solid var(--rs-placeholder-img-color);
border-left:20px solid transparent;
border-right:30px solid transparent;
}
.rs-placeholder-paragraph-graph[data-shape=image]::before{
content:"";
width:0;
height:0;
inset-inline-start:40px;
bottom:10px;
position:absolute;
border-bottom:22px solid var(--rs-placeholder-img-color);
border-left:16px solid transparent;
border-right:16px solid transparent;
}
.rs-placeholder-paragraph-graph-image .rs-placeholder-paragraph-graph-inner{
width:12px;
height:12px;
inset-inline-end:18px;
top:10px;
border-radius:var(--rs-radius-full);
background:var(--rs-placeholder-img-color);
position:absolute;
}
.rs-placeholder-paragraph-group{
width:100%;
display:flex;
flex-direction:column;
gap:var(--rs-placeholder-row-spacing);
}
.rs-placeholder-paragraph .rs-placeholder-row:nth-child(1){
width:100%;
}
.rs-placeholder-paragraph .rs-placeholder-row:nth-child(2){
width:50%;
}
.rs-placeholder-paragraph .rs-placeholder-row:nth-child(3){
width:80%;
}
.rs-placeholder-paragraph .rs-placeholder-row:nth-child(4){
width:65%;
}
.rs-placeholder-paragraph .rs-placeholder-row:nth-child(5){
width:90%;
}
.rs-placeholder-paragraph .rs-placeholder-row:nth-child(6){
width:70%;
}
.rs-placeholder-paragraph .rs-placeholder-row:nth-child(7){
width:85%;
}
.rs-placeholder-paragraph .rs-placeholder-row:nth-child(8){
width:60%;
}
.rs-placeholder-paragraph .rs-placeholder-row:nth-child(9){
width:75%;
}
.rs-placeholder-row{
background:var(--rs-placeholder-bg-color);
background-size:var(--rs-placeholder-bg-size);
width:100%;
height:var(--rs-placeholder-row-height);
}
.rs-placeholder-grid-col{
flex:1;
display:flex;
flex-direction:column;
align-items:flex-end;
gap:var(--rs-placeholder-row-spacing);
}
.rs-placeholder-grid-col:first-child{
align-items:flex-start;
}
.rs-placeholder-grid-col .rs-placeholder-row{
width:30%;
}
.rs-placeholder-grid-col .rs-placeholder-row:nth-child(1){
width:50%;
}
.rs-placeholder-grid-col .rs-placeholder-row:nth-child(2){
width:25%;
}
.rs-placeholder-grid-col .rs-placeholder-row:nth-child(3){
width:35%;
}
.rs-placeholder-graph{
display:inline-block;
width:var(--rs-placeholder-graph-width);
height:var(--rs-placeholder-graph-height);
background:var(--rs-placeholder-bg-color);
background-size:var(--rs-placeholder-bg-size);
}
.rs-placeholder[data-active=true]{
--rs-placeholder-active-bg:linear-gradient(
-45deg,
var(--rs-placeholder) 25%,
var(--rs-placeholder-active) 37%,
var(--rs-placeholder) 63%
);
--rs-placeholder-active-bg-size:400% 100%;
}
.rs-placeholder[data-active=true].rs-placeholder-graph,
.rs-placeholder[data-active=true] .rs-placeholder-paragraph-graph,
.rs-placeholder[data-active=true] .rs-placeholder-row{
background:var(--rs-placeholder-active-bg);
background-size:var(--rs-placeholder-active-bg-size) ;
animation:placeholder-active 1.5s ease infinite;
}
@keyframes placeholder-active{
0%{
background-position:100% 50%;
}
100%{
background-position:0 50%;
}
}