chowa
Version:
UI component library based on React
168 lines (142 loc) • 3.41 kB
CSS
/**
* @license chowa v1.1.3
*
* Copyright (c) Chowa Techonlogies Co.,Ltd.(http://www.chowa.cn).
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
.cw-drawer-mask {
position: fixed;
top: 0;
left: 0;
bottom: 0;
right: 0;
margin: 0;
padding: 0;
background-color: rgba(0, 0, 0, 0.45); }
.cw-drawer {
position: fixed;
background: #fff;
display: flex;
flex-direction: column;
margin: 0;
padding: 0;
max-height: 100vh; }
.cw-drawer-right {
top: 0;
right: 0;
bottom: 0;
min-width: 220px;
box-shadow: -2px 0 8px rgba(0, 0, 0, 0.2); }
.cw-drawer-left {
top: 0;
left: 0;
bottom: 0;
min-width: 220px;
box-shadow: 2px 0 8px rgba(0, 0, 0, 0.2); }
.cw-drawer-top {
top: 0;
left: 0;
right: 0;
min-height: 220px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); }
.cw-drawer-bottom {
bottom: 0;
left: 0;
right: 0;
min-height: 220px;
box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.2); }
.cw-drawer-header {
display: flex;
color: #414a63;
flex: none;
margin: 0;
padding: 0 16px;
font-size: 14px;
height: 55px;
line-height: 55px;
box-sizing: border-box; }
.cw-drawer-header-title {
flex: auto; }
.cw-drawer-header-close {
margin: 0 0 0 16px;
padding: 0;
border: none;
background: transparent;
outline: none;
color: #616a6e;
transition: color 0.2s ease-in;
cursor: pointer;
flex: none; }
.cw-drawer-header-close:hover {
color: #414a63; }
.cw-drawer-body {
flex: auto;
margin: 0;
padding: 12px 16px;
box-sizing: border-box;
color: #616a6e;
overflow-x: hidden;
overflow-y: auto; }
.cw-drawer-body.cw-drawer-body-media {
padding: 0; }
.cw-drawer-footer {
display: flex;
align-items: center;
justify-content: flex-end;
flex: none;
margin: 0;
box-sizing: border-box;
padding: 8px 16px;
font-size: 14px;
color: #888da8; }
.cw-drawer-footer.cw-drawer-footer-start {
justify-content: flex-start; }
.cw-drawer-bordered .cw-drawer-header {
border-bottom: 1px solid #e6ecf5; }
.cw-drawer-bordered .cw-drawer-footer {
border-top: 1px solid #e6ecf5; }
@keyframes cw-drawer-right-trans {
0% {
transform: translateX(100%); }
100% {
transform: translateX(0); } }
@keyframes cw-drawer-left-trans {
0% {
transform: translateX(-100%); }
100% {
transform: translateX(0); } }
@keyframes cw-drawer-top-trans {
0% {
transform: translateY(-100%); }
100% {
transform: translateY(0); } }
@keyframes cw-drawer-bottom-trans {
0% {
transform: translateY(100%); }
100% {
transform: translateY(0); } }
.cw-drawer-appear {
animation-duration: 0.2s;
animation-timing-function: ease-in-out; }
.cw-drawer-right-enter {
animation-name: cw-drawer-right-trans; }
.cw-drawer-right-leave {
animation-name: cw-drawer-right-trans;
animation-direction: reverse; }
.cw-drawer-left-enter {
animation-name: cw-drawer-left-trans; }
.cw-drawer-left-leave {
animation-name: cw-drawer-left-trans;
animation-direction: reverse; }
.cw-drawer-top-enter {
animation-name: cw-drawer-top-trans; }
.cw-drawer-top-leave {
animation-name: cw-drawer-top-trans;
animation-direction: reverse; }
.cw-drawer-bottom-enter {
animation-name: cw-drawer-bottom-trans; }
.cw-drawer-bottom-leave {
animation-name: cw-drawer-bottom-trans;
animation-direction: reverse; }