UNPKG

antd

Version:

An enterprise-class UI design language and React-based implementation

653 lines (652 loc) 16 kB
.ant-btn { display: inline-block; margin-bottom: 0; font-weight: 500; text-align: center; -ms-touch-action: manipulation; touch-action: manipulation; cursor: pointer; background-image: none; border: 1px solid transparent; white-space: nowrap; line-height: 1.5; padding: 4px 15px; font-size: 12px; border-radius: 6px; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; -webkit-transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1); transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1); position: relative; color: #666; background-color: #f7f7f7; border-color: #d9d9d9; } .ant-btn > .anticon { line-height: 1; } .ant-btn, .ant-btn:active, .ant-btn:focus { outline: 0; } .ant-btn:not([disabled]):hover { text-decoration: none; } .ant-btn:not([disabled]):active { outline: 0; -webkit-transition: none; transition: none; } .ant-btn.disabled, .ant-btn[disabled] { cursor: not-allowed; } .ant-btn.disabled > *, .ant-btn[disabled] > * { pointer-events: none; } .ant-btn-lg { padding: 4px 15px 5px 15px; font-size: 14px; border-radius: 6px; } .ant-btn-sm { padding: 1px 7px; font-size: 12px; border-radius: 4px; } .ant-btn > a:only-child { color: currentColor; } .ant-btn > a:only-child:after { content: ''; position: absolute; top: 0; left: 0; bottom: 0; right: 0; background: transparent; } .ant-btn:hover, .ant-btn:focus { color: #57c5f7; background-color: #f7f7f7; border-color: #57c5f7; } .ant-btn:hover > a:only-child, .ant-btn:focus > a:only-child { color: currentColor; } .ant-btn:hover > a:only-child:after, .ant-btn:focus > a:only-child:after { content: ''; position: absolute; top: 0; left: 0; bottom: 0; right: 0; background: transparent; } .ant-btn:active, .ant-btn.active { color: #2baee9; background-color: #f7f7f7; border-color: #2baee9; } .ant-btn:active > a:only-child, .ant-btn.active > a:only-child { color: currentColor; } .ant-btn:active > a:only-child:after, .ant-btn.active > a:only-child:after { content: ''; position: absolute; top: 0; left: 0; bottom: 0; right: 0; background: transparent; } .ant-btn.disabled, .ant-btn[disabled], .ant-btn.disabled:hover, .ant-btn[disabled]:hover, .ant-btn.disabled:focus, .ant-btn[disabled]:focus, .ant-btn.disabled:active, .ant-btn[disabled]:active, .ant-btn.disabled.active, .ant-btn[disabled].active { color: #ccc; background-color: #f7f7f7; border-color: #d9d9d9; } .ant-btn.disabled > a:only-child, .ant-btn[disabled] > a:only-child, .ant-btn.disabled:hover > a:only-child, .ant-btn[disabled]:hover > a:only-child, .ant-btn.disabled:focus > a:only-child, .ant-btn[disabled]:focus > a:only-child, .ant-btn.disabled:active > a:only-child, .ant-btn[disabled]:active > a:only-child, .ant-btn.disabled.active > a:only-child, .ant-btn[disabled].active > a:only-child { color: currentColor; } .ant-btn.disabled > a:only-child:after, .ant-btn[disabled] > a:only-child:after, .ant-btn.disabled:hover > a:only-child:after, .ant-btn[disabled]:hover > a:only-child:after, .ant-btn.disabled:focus > a:only-child:after, .ant-btn[disabled]:focus > a:only-child:after, .ant-btn.disabled:active > a:only-child:after, .ant-btn[disabled]:active > a:only-child:after, .ant-btn.disabled.active > a:only-child:after, .ant-btn[disabled].active > a:only-child:after { content: ''; position: absolute; top: 0; left: 0; bottom: 0; right: 0; background: transparent; } .ant-btn:hover, .ant-btn:focus, .ant-btn:active, .ant-btn.active { background: #fff; } .ant-btn-primary { color: #fff; background-color: #2db7f5; border-color: #2db7f5; } .ant-btn-primary > a:only-child { color: currentColor; } .ant-btn-primary > a:only-child:after { content: ''; position: absolute; top: 0; left: 0; bottom: 0; right: 0; background: transparent; } .ant-btn-primary:hover, .ant-btn-primary:focus { color: #fff; background-color: #57c5f7; border-color: #57c5f7; } .ant-btn-primary:hover > a:only-child, .ant-btn-primary:focus > a:only-child { color: currentColor; } .ant-btn-primary:hover > a:only-child:after, .ant-btn-primary:focus > a:only-child:after { content: ''; position: absolute; top: 0; left: 0; bottom: 0; right: 0; background: transparent; } .ant-btn-primary:active, .ant-btn-primary.active { color: #fff; background-color: #2baee9; border-color: #2baee9; } .ant-btn-primary:active > a:only-child, .ant-btn-primary.active > a:only-child { color: currentColor; } .ant-btn-primary:active > a:only-child:after, .ant-btn-primary.active > a:only-child:after { content: ''; position: absolute; top: 0; left: 0; bottom: 0; right: 0; background: transparent; } .ant-btn-primary.disabled, .ant-btn-primary[disabled], .ant-btn-primary.disabled:hover, .ant-btn-primary[disabled]:hover, .ant-btn-primary.disabled:focus, .ant-btn-primary[disabled]:focus, .ant-btn-primary.disabled:active, .ant-btn-primary[disabled]:active, .ant-btn-primary.disabled.active, .ant-btn-primary[disabled].active { color: #ccc; background-color: #f7f7f7; border-color: #d9d9d9; } .ant-btn-primary.disabled > a:only-child, .ant-btn-primary[disabled] > a:only-child, .ant-btn-primary.disabled:hover > a:only-child, .ant-btn-primary[disabled]:hover > a:only-child, .ant-btn-primary.disabled:focus > a:only-child, .ant-btn-primary[disabled]:focus > a:only-child, .ant-btn-primary.disabled:active > a:only-child, .ant-btn-primary[disabled]:active > a:only-child, .ant-btn-primary.disabled.active > a:only-child, .ant-btn-primary[disabled].active > a:only-child { color: currentColor; } .ant-btn-primary.disabled > a:only-child:after, .ant-btn-primary[disabled] > a:only-child:after, .ant-btn-primary.disabled:hover > a:only-child:after, .ant-btn-primary[disabled]:hover > a:only-child:after, .ant-btn-primary.disabled:focus > a:only-child:after, .ant-btn-primary[disabled]:focus > a:only-child:after, .ant-btn-primary.disabled:active > a:only-child:after, .ant-btn-primary[disabled]:active > a:only-child:after, .ant-btn-primary.disabled.active > a:only-child:after, .ant-btn-primary[disabled].active > a:only-child:after { content: ''; position: absolute; top: 0; left: 0; bottom: 0; right: 0; background: transparent; } .ant-btn-group .ant-btn-primary:not(:first-child):not(:last-child) { border-right-color: #2baee9; border-left-color: #2baee9; } .ant-btn-group .ant-btn-primary:first-child:not(:last-child) { border-right-color: #2baee9; } .ant-btn-group .ant-btn-primary:first-child:not(:last-child)[disabled] { border-right-color: #d9d9d9; } .ant-btn-group .ant-btn-primary:last-child:not(:first-child), .ant-btn-group .ant-btn-primary + .ant-btn { border-left-color: #2baee9; } .ant-btn-group .ant-btn-primary:last-child:not(:first-child)[disabled], .ant-btn-group .ant-btn-primary + .ant-btn[disabled] { border-left-color: #d9d9d9; } .ant-btn-ghost { color: #666; background-color: transparent; border-color: #d9d9d9; } .ant-btn-ghost > a:only-child { color: currentColor; } .ant-btn-ghost > a:only-child:after { content: ''; position: absolute; top: 0; left: 0; bottom: 0; right: 0; background: transparent; } .ant-btn-ghost:hover, .ant-btn-ghost:focus { color: #57c5f7; background-color: transparent; border-color: #57c5f7; } .ant-btn-ghost:hover > a:only-child, .ant-btn-ghost:focus > a:only-child { color: currentColor; } .ant-btn-ghost:hover > a:only-child:after, .ant-btn-ghost:focus > a:only-child:after { content: ''; position: absolute; top: 0; left: 0; bottom: 0; right: 0; background: transparent; } .ant-btn-ghost:active, .ant-btn-ghost.active { color: #2baee9; background-color: transparent; border-color: #2baee9; } .ant-btn-ghost:active > a:only-child, .ant-btn-ghost.active > a:only-child { color: currentColor; } .ant-btn-ghost:active > a:only-child:after, .ant-btn-ghost.active > a:only-child:after { content: ''; position: absolute; top: 0; left: 0; bottom: 0; right: 0; background: transparent; } .ant-btn-ghost.disabled, .ant-btn-ghost[disabled], .ant-btn-ghost.disabled:hover, .ant-btn-ghost[disabled]:hover, .ant-btn-ghost.disabled:focus, .ant-btn-ghost[disabled]:focus, .ant-btn-ghost.disabled:active, .ant-btn-ghost[disabled]:active, .ant-btn-ghost.disabled.active, .ant-btn-ghost[disabled].active { color: #ccc; background-color: #f7f7f7; border-color: #d9d9d9; } .ant-btn-ghost.disabled > a:only-child, .ant-btn-ghost[disabled] > a:only-child, .ant-btn-ghost.disabled:hover > a:only-child, .ant-btn-ghost[disabled]:hover > a:only-child, .ant-btn-ghost.disabled:focus > a:only-child, .ant-btn-ghost[disabled]:focus > a:only-child, .ant-btn-ghost.disabled:active > a:only-child, .ant-btn-ghost[disabled]:active > a:only-child, .ant-btn-ghost.disabled.active > a:only-child, .ant-btn-ghost[disabled].active > a:only-child { color: currentColor; } .ant-btn-ghost.disabled > a:only-child:after, .ant-btn-ghost[disabled] > a:only-child:after, .ant-btn-ghost.disabled:hover > a:only-child:after, .ant-btn-ghost[disabled]:hover > a:only-child:after, .ant-btn-ghost.disabled:focus > a:only-child:after, .ant-btn-ghost[disabled]:focus > a:only-child:after, .ant-btn-ghost.disabled:active > a:only-child:after, .ant-btn-ghost[disabled]:active > a:only-child:after, .ant-btn-ghost.disabled.active > a:only-child:after, .ant-btn-ghost[disabled].active > a:only-child:after { content: ''; position: absolute; top: 0; left: 0; bottom: 0; right: 0; background: transparent; } .ant-btn-dashed { color: #666; background-color: transparent; border-color: #d9d9d9; border-style: dashed; } .ant-btn-dashed > a:only-child { color: currentColor; } .ant-btn-dashed > a:only-child:after { content: ''; position: absolute; top: 0; left: 0; bottom: 0; right: 0; background: transparent; } .ant-btn-dashed:hover, .ant-btn-dashed:focus { color: #57c5f7; background-color: transparent; border-color: #57c5f7; } .ant-btn-dashed:hover > a:only-child, .ant-btn-dashed:focus > a:only-child { color: currentColor; } .ant-btn-dashed:hover > a:only-child:after, .ant-btn-dashed:focus > a:only-child:after { content: ''; position: absolute; top: 0; left: 0; bottom: 0; right: 0; background: transparent; } .ant-btn-dashed:active, .ant-btn-dashed.active { color: #2baee9; background-color: transparent; border-color: #2baee9; } .ant-btn-dashed:active > a:only-child, .ant-btn-dashed.active > a:only-child { color: currentColor; } .ant-btn-dashed:active > a:only-child:after, .ant-btn-dashed.active > a:only-child:after { content: ''; position: absolute; top: 0; left: 0; bottom: 0; right: 0; background: transparent; } .ant-btn-dashed.disabled, .ant-btn-dashed[disabled], .ant-btn-dashed.disabled:hover, .ant-btn-dashed[disabled]:hover, .ant-btn-dashed.disabled:focus, .ant-btn-dashed[disabled]:focus, .ant-btn-dashed.disabled:active, .ant-btn-dashed[disabled]:active, .ant-btn-dashed.disabled.active, .ant-btn-dashed[disabled].active { color: #ccc; background-color: #f7f7f7; border-color: #d9d9d9; } .ant-btn-dashed.disabled > a:only-child, .ant-btn-dashed[disabled] > a:only-child, .ant-btn-dashed.disabled:hover > a:only-child, .ant-btn-dashed[disabled]:hover > a:only-child, .ant-btn-dashed.disabled:focus > a:only-child, .ant-btn-dashed[disabled]:focus > a:only-child, .ant-btn-dashed.disabled:active > a:only-child, .ant-btn-dashed[disabled]:active > a:only-child, .ant-btn-dashed.disabled.active > a:only-child, .ant-btn-dashed[disabled].active > a:only-child { color: currentColor; } .ant-btn-dashed.disabled > a:only-child:after, .ant-btn-dashed[disabled] > a:only-child:after, .ant-btn-dashed.disabled:hover > a:only-child:after, .ant-btn-dashed[disabled]:hover > a:only-child:after, .ant-btn-dashed.disabled:focus > a:only-child:after, .ant-btn-dashed[disabled]:focus > a:only-child:after, .ant-btn-dashed.disabled:active > a:only-child:after, .ant-btn-dashed[disabled]:active > a:only-child:after, .ant-btn-dashed.disabled.active > a:only-child:after, .ant-btn-dashed[disabled].active > a:only-child:after { content: ''; position: absolute; top: 0; left: 0; bottom: 0; right: 0; background: transparent; } .ant-btn-circle, .ant-btn-circle-outline { width: 28px; height: 28px; padding: 0; font-size: 14px; border-radius: 50%; } .ant-btn-circle.ant-btn-lg, .ant-btn-circle-outline.ant-btn-lg { width: 32px; height: 32px; padding: 0; font-size: 16px; border-radius: 50%; } .ant-btn-circle.ant-btn-sm, .ant-btn-circle-outline.ant-btn-sm { width: 22px; height: 22px; padding: 0; font-size: 12px; border-radius: 50%; } .ant-btn:before { position: absolute; top: -1px; left: -1px; bottom: -1px; right: -1px; background: #fff; opacity: 0.35; content: ''; border-radius: inherit; z-index: 1; -webkit-transition: opacity .2s; transition: opacity .2s; pointer-events: none; display: none; } .ant-btn.ant-btn-loading { padding-left: 29px; pointer-events: none; position: relative; } .ant-btn.ant-btn-loading .anticon { margin-left: -14px; -webkit-transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1); transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1); } .ant-btn.ant-btn-loading:before { display: block; } .ant-btn-sm.ant-btn-loading { padding-left: 24px; } .ant-btn-sm.ant-btn-loading .anticon { margin-left: -17px; } .ant-btn-group { position: relative; display: inline-block; vertical-align: middle; } .ant-btn-group > .ant-btn { position: relative; } .ant-btn-group > .ant-btn:hover, .ant-btn-group > .ant-btn:focus, .ant-btn-group > .ant-btn:active, .ant-btn-group > .ant-btn.active { z-index: 2; } .ant-btn-group-lg > .ant-btn { padding: 4px 15px 5px 15px; font-size: 14px; border-radius: 6px; } .ant-btn-group-sm > .ant-btn { padding: 1px 7px; font-size: 12px; border-radius: 4px; } .ant-btn-group-sm > .ant-btn > .anticon { font-size: 12px; } .ant-btn-group .ant-btn + .ant-btn, .ant-btn + .ant-btn-group, .ant-btn-group + .ant-btn, .ant-btn-group + .ant-btn-group { margin-left: -1px; } .ant-btn-group .ant-btn:not(:first-child):not(:last-child) { border-radius: 0; padding-left: 8px; padding-right: 8px; } .ant-btn-group > .ant-btn:first-child { margin-left: 0; } .ant-btn-group > .ant-btn:first-child:not(:last-child) { border-bottom-right-radius: 0; border-top-right-radius: 0; padding-right: 8px; } .ant-btn-group > .ant-btn:last-child:not(:first-child) { border-bottom-left-radius: 0; border-top-left-radius: 0; padding-left: 8px; } .ant-btn-group > .ant-btn-group { float: left; } .ant-btn-group > .ant-btn-group:not(:first-child):not(:last-child) > .ant-btn { border-radius: 0; } .ant-btn-group > .ant-btn-group:first-child:not(:last-child) > .ant-btn:last-child { border-bottom-right-radius: 0; border-top-right-radius: 0; padding-right: 8px; } .ant-btn-group > .ant-btn-group:last-child:not(:first-child) > .ant-btn:first-child { border-bottom-left-radius: 0; border-top-left-radius: 0; padding-left: 8px; } .ant-btn:not(.ant-btn-circle):not(.ant-btn-circle-outline).ant-btn-icon-only { padding-left: 8px; padding-right: 8px; } .ant-btn > .anticon + span, .ant-btn > span + .anticon { margin-left: 0.5em; } .ant-btn-clicked:after { content: ''; position: absolute; top: -1px; left: -1px; bottom: -1px; right: -1px; border-radius: inherit; border: 0 solid #2db7f5; opacity: 0.4; -webkit-animation: buttonEffect 0.36s ease-out forwards; animation: buttonEffect 0.36s ease-out forwards; display: block; } @-webkit-keyframes buttonEffect { to { opacity: 0; top: -6px; left: -6px; bottom: -6px; right: -6px; border-width: 6px; } } @keyframes buttonEffect { to { opacity: 0; top: -6px; left: -6px; bottom: -6px; right: -6px; border-width: 6px; } }