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

246 lines
5.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 20:02:01 +08:00
@import '../../style/mixins/index';
2018-12-07 20:02:01 +08:00
@dropdown-prefix-cls: ~'@{ant-prefix}-dropdown';
2015-06-09 15:21:44 +08:00
2015-08-20 16:55:42 +08:00
.@{dropdown-prefix-cls} {
.reset-component;
2019-04-15 10:52:00 +08:00
2015-06-09 15:21:44 +08:00
position: absolute;
top: -9999px;
left: -9999px;
2016-03-28 16:01:37 +08:00
z-index: @zindex-dropdown;
2015-06-09 15:21:44 +08:00
display: block;
2015-06-15 20:36:49 +08:00
&::before {
position: absolute;
top: -7px;
right: 0;
bottom: -7px;
left: -7px;
z-index: -9999;
opacity: 0.0001;
content: ' ';
}
2015-06-15 20:36:49 +08:00
&-wrap {
position: relative;
2015-10-09 14:38:26 +08:00
.@{ant-prefix}-btn > .@{iconfont-css-prefix}-down {
.iconfont-size-under-12px(10px);
2015-10-09 14:38:26 +08:00
}
.@{iconfont-css-prefix}-down::before {
2018-12-07 20:02:01 +08:00
transition: transform 0.2s;
2015-06-17 17:30:25 +08:00
}
}
&-wrap-open {
.@{iconfont-css-prefix}-down::before {
transform: rotate(180deg);
2015-06-17 17:30:25 +08:00
}
2015-06-15 20:36:49 +08:00
}
2015-06-09 15:21:44 +08:00
&-hidden,
&-menu-hidden {
2015-06-15 21:18:08 +08:00
display: none;
}
2015-06-09 15:21:44 +08:00
&-menu {
position: relative;
2015-06-17 20:09:47 +08:00
margin: 0;
padding: 4px 0;
2015-06-09 15:21:44 +08:00
text-align: left;
list-style-type: none;
background-color: @component-background;
background-clip: padding-box;
2015-11-05 21:25:43 +08:00
border-radius: @border-radius-base;
outline: none;
2015-12-02 11:53:37 +08:00
box-shadow: @box-shadow-base;
-webkit-transform: translate3d(0, 0, 0);
2015-06-09 15:21:44 +08:00
2017-09-25 21:28:00 +08:00
&-item-group-title {
padding: 5px @control-padding-horizontal;
color: @text-color-secondary;
2018-12-07 20:02:01 +08:00
transition: all 0.3s;
2017-09-25 21:28:00 +08:00
}
&-submenu-popup {
position: absolute;
2018-02-09 15:56:34 +08:00
z-index: @zindex-dropdown;
> .@{dropdown-prefix-cls}-menu {
transform-origin: 0 0;
}
}
&-item,
&-submenu-title {
2015-06-09 15:21:44 +08:00
clear: both;
margin: 0;
padding: 5px @control-padding-horizontal;
2016-11-08 20:50:59 +08:00
color: @text-color;
font-weight: normal;
font-size: @font-size-base;
line-height: 22px;
2015-06-09 15:21:44 +08:00
white-space: nowrap;
2015-07-13 18:42:08 +08:00
cursor: pointer;
2018-12-07 20:02:01 +08:00
transition: all 0.3s;
2015-06-09 15:21:44 +08:00
> .anticon:first-child {
min-width: 12px;
margin-right: 8px;
}
> a {
display: block;
margin: -5px -@control-padding-horizontal;
padding: 5px @control-padding-horizontal;
color: @text-color;
2018-12-07 20:02:01 +08:00
transition: all 0.3s;
2015-06-17 17:36:29 +08:00
}
&-selected,
&-selected > a {
color: @primary-color;
background-color: @item-active-bg;
}
2015-06-09 15:21:44 +08:00
&:hover {
background-color: @item-hover-bg;
2015-06-09 15:21:44 +08:00
}
&-disabled {
color: @disabled-color;
2015-06-09 15:21:44 +08:00
cursor: not-allowed;
&:hover {
color: @disabled-color;
background-color: @component-background;
2015-06-09 15:21:44 +08:00
cursor: not-allowed;
}
}
&-divider {
height: 1px;
margin: 4px 0;
2015-06-09 15:21:44 +08:00
overflow: hidden;
line-height: 0;
background-color: @border-color-split;
2015-06-09 15:21:44 +08:00
}
.@{dropdown-prefix-cls}-menu-submenu-arrow {
position: absolute;
right: @padding-xs;
2018-08-24 11:51:52 +08:00
&-icon {
color: @text-color-secondary;
font-style: normal;
.iconfont-size-under-12px(10px);
}
}
}
&-submenu-title {
padding-right: 26px;
}
&-submenu-vertical {
position: relative;
}
&-submenu-vertical > & {
position: absolute;
top: 0;
left: 100%;
min-width: 100%;
margin-left: 4px;
transform-origin: 0 0;
}
&-submenu&-submenu-disabled .@{dropdown-prefix-cls}-menu-submenu-title {
&,
2018-08-24 11:51:52 +08:00
.@{dropdown-prefix-cls}-menu-submenu-arrow-icon {
color: @disabled-color;
background-color: @component-background;
cursor: not-allowed;
}
}
2015-06-09 15:21:44 +08:00
}
2015-10-26 14:26:51 +08:00
&.slide-down-enter.slide-down-enter-active&-placement-bottomLeft,
&.slide-down-appear.slide-down-appear-active&-placement-bottomLeft,
&.slide-down-enter.slide-down-enter-active&-placement-bottomCenter,
&.slide-down-appear.slide-down-appear-active&-placement-bottomCenter,
&.slide-down-enter.slide-down-enter-active&-placement-bottomRight,
&.slide-down-appear.slide-down-appear-active&-placement-bottomRight {
2015-10-26 14:26:51 +08:00
animation-name: antSlideUpIn;
}
&.slide-up-enter.slide-up-enter-active&-placement-topLeft,
&.slide-up-appear.slide-up-appear-active&-placement-topLeft,
&.slide-up-enter.slide-up-enter-active&-placement-topCenter,
&.slide-up-appear.slide-up-appear-active&-placement-topCenter,
&.slide-up-enter.slide-up-enter-active&-placement-topRight,
&.slide-up-appear.slide-up-appear-active&-placement-topRight {
2015-10-26 14:26:51 +08:00
animation-name: antSlideDownIn;
}
&.slide-down-leave.slide-down-leave-active&-placement-bottomLeft,
&.slide-down-leave.slide-down-leave-active&-placement-bottomCenter,
&.slide-down-leave.slide-down-leave-active&-placement-bottomRight {
2015-10-26 14:26:51 +08:00
animation-name: antSlideUpOut;
}
&.slide-up-leave.slide-up-leave-active&-placement-topLeft,
&.slide-up-leave.slide-up-leave-active&-placement-topCenter,
&.slide-up-leave.slide-up-leave-active&-placement-topRight {
2015-10-26 14:26:51 +08:00
animation-name: antSlideDownOut;
}
2015-06-17 17:30:25 +08:00
}
2015-07-12 13:15:05 +08:00
.@{dropdown-prefix-cls}-trigger,
2015-08-20 16:55:42 +08:00
.@{dropdown-prefix-cls}-link {
> .@{iconfont-css-prefix}.@{iconfont-css-prefix}-down {
.iconfont-size-under-12px(10px);
2015-07-12 13:15:05 +08:00
}
}
2015-12-02 15:18:15 +08:00
.@{dropdown-prefix-cls}-button {
white-space: nowrap;
&.@{ant-prefix}-btn-group > .@{ant-prefix}-btn:last-child:not(:first-child) {
padding-right: @padding-xs;
padding-left: @padding-xs;
2015-12-02 15:18:15 +08:00
}
.@{iconfont-css-prefix}.@{iconfont-css-prefix}-down {
.iconfont-size-under-12px(10px);
2015-12-02 15:18:15 +08:00
}
}
// https://github.com/ant-design/ant-design/issues/4903
.@{dropdown-prefix-cls}-menu-dark {
&,
.@{dropdown-prefix-cls}-menu {
background: @menu-dark-bg;
}
.@{dropdown-prefix-cls}-menu-item,
.@{dropdown-prefix-cls}-menu-submenu-title,
.@{dropdown-prefix-cls}-menu-item > a {
color: @text-color-secondary-dark;
.@{dropdown-prefix-cls}-menu-submenu-arrow::after {
color: @text-color-secondary-dark;
}
&:hover {
color: @text-color-inverse;
background: transparent;
}
}
.@{dropdown-prefix-cls}-menu-item-selected {
&,
&:hover,
> a {
color: @text-color-inverse;
background: @primary-color;
}
}
}