diff --git a/style/components/affix.less b/style/components/affix.less index 0a56b4143f..f30b360dbc 100644 --- a/style/components/affix.less +++ b/style/components/affix.less @@ -1,4 +1,4 @@ .ant-affix { position: fixed; - z-index: 10; + z-index: @zindex-affix; } diff --git a/style/components/datepicker/Picker.less b/style/components/datepicker/Picker.less index 00ccb5f37a..d216667164 100644 --- a/style/components/datepicker/Picker.less +++ b/style/components/datepicker/Picker.less @@ -1,6 +1,6 @@ .@{calendar-prefix-cls}-picker-container { position: absolute; - z-index: 1070; + z-index: @zindex-picker; &.slide-up-enter.slide-up-enter-active&-placement-topLeft, &.slide-up-enter.slide-up-enter-active&-placement-topRight, diff --git a/style/components/dialog/Dialog.less b/style/components/dialog/Dialog.less index b2b265f2a7..accf86ad21 100644 --- a/style/components/dialog/Dialog.less +++ b/style/components/dialog/Dialog.less @@ -3,7 +3,7 @@ position: absolute; left: -9999px; top: -9999px; - z-index: 1000; + z-index: @zindex-modal; &-wrap * { box-sizing: border-box; diff --git a/style/components/dialog/Mask.less b/style/components/dialog/Mask.less index fb526fc85e..b9d7ff84c2 100644 --- a/style/components/dialog/Mask.less +++ b/style/components/dialog/Mask.less @@ -8,7 +8,7 @@ background-color: #373737; background-color: rgba(55, 55, 55, 0.6); height: 100%; - z-index: 1000; + z-index: @zindex-modal-mask; filter: ~"alpha(opacity=50)"; &-hidden { diff --git a/style/components/dropdown.less b/style/components/dropdown.less index 0a5bdc877a..b2ffe76eaa 100644 --- a/style/components/dropdown.less +++ b/style/components/dropdown.less @@ -5,7 +5,7 @@ position: absolute; left: -9999px; top: -9999px; - z-index: 1070; + z-index: @zindex-dropdown; display: block; font-size: 12px; font-weight: normal; diff --git a/style/components/menu.less b/style/components/menu.less index 08663df8b4..ca35e570d8 100644 --- a/style/components/menu.less +++ b/style/components/menu.less @@ -6,7 +6,7 @@ margin-bottom: 0; padding-left: 0; // Override default ul/ol list-style: none; - z-index: 999; + z-index: @zindex-dropdown; box-shadow: @box-shadow-base; color: @text-color; background: #fff; @@ -96,7 +96,7 @@ position: absolute; min-width: 100%; margin-top: 7px; - z-index: 1070; + z-index: @zindex-dropdown; } &-submenu-vertical > & { @@ -105,7 +105,7 @@ position: absolute; min-width: 160px; margin-left: 4px; - z-index: 1070; + z-index: @zindex-dropdown; } &-item, diff --git a/style/components/message.less b/style/components/message.less index d9a77ae16f..7a022aa655 100644 --- a/style/components/message.less +++ b/style/components/message.less @@ -3,7 +3,7 @@ .@{message-prefix-cls} { font-size: 12px; position: fixed; - z-index: 1050; + z-index: @zindex-message; width: 100%; top: 16px; left: 0; diff --git a/style/components/notification.less b/style/components/notification.less index 1522918277..fe30ccddc1 100644 --- a/style/components/notification.less +++ b/style/components/notification.less @@ -8,7 +8,7 @@ .@{notification-prefix-cls} { position: fixed; - z-index: 1000; + z-index: @zindex-notification; width: @notice-width; margin-right: 24px; diff --git a/style/components/popover.less b/style/components/popover.less index cf24939d73..b39ebbb130 100644 --- a/style/components/popover.less +++ b/style/components/popover.less @@ -31,7 +31,7 @@ position: absolute; top: 0; left: 0; - z-index: 1080; + z-index: @zindex-popover; cursor: auto; user-select: text; white-space: normal; diff --git a/style/components/select.less b/style/components/select.less index 88860d7c64..4157f32a92 100644 --- a/style/components/select.less +++ b/style/components/select.less @@ -363,7 +363,7 @@ box-shadow: @box-shadow-base; border-radius: @border-radius-base; box-sizing: border-box; - z-index: 1070; + z-index: @zindex-dropdown; left: -9999px; top: -9999px; position: absolute; diff --git a/style/components/timepicker/Picker.less b/style/components/timepicker/Picker.less index a56bf7c2d6..a7ef595b51 100644 --- a/style/components/timepicker/Picker.less +++ b/style/components/timepicker/Picker.less @@ -1,6 +1,6 @@ .@{timepicker-prefix-cls}-panel { max-width: 168px; - z-index: 1070; + z-index: @zindex-picker; position: absolute; &.slide-up-enter.slide-up-enter-active&-placement-topLeft, diff --git a/style/components/tooltip.less b/style/components/tooltip.less index 10e03d6e48..1968b7ab90 100644 --- a/style/components/tooltip.less +++ b/style/components/tooltip.less @@ -24,7 +24,7 @@ // Base class .@{tooltip-prefix-cls} { position: absolute; - z-index: 1070; + z-index: @zindex-tooltip; display: block; visibility: visible; // remove left/top by yiminghe diff --git a/style/themes/default/custom.less b/style/themes/default/custom.less index cba20d0978..9871a70bca 100644 --- a/style/themes/default/custom.less +++ b/style/themes/default/custom.less @@ -112,6 +112,17 @@ @container-md : (940px + @grid-gutter-width); @container-lg : (1140px + @grid-gutter-width); +// z-index list +@zindex-affix : 10; +@zindex-modal-mask : 990; +@zindex-modal : 1000; +@zindex-notification : 1010; +@zindex-message : 1010; +@zindex-popover : 1030; +@zindex-picker : 1050; +@zindex-dropdown : 1050; +@zindex-tooltip : 1060; + // Form // -------------------------------- // Legend