UNPKG

chowa

Version:

UI component library based on React

192 lines (174 loc) 5.38 kB
/** * @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-steps { margin: 0; padding: 12px; font-size: 14px; box-sizing: border-box; } .cw-steps-item { flex: auto; overflow: hidden; margin: 0; padding: 0; } .cw-steps-item:last-child { flex: none; } .cw-steps-item-inner { display: inline-flex; flex-direction: row; text-align: left; margin: 0; padding: 0; } .cw-steps-item-icon { display: block; border-radius: 50%; text-align: center; transition: all 0.2s ease-in; position: relative; margin: 0; padding: 0; box-sizing: border-box; width: 34px; height: 34px; line-height: 34px; flex: none; } .cw-steps-item-content { z-index: 5; margin: 0 0 0 8px; padding: 0; max-width: 160px; } .cw-steps-item-title { display: inline-block; margin: 0; padding: 0 12px 0 0; transition: color 0.2s ease-in; line-height: 34px; position: relative; } .cw-steps-item-description { margin: 0; padding: 0; line-height: 1; color: #888da8; font-size: 12px; } .cw-steps-item-wait .cw-steps-item-icon { border: 1px solid #e6ecf5; color: #888da8; background: #fff; } .cw-steps-item-wait .cw-steps-item-title { color: #888da8; } .cw-steps-item-process .cw-steps-item-icon { border: 1px solid #7774e7; background-color: #7774e7; color: #fff; } .cw-steps-item-process .cw-steps-item-title { color: #414a63; } .cw-steps-item-finish .cw-steps-item-icon { border: 1px solid #7774e7; color: #7774e7; } .cw-steps-item-finish .cw-steps-item-title { color: #616a6e; } .cw-steps-item-error .cw-steps-item-icon { border: 1px solid #ed4014; color: #ed4014; } .cw-steps-item-select .cw-steps-item-icon { cursor: pointer; } .cw-steps-horizontal { display: flex; flex-direction: row; } .cw-steps-horizontal .cw-steps-item + .cw-steps-item { padding-left: 12px; } .cw-steps-horizontal:not(.cw-steps-vertical-center) .cw-steps-item:not(:last-child) .cw-steps-item-title:before { margin: 0; left: 100%; content: ''; display: block; background-color: #e6ecf5; position: absolute; z-index: 1; transition: border-color 0.2s ease-in; width: 999px; height: 1px; top: 50%; padding: 0; } .cw-steps-horizontal:not(.cw-steps-vertical-center) .cw-steps-item-finish:not(:last-child) .cw-steps-item-title:before { background-color: #7774e7; } .cw-steps-horizontal.cw-steps-vertical-center .cw-steps-item-inner { flex-direction: column; align-items: center; text-align: center; } .cw-steps-horizontal.cw-steps-vertical-center .cw-steps-item-content { margin-left: 0; } .cw-steps-horizontal.cw-steps-vertical-center .cw-steps-item-title { padding-right: 0; } .cw-steps-horizontal.cw-steps-vertical-center .cw-steps-item:not(:last-child) .cw-steps-item-icon:before { margin: 0 0 0 12px; left: 100%; content: ''; display: block; background-color: #e6ecf5; position: absolute; z-index: 1; transition: border-color 0.2s ease-in; width: 999px; height: 1px; top: 50%; padding: 0; } .cw-steps-horizontal.cw-steps-vertical-center .cw-steps-item:not(:first-child) .cw-steps-item-icon:after { margin: 0 12px 0 0; right: 100%; content: ''; display: block; background-color: #e6ecf5; position: absolute; z-index: 1; transition: border-color 0.2s ease-in; width: 999px; height: 1px; top: 50%; padding: 0; } .cw-steps-horizontal.cw-steps-vertical-center .cw-steps-item-finish:not(:last-child) .cw-steps-item-icon:before { background-color: #7774e7; } .cw-steps-horizontal.cw-steps-vertical-center .cw-steps-item-finish:not(:last-child) + .cw-steps-item .cw-steps-item-icon:after { background-color: #7774e7; } .cw-steps-vertical { display: inline-flex; flex-direction: column; min-height: 100%; } .cw-steps-vertical .cw-steps-item:not(:last-child) .cw-steps-item-icon:before { margin: 12px 0 0 0; content: ''; display: block; background-color: #e6ecf5; position: absolute; z-index: 1; transition: border-color 0.2s ease-in; width: 1px; height: 999px; left: 50%; top: 100%; padding: 0; } .cw-steps-vertical .cw-steps-item + .cw-steps-item { padding-top: 12px; } .cw-steps-vertical.cw-steps-item-vertical-center .cw-steps-item-inner { width: 100%; } .cw-steps-vertical .cw-steps-item-finish:not(:last-child) .cw-steps-item-icon:before { background-color: #7774e7; } @media only screen and (max-width: 640px) { .cw-steps-horizontal { flex-direction: column; } .cw-steps-horizontal .cw-steps-item + .cw-steps-item { padding-top: 12px; padding-left: 0; } .cw-steps-horizontal:not(.cw-steps-vertical-center) .cw-steps-item:not(:last-child) .cw-steps-item-title:before { display: none; } .cw-steps-horizontal.cw-steps-vertical-center { align-items: center; } .cw-steps-horizontal.cw-steps-vertical-center .cw-steps-item:not(:last-child) .cw-steps-item-icon:before { display: none; } .cw-steps-horizontal.cw-steps-vertical-center .cw-steps-item:not(:first-child) .cw-steps-item-icon:after { display: none; } }