ant-design/components/badge/style/index.less

239 lines
4.8 KiB
Plaintext
Raw Normal View History

meger feature to master (#16421) * use ul in list * update snapshot * update comment * feat: TreeSelect support `showSearch` in multiple mode (#15933) * update rc-tree-select * typo * update desc & snapshot * update desc & snapshot * check default showSearch * feat: table customizing variable (#15971) * feat: added table selected row color variable * fix: @table-selected-row-color default is inherit * feat: Upload support customize previewFile (#15984) * support preview file * use promise * dealy load * use canvas of render * use domHook of test * update demo * add snapshot * update types * update testcase * feat: form customizing variables (#15954) * fix: added styling form input background-color * feat: added '@form-warning-input-bg' variable * feat: added '@form-error-input-bg' variable * use li wrap with comment * feat: Support append theme less file with less-variable (#16118) * add override * add override support * update doc * feat: dropdown support set right icon * docs: update doc of dropdown component * style: format dropdown-button.md * test: update updateSnapshot * style: format dropdown-button.md * test: update updateSnapshot * test: update updateSnapshot * style: change style of dropdown-button demo * fix: fix document table order * feat: Support SkeletonAvatarProps.size accept number (#16078) (#16128) * chore:update style of demo * feat: Notification functions accept top, bottom and getContainer as arguments * drawer: add afterVisibleChange * rm onVisibleChange * update * feat: 🇭🇷 hr_HR locale (#16258) * Added Croatian locale * fixed lint error * :white_check_mark: Add test cases for hr_HR * :memo: update i18n documentation * feat: add `htmlFor` in Form.Item (#16278) * add htmlFor in Form.Item * update doc * feat: Button support `link` type (#16289) close #15892 * feat: Add Timeline.Item.position (#16148) (#16193) * fix: Timeline.pendingDot interface documentation there is a small problem (#16177) * feat: Add Timeline.Item.position (#16148) * doc: add version infomation for Timeline.Item.position * refactor: Update Tree & TreeSelect deps (#16330) * use CSSMotion * update snapshot * feat: Collapse support `expandIconPosition` (#16365) * update doc * support expandIconPosition * update snapshot * feat: Breadcrumb support DropDown (#16315) * breadcrumbs support drop down menu * update doc * add require less * fix test * fix md doc * less code * fix style warning * update snap * add children render test * feat: TreeNode support checkable * feat: add optional to support top and left slick dots (#16186) (#16225) * add optional to support top and left slick dots * update carousel snapshot * Update doc, add placement demo * update carousel placement demo snapshots * rename dots placement to position * update vertical as deprecated * rename dotsPosition to dotPosition * refine code * add warning testcase for vertical * remove unused warning * update expression * Additional test case for dotPosition * refactor: Upgrade `rc-tree-select` to support pure React motion (#16402) * upgrade `rc-tree-select` * update snapshot * 3.17.0 changelog * fix warning * fix review warning
2019-05-06 12:04:39 +08:00
@import '../../style/themes/index';
2018-12-07 16:17:45 +08:00
@import '../../style/mixins/index';
2018-12-07 16:17:45 +08:00
@badge-prefix-cls: ~'@{ant-prefix}-badge';
@number-prefix-cls: ~'@{ant-prefix}-scroll-number';
2015-09-01 13:59:07 +08:00
.@{badge-prefix-cls} {
.reset-component();
2019-04-15 10:52:00 +08:00
2015-09-01 13:59:07 +08:00
position: relative;
display: inline-block;
line-height: 1;
2015-09-01 13:59:07 +08:00
&-count {
z-index: @zindex-badge;
min-width: @badge-height;
height: @badge-height;
padding: 0 6px;
color: @badge-text-color;
2018-02-14 12:35:52 +08:00
font-weight: @badge-font-weight;
font-size: @badge-font-size;
line-height: @badge-height;
2015-09-01 13:59:07 +08:00
white-space: nowrap;
text-align: center;
background: @badge-color;
border-radius: (@badge-height / 2);
box-shadow: 0 0 0 1px @shadow-color-inverse;
2015-11-26 19:32:55 +08:00
a,
a:hover {
color: @badge-text-color;
2015-09-01 13:59:07 +08:00
}
}
&-count-sm {
min-width: @badge-height-sm;
height: @badge-height-sm;
padding: 0;
font-size: @badge-font-size-sm;
line-height: @badge-height-sm;
border-radius: (@badge-height-sm / 2);
}
2017-10-18 17:19:42 +08:00
&-multiple-words {
padding: 0 8px;
}
2015-09-01 13:59:07 +08:00
&-dot {
z-index: @zindex-badge;
width: @badge-dot-size;
min-width: @badge-dot-size;
height: @badge-dot-size;
2016-11-09 21:30:02 +08:00
background: @highlight-color;
border-radius: 100%;
2019-01-06 13:34:41 +08:00
box-shadow: 0 0 0 1px @shadow-color-inverse;
2015-09-01 13:59:07 +08:00
}
2015-11-19 00:13:16 +08:00
2018-08-20 14:53:58 +08:00
&-count,
&-dot,
.@{number-prefix-cls}-custom-component {
2018-08-20 14:53:58 +08:00
position: absolute;
top: 0;
right: 0;
transform: translate(50%, -50%);
transform-origin: 100% 0%;
}
&-status {
2016-10-12 19:42:10 +08:00
line-height: inherit;
vertical-align: baseline;
2016-10-12 19:42:10 +08:00
&-dot {
position: relative;
top: -1px;
display: inline-block;
width: @badge-status-size;
height: @badge-status-size;
vertical-align: middle;
border-radius: 50%;
2016-10-12 19:42:10 +08:00
}
&-success {
background-color: @success-color;
}
&-processing {
position: relative;
background-color: @processing-color;
&::after {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
border: 1px solid @processing-color;
border-radius: 50%;
animation: antStatusProcessing 1.2s infinite ease-in-out;
content: '';
}
}
&-default {
background-color: @normal-color;
}
&-error {
background-color: @error-color;
}
&-warning {
background-color: @warning-color;
}
// mixin to iterate over colors and create CSS class for each one
.make-color-classes(@i: length(@preset-colors)) when (@i > 0) {
.make-color-classes(@i - 1);
@color: extract(@preset-colors, @i);
@darkColor: '@{color}-6';
&-@{color} {
background: @@darkColor;
}
}
.make-color-classes();
&-text {
margin-left: 8px;
color: @text-color;
2017-08-08 14:23:50 +08:00
font-size: @font-size-base;
}
}
2015-11-19 00:13:16 +08:00
&-zoom-appear,
&-zoom-enter {
animation: antZoomBadgeIn @animation-duration-slow @ease-out-back;
2015-11-19 00:13:16 +08:00
animation-fill-mode: both;
}
&-zoom-leave {
animation: antZoomBadgeOut @animation-duration-slow @ease-in-back;
2015-11-19 00:13:16 +08:00
animation-fill-mode: both;
}
&-not-a-wrapper {
.@{badge-prefix-cls}-zoom-appear,
.@{badge-prefix-cls}-zoom-enter {
animation: antNoWrapperZoomBadgeIn @animation-duration-slow @ease-out-back;
}
.@{badge-prefix-cls}-zoom-leave {
animation: antNoWrapperZoomBadgeOut @animation-duration-slow @ease-in-back;
}
&:not(.@{badge-prefix-cls}-status) {
vertical-align: middle;
}
2018-03-23 11:45:39 +08:00
2021-01-28 18:16:05 +08:00
.@{number-prefix-cls}-custom-component {
transform: none;
}
.@{number-prefix-cls}-custom-component,
.@{ant-prefix}-scroll-number {
position: relative;
top: auto;
display: block;
transform-origin: 50% 50%;
}
.@{badge-prefix-cls}-count {
transform: none;
}
}
2015-09-01 13:59:07 +08:00
}
2015-09-01 17:16:51 +08:00
@keyframes antStatusProcessing {
0% {
transform: scale(0.8);
opacity: 0.5;
2017-02-13 15:01:02 +08:00
}
100% {
transform: scale(2.4);
opacity: 0;
}
}
2015-11-26 19:32:55 +08:00
.@{number-prefix-cls} {
2015-11-19 16:58:56 +08:00
overflow: hidden;
2015-11-26 19:32:55 +08:00
&-only {
2015-11-19 16:58:56 +08:00
display: inline-block;
height: @badge-height;
transition: all @animation-duration-slow @ease-in-out;
> p.@{number-prefix-cls}-only-unit {
height: @badge-height;
margin: 0;
}
2015-11-19 16:58:56 +08:00
}
&-symbol {
vertical-align: top;
}
2015-11-19 16:58:56 +08:00
}
2015-11-19 00:13:16 +08:00
@keyframes antZoomBadgeIn {
0% {
transform: scale(0) translate(50%, -50%);
opacity: 0;
2015-11-19 00:13:16 +08:00
}
100% {
transform: scale(1) translate(50%, -50%);
2015-11-19 00:13:16 +08:00
}
}
@keyframes antZoomBadgeOut {
0% {
transform: scale(1) translate(50%, -50%);
2015-11-19 00:13:16 +08:00
}
100% {
transform: scale(0) translate(50%, -50%);
opacity: 0;
2015-11-19 00:13:16 +08:00
}
}
@keyframes antNoWrapperZoomBadgeIn {
0% {
transform: scale(0);
opacity: 0;
}
100% {
transform: scale(1);
}
}
@keyframes antNoWrapperZoomBadgeOut {
0% {
transform: scale(1);
}
100% {
transform: scale(0);
opacity: 0;
}
}
2020-07-28 17:59:14 +08:00
@import './ribbon';
2020-07-31 15:18:00 +08:00
@import './rtl';