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

215 lines
4.4 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';
@import './customize.less';
2015-07-28 15:40:28 +08:00
2018-12-07 16:17:45 +08:00
@notification-prefix-cls: ~'@{ant-prefix}-notification';
@notification-width: 384px;
@notification-padding-vertical: 16px;
@notification-padding-horizontal: 24px;
@notification-padding: @notification-padding-vertical @notification-padding-horizontal;
@notification-margin-bottom: 16px;
2015-07-28 15:40:28 +08:00
2015-08-20 16:55:42 +08:00
.@{notification-prefix-cls} {
.reset-component;
2015-07-28 15:40:28 +08:00
position: fixed;
2016-03-28 16:01:37 +08:00
z-index: @zindex-notification;
width: @notification-width;
2018-12-07 16:17:45 +08:00
max-width: ~'calc(100vw - 32px)';
2015-08-03 15:17:12 +08:00
margin-right: 24px;
2015-07-28 15:40:28 +08:00
&-topLeft,
&-bottomLeft {
margin-right: 0;
margin-left: 24px;
.@{notification-prefix-cls}-fade-enter.@{notification-prefix-cls}-fade-enter-active,
.@{notification-prefix-cls}-fade-appear.@{notification-prefix-cls}-fade-appear-active {
animation-name: NotificationLeftFadeIn;
}
}
&-close-icon {
font-size: @font-size-base;
cursor: pointer;
}
&-hook-holder,
2015-07-28 15:40:28 +08:00
&-notice {
position: relative;
margin-bottom: @notification-margin-bottom;
2015-07-28 15:40:28 +08:00
overflow: hidden;
background: @notification-bg;
border-radius: @border-radius-base;
box-shadow: @shadow-2;
}
&-hook-holder > &-notice {
margin-bottom: 0;
box-shadow: none;
}
&-notice {
padding: @notification-padding;
line-height: @line-height-base;
2015-07-28 15:40:28 +08:00
2016-04-10 13:08:56 +08:00
&-message {
display: inline-block;
margin-bottom: 8px;
color: @heading-color;
font-size: @font-size-lg;
line-height: 24px;
// https://github.com/ant-design/ant-design/issues/5846#issuecomment-296244140
&-single-line-auto-margin {
display: block;
2018-12-07 16:17:45 +08:00
width: ~'calc(@{notification-width} - @{notification-padding-horizontal} * 2 - 24px - 48px - 100%)';
max-width: 4px;
background-color: transparent;
pointer-events: none;
&::before {
display: block;
content: '';
}
}
2016-04-10 13:08:56 +08:00
}
&-description {
font-size: @font-size-base;
}
&-closable &-message {
2016-08-28 17:16:43 +08:00
padding-right: 24px;
}
&-with-icon &-message {
2016-04-10 13:08:56 +08:00
margin-bottom: 4px;
margin-left: 48px;
font-size: @font-size-lg;
2015-07-28 15:40:28 +08:00
}
2016-08-28 17:16:43 +08:00
&-with-icon &-description {
margin-left: 48px;
2016-04-10 13:08:56 +08:00
font-size: @font-size-base;
}
// Icon & color style in different selector level
// https://github.com/ant-design/ant-design/issues/16503
// https://github.com/ant-design/ant-design/issues/15512
&-icon {
position: absolute;
margin-left: 4px;
2018-09-06 23:14:14 +08:00
font-size: 24px;
line-height: 24px;
}
2016-04-10 13:08:56 +08:00
.@{iconfont-css-prefix}&-icon {
2016-04-10 13:08:56 +08:00
&-success {
color: @success-color;
2015-07-28 15:40:28 +08:00
}
2016-04-10 13:08:56 +08:00
&-info {
color: @info-color;
2015-07-28 15:40:28 +08:00
}
2016-04-10 13:08:56 +08:00
&-warning {
color: @warning-color;
}
&-error {
color: @error-color;
2015-07-28 15:40:28 +08:00
}
}
&-close {
position: absolute;
top: 16px;
right: 22px;
color: @text-color-secondary;
2015-07-28 15:40:28 +08:00
outline: none;
2016-08-28 17:16:43 +08:00
&:hover {
2019-12-02 13:23:30 +08:00
& when (@theme = dark) {
color: fade(@white, 85%);
}
2019-12-03 15:39:32 +08:00
& when not (@theme = dark) {
color: shade(@text-color-secondary, 40%);
}
2016-08-28 17:16:43 +08:00
}
2015-07-28 15:40:28 +08:00
}
2015-08-04 15:16:10 +08:00
2016-04-10 13:08:56 +08:00
&-btn {
2015-07-28 15:40:28 +08:00
float: right;
margin-top: 16px;
}
}
2015-11-26 19:32:55 +08:00
.notification-fade-effect {
2016-01-18 14:19:09 +08:00
animation-duration: 0.24s;
2015-08-12 18:08:06 +08:00
animation-timing-function: @ease-in-out;
animation-fill-mode: both;
2015-08-12 18:08:06 +08:00
}
2015-11-26 19:32:55 +08:00
&-fade-enter,
&-fade-appear {
2015-07-28 15:40:28 +08:00
opacity: 0;
2015-08-24 00:50:22 +08:00
.notification-fade-effect();
2019-04-15 10:52:00 +08:00
2015-08-12 18:08:06 +08:00
animation-play-state: paused;
2015-07-28 15:40:28 +08:00
}
2015-08-12 18:08:06 +08:00
&-fade-leave {
2015-08-24 00:50:22 +08:00
.notification-fade-effect();
2019-04-15 10:52:00 +08:00
2016-01-18 14:19:09 +08:00
animation-duration: 0.2s;
2015-08-12 18:08:06 +08:00
animation-play-state: paused;
2015-07-28 15:40:28 +08:00
}
2015-11-26 19:32:55 +08:00
&-fade-enter&-fade-enter-active,
&-fade-appear&-fade-appear-active {
2015-08-12 18:08:06 +08:00
animation-name: NotificationFadeIn;
animation-play-state: running;
2015-07-28 15:40:28 +08:00
}
&-fade-leave&-fade-leave-active {
2015-08-12 18:08:06 +08:00
animation-name: NotificationFadeOut;
animation-play-state: running;
}
2015-11-26 19:32:55 +08:00
}
2015-08-12 18:08:06 +08:00
2015-11-26 19:32:55 +08:00
@keyframes NotificationFadeIn {
0% {
left: @notification-width;
opacity: 0;
2015-11-26 19:32:55 +08:00
}
100% {
left: 0;
opacity: 1;
2015-08-12 18:08:06 +08:00
}
2015-11-26 19:32:55 +08:00
}
2015-08-12 18:08:06 +08:00
@keyframes NotificationLeftFadeIn {
0% {
right: @notification-width;
opacity: 0;
}
100% {
right: 0;
opacity: 1;
}
}
2015-11-26 19:32:55 +08:00
@keyframes NotificationFadeOut {
0% {
max-height: 150px;
margin-bottom: @notification-margin-bottom;
padding-top: @notification-padding;
padding-bottom: @notification-padding;
opacity: 1;
2015-11-26 19:32:55 +08:00
}
100% {
max-height: 0;
2015-11-26 19:32:55 +08:00
margin-bottom: 0;
padding-top: 0;
padding-bottom: 0;
opacity: 0;
2015-07-28 15:40:28 +08:00
}
2015-08-04 15:16:10 +08:00
}