@nutui/nutui-react
Version:
京东风格的轻量级移动端 React 组件库,支持一套代码生成 H5 和小程序
427 lines (425 loc) • 16.8 kB
CSS
/* #ifdef harmony */
/* #endif */
/* #ifndef harmony */
/* #endif */
.nut-button {
position: relative;
display: flex;
display: inline-block;
/* #ifdef harmony*/
width: 80px;
/* #endif */
/* #ifndef harmony*/
width: auto;
/* #endif */
flex-direction: row;
justify-content: center;
align-items: center;
flex-shrink: 0;
box-sizing: border-box;
margin: 0;
padding: 0;
height: var(--nutui-button-default-height, 32px);
font-size: var(--nutui-button-default-font-size, var(--nutui-font-size-base, 14px));
font-weight: var(--nutui-font-weight, 400);
text-align: center;
cursor: pointer;
transition: opacity 0.2s;
user-select: none;
touch-action: manipulation;
-webkit-appearance: none;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
color: var(--nutui-button-default-color, var(--nutui-color-title, #1a1a1a));
background: var(--nutui-button-default-background-color, transparent);
border-width: var(--nutui-button-border-width, 0.5px);
}
.nut-button-text {
margin-left: var(--nutui-button-text-icon-margin, 4px);
}
.nut-button-text-right {
margin-right: var(--nutui-button-text-icon-margin, 4px);
}
.nut-button-children {
display: flex;
flex-direction: row;
background: transparent;
}
.nut-button::before {
position: absolute;
top: 50%;
left: 50%;
width: 100%;
height: 100%;
background-color: var(--nutui-color-mask, rgba(0, 0, 0, 0.7));
border: inherit;
border-color: var(--nutui-color-mask, rgba(0, 0, 0, 0.7));
border-radius: inherit;
transform: translate(-50%, -50%);
opacity: 0;
content: " ";
}
.nut-button::after {
border: none;
}
.nut-button:active::before {
opacity: 0.1;
}
.nut-button-wrap {
height: 100%;
width: 100%;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
/* #ifndef harmony */
background: initial;
/* #endif */
}
.nut-button-wrap .nut-icon {
font-size: var(--nutui-button-default-font-size, var(--nutui-font-size-base, 14px));
width: var(--nutui-button-default-font-size, var(--nutui-font-size-base, 14px));
height: var(--nutui-button-default-font-size, var(--nutui-font-size-base, 14px));
}
.nut-button-loading::before, .nut-button-disabled::before {
display: none;
}
.nut-button-disabled {
cursor: not-allowed;
color: #ffffff;
}
.nut-button.nut-button-icononly {
width: var(--nutui-button-default-height, 32px);
padding: 0;
}
.nut-button-round {
border-radius: var(--nutui-button-border-radius, var(--nutui-radius-s, 6px));
}
.nut-button-default {
padding: var(--nutui-button-default-padding, 0px 12px);
border-style: solid;
border-color: var(--nutui-button-default-border-color, var(--nutui-color-text-disabled, #c2c4cc));
}
.nut-button-default-disabled, .nut-button-default-solid-disabled {
color: var(--nutui-button-primary-color, #ffffff);
background: var(--nutui-button-default-disabled, var(--nutui-color-text-disabled, #c2c4cc));
border-color: var(--nutui-button-default-disabled, var(--nutui-color-text-disabled, #c2c4cc));
}
.nut-button-default-none-disabled {
color: var(--nutui-button-default-disabled-color, var(--nutui-color-text-help, #888b94));
}
.nut-button-default-outline-disabled, .nut-button-default-dashed-disabled {
background: transparent;
color: var(--nutui-button-default-disabled, var(--nutui-color-text-disabled, #c2c4cc));
border-color: var(--nutui-button-default-disabled, var(--nutui-color-text-disabled, #c2c4cc));
}
.nut-button-normal {
padding: var(--nutui-button-normal-padding, 0px 12px);
}
.nut-button-xlarge {
height: var(--nutui-button-xlarge-height, 48px);
padding: var(--nutui-button-xlarge-padding, 0px 24px);
font-size: var(--nutui-button-xlarge-font-size, var(--nutui-font-size-xl, 18px));
border-radius: var(--nutui-button-xlarge-border-radius, var(--nutui-radius-base, 8px));
}
.nut-button-xlarge .nut-button-text {
margin-left: var(--nutui-button-xlarge-text-icon-margin, 6px);
}
.nut-button-xlarge .nut-button-text-right {
margin-right: var(--nutui-button-xlarge-text-icon-margin, 6px);
}
.nut-button-xlarge .nut-icon {
font-size: var(--nutui-button-xlarge-font-size, var(--nutui-font-size-xl, 18px));
width: var(--nutui-button-xlarge-font-size, var(--nutui-font-size-xl, 18px));
height: var(--nutui-button-xlarge-font-size, var(--nutui-font-size-xl, 18px));
}
.nut-button-xlarge-children {
font-size: var(--nutui-button-xlarge-font-size, var(--nutui-font-size-xl, 18px));
}
.nut-button-large {
height: var(--nutui-button-large-height, 40px);
padding: var(--nutui-button-large-padding, 0px 16px);
font-size: var(--nutui-button-large-font-size, var(--nutui-font-size-l, 16px));
border-radius: var(--nutui-button-large-border-radius, var(--nutui-radius-base, 8px));
}
.nut-button-large .nut-button-text {
margin-left: var(--nutui-button-xlarge-text-icon-margin, 6px);
}
.nut-button-large .nut-button-text-right {
margin-right: var(--nutui-button-xlarge-text-icon-margin, 6px);
}
.nut-button-large .nut-icon {
font-size: var(--nutui-button-large-font-size, var(--nutui-font-size-l, 16px));
width: var(--nutui-button-large-font-size, var(--nutui-font-size-l, 16px));
height: var(--nutui-button-large-font-size, var(--nutui-font-size-l, 16px));
}
.nut-button-large-children {
font-size: var(--nutui-button-large-font-size, var(--nutui-font-size-l, 16px));
}
.nut-button-small {
height: var(--nutui-button-small-height, 28px);
padding: var(--nutui-button-small-padding, 0px 8px);
font-size: var(--nutui-button-small-font-size, var(--nutui-font-size-s, 12px));
border-radius: var(--nutui-button-small-border-radius, var(--nutui-radius-s, 6px));
}
.nut-button-small .nut-icon {
font-size: var(--nutui-button-small-font-size, var(--nutui-font-size-s, 12px));
width: var(--nutui-button-small-font-size, var(--nutui-font-size-s, 12px));
height: var(--nutui-button-small-font-size, var(--nutui-font-size-s, 12px));
}
.nut-button-small-children {
font-size: var(--nutui-button-small-font-size, var(--nutui-font-size-s, 12px));
}
.nut-button-mini {
height: var(--nutui-button-mini-height, 24px);
padding: var(--nutui-button-mini-padding, 0px 8px);
font-size: var(--nutui-button-mini-font-size, var(--nutui-font-size-xs, 11px));
border-radius: var(--nutui-button-mini-border-radius, var(--nutui-radius-xs, 4px));
}
.nut-button-mini .nut-icon {
font-size: var(--nutui-button-mini-font-size, var(--nutui-font-size-xs, 11px));
width: var(--nutui-button-mini-font-size, var(--nutui-font-size-xs, 11px));
height: var(--nutui-button-mini-font-size, var(--nutui-font-size-xs, 11px));
}
.nut-button-mini-children {
font-size: var(--nutui-button-mini-font-size, var(--nutui-font-size-xs, 11px));
}
.nut-button-primary {
color: var(--nutui-button-primary-color, #ffffff);
background-origin: border-box;
border-color: transparent;
}
.nut-button-primary-children {
color: var(--nutui-button-primary-color, #ffffff);
}
.nut-button-primary-solid {
background: linear-gradient(90deg, var(--nutui-color-primary-stop-1, #ff475d) 0%, var(--nutui-color-primary-stop-2, #ff0f23) 100%);
color: var(--nutui-button-primary-color, #ffffff);
border-color: transparent;
font-weight: var(--nutui-font-weight-bold, 600);
}
.nut-button-primary-solid.nut-button-small, .nut-button-primary-solid.nut-button-mini {
font-weight: var(--nutui-font-weight, 400);
}
.nut-button-primary-disabled, .nut-button-primary-disabled.nut-button-icononly, .nut-button-primary-solid-disabled {
color: var(--nutui-button-primary-color, #ffffff);
background: var(--nutui-button-primary-disabled, var(--nutui-color-primary-disabled-special, #ffadbe));
border-color: var(--nutui-button-primary-disabled, var(--nutui-color-primary-disabled-special, #ffadbe));
}
.nut-button-primary-none {
color: var(--nutui-button-primary-border-color, var(--nutui-color-primary, #ff0f23));
}
.nut-button-primary-none-disabled {
color: var(--nutui-button-primary-disabled, var(--nutui-color-primary-disabled-special, #ffadbe));
}
.nut-button-primary-outline {
color: var(--nutui-button-primary-border-color, var(--nutui-color-primary, #ff0f23));
border-color: var(--nutui-button-primary-border-color, var(--nutui-color-primary, #ff0f23));
}
.nut-button-primary-outline-disabled {
color: var(--nutui-button-primary-disabled, var(--nutui-color-primary-disabled-special, #ffadbe));
border-color: var(--nutui-button-primary-disabled, var(--nutui-color-primary-disabled-special, #ffadbe));
}
.nut-button-primary-dashed {
color: var(--nutui-button-primary-border-color, var(--nutui-color-primary, #ff0f23));
border-color: var(--nutui-button-primary-border-color, var(--nutui-color-primary, #ff0f23));
}
.nut-button-primary-dashed-disabled {
color: var(--nutui-button-primary-disabled, var(--nutui-color-primary-disabled-special, #ffadbe));
border-color: var(--nutui-button-primary-disabled, var(--nutui-color-primary-disabled-special, #ffadbe));
}
.nut-button-primary.nut-button-solid.nut-button-normal {
font-weight: var(--nutui-font-weight-bold, 600);
}
.nut-button-success {
color: var(--nutui-button-success-color, #ffffff);
background: var(--nutui-button-success-background-color, var(--nutui-color-success, #00d900));
background-origin: border-box;
border-color: transparent;
}
.nut-button-success-children {
color: var(--nutui-button-success-color, #ffffff);
}
.nut-button-success-solid-disabled {
background: var(--nutui-button-success-disabled, var(--nutui-color-success-disabled, #b2f0ae));
border-color: var(--nutui-button-success-disabled, var(--nutui-color-success-disabled, #b2f0ae));
}
.nut-button-success-outline, .nut-button-success-dashed {
color: var(--nutui-button-success-border-color, var(--nutui-color-success, #00d900));
border-color: var(--nutui-button-success-border-color, var(--nutui-color-success, #00d900));
}
.nut-button-success-outline-disabled, .nut-button-success-dashed-disabled {
color: var(--nutui-button-primary-disabled, var(--nutui-color-primary-disabled-special, #ffadbe));
border-color: var(--nutui-button-primary-disabled, var(--nutui-color-primary-disabled-special, #ffadbe));
}
.nut-button-success-none {
color: var(--nutui-button-success-border-color, var(--nutui-color-success, #00d900));
}
.nut-button-success-none-disabled {
color: var(--nutui-button-success-disabled, var(--nutui-color-success-disabled, #b2f0ae));
}
.nut-button-info {
color: var(--nutui-button-info-color, #ffffff);
background: var(--nutui-button-info-background-color, var(--nutui-color-info-background, #0073ff));
background-origin: border-box;
border-color: transparent;
}
.nut-button-info-children {
color: var(--nutui-button-info-color, #ffffff);
}
.nut-button-info-solid-disabled {
background: var(--nutui-button-info-disabled, var(--nutui-color-info-disabled, #89a6f8));
border-color: var(--nutui-button-info-disabled, var(--nutui-color-info-disabled, #89a6f8));
}
.nut-button-info-outline, .nut-button-info-dashed {
color: var(--nutui-button-info-border-color, var(--nutui-color-info, #0073ff));
border-color: var(--nutui-button-info-border-color, var(--nutui-color-info, #0073ff));
}
.nut-button-info-outline-disabled, .nut-button-info-dashed-disabled {
color: var(--nutui-button-info-disabled, var(--nutui-color-info-disabled, #89a6f8));
border-color: var(--nutui-button-info-disabled, var(--nutui-color-info-disabled, #89a6f8));
}
.nut-button-info-none {
color: var(--nutui-button-info-border-color, var(--nutui-color-info, #0073ff));
}
.nut-button-info-none-disabled {
color: var(--nutui-button-info-disabled, var(--nutui-color-info-disabled, #89a6f8));
}
.nut-button-danger {
color: var(--nutui-button-danger-color, #ffffff);
background: var(--nutui-button-danger-background-color, var(--nutui-color-danger, #ff0f23));
background-origin: border-box;
border-color: transparent;
}
.nut-button-danger-children {
color: var(--nutui-button-danger-color, #ffffff);
}
.nut-button-danger-solid-disabled {
background: var(--nutui-button-danger-disabled, var(--nutui-color-danger-disabled, var(--nutui-color-primary-disabled-special, #ffadbe)));
border-color: var(--nutui-button-danger-disabled, var(--nutui-color-danger-disabled, var(--nutui-color-primary-disabled-special, #ffadbe)));
}
.nut-button-danger-outline, .nut-button-danger-dashed {
color: var(--nutui-button-danger-border-color, var(--nutui-color-danger, #ff0f23));
border-color: var(--nutui-button-danger-border-color, var(--nutui-color-danger, #ff0f23));
}
.nut-button-danger-outline-disabled, .nut-button-danger-dashed-disabled {
color: var(--nutui-button-danger-disabled, var(--nutui-color-danger-disabled, var(--nutui-color-primary-disabled-special, #ffadbe)));
border-color: var(--nutui-button-danger-disabled, var(--nutui-color-danger-disabled, var(--nutui-color-primary-disabled-special, #ffadbe)));
}
.nut-button-danger-none {
color: var(--nutui-button-danger-border-color, var(--nutui-color-danger, #ff0f23));
}
.nut-button-danger-none-disabled {
color: var(--nutui-button-danger-disabled, var(--nutui-color-danger-disabled, var(--nutui-color-primary-disabled-special, #ffadbe)));
}
.nut-button-warning {
color: var(--nutui-button-warning-color, #ffffff);
background: var(--nutui-button-warning-background-color, var(--nutui-color-warning, #ffbf00));
background-origin: border-box;
border-color: transparent;
}
.nut-button-warning-children {
color: var(--nutui-button-warning-color, #ffffff);
}
.nut-button-warning-disabled, .nut-button-warning-solid-disabled {
color: var(--nutui-button-warning-color, #ffffff);
background: var(--nutui-button-warning-disabled, var(--nutui-color-warning-disabled, #fdd3b9));
border-color: var(--nutui-button-warning-disabled, var(--nutui-color-warning-disabled, #fdd3b9));
}
.nut-button-warning-outline, .nut-button-warning-dashed {
color: var(--nutui-button-warning-border-color, var(--nutui-color-warning, #ffbf00));
border-color: var(--nutui-button-warning-border-color, var(--nutui-color-warning, #ffbf00));
}
.nut-button-warning-outline-disabled, .nut-button-warning-dashed-disabled {
color: var(--nutui-button-warning-disabled, var(--nutui-color-warning-disabled, #fdd3b9));
border-color: var(--nutui-button-warning-disabled, var(--nutui-color-warning-disabled, #fdd3b9));
}
.nut-button-warning-none {
color: var(--nutui-button-warning-border-color, var(--nutui-color-warning, #ffbf00));
}
.nut-button-warning-none-disabled {
color: var(--nutui-button-warning-disabled, var(--nutui-color-warning-disabled, #fdd3b9));
}
.nut-button-block {
display: block;
width: 100%;
}
.nut-button-outline {
background: transparent;
border-style: solid;
}
.nut-button-dashed {
background: transparent;
border-style: dashed;
}
.nut-button-none {
background: transparent;
border-color: transparent;
}
.nut-button-loading {
cursor: default;
opacity: 0.9;
}
.nut-button-square {
border-radius: var(--nutui-button-square-border-radius, 0);
}
[dir=rtl] .nut-button-text,
.nut-rtl .nut-button-text {
margin-left: 0;
margin-right: var(--nutui-button-text-icon-margin, 4px);
}
[dir=rtl] .nut-button-text.right,
.nut-rtl .nut-button-text.right {
margin-left: var(--nutui-button-text-icon-margin, 4px);
}
[dir=rtl] .nut-button::before,
.nut-rtl .nut-button::before {
left: auto;
right: 50%;
transform: translate(50%, -50%);
}
.nut-resultpage {
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
margin: 0 auto;
}
.nut-resultpage-icon {
display: inline-flex;
margin-bottom: var(--nutui-resultpage-icon-margin-bottom, 12px);
}
.nut-resultpage-icon .nut-icon {
height: var(--nutui-resultpage-icon-size, 36px);
width: var(--nutui-resultpage-icon-size, 36px);
}
.nut-resultpage-title {
width: var(--nutui-resultpage-width, 240px);
margin-bottom: var(--nutui-resultpage-title-margin-bottom, 12px);
font-size: var(--nutui-resultpage-title-font-size, var(--nutui-font-size-xl, 18px));
color: var(--nutui-resultpage-title-color, var(--nutui-color-title, #1a1a1a));
font-weight: var(--nutui-font-weight-bold, 600);
text-align: center;
}
.nut-resultpage-description {
width: var(--nutui-resultpage-width, 240px);
line-height: var(--nutui-resultpage-description-line-height, 20px);
font-size: var(--nutui-resultpage-description-font-size, var(--nutui-font-size-base, 14px));
color: var(--nutui-resultpage-description-color, var(--nutui-color-text, #505259));
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
word-break: break-all;
}
.nut-resultpage-actions {
display: flex;
flex-direction: row;
margin-top: var(--nutui-resultpage-actions-margin-top, 16px);
}
.nut-resultpage-actions .nut-button-children {
white-space: nowrap;
}
.nut-resultpage-action {
margin-left: 6px;
margin-right: 6px;
}