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

594 lines
13 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';
@import './status';
2018-12-07 20:02:01 +08:00
@menu-prefix-cls: ~'@{ant-prefix}-menu';
2015-08-06 16:49:54 +08:00
2015-11-12 14:57:54 +08:00
// default theme
2015-08-20 16:55:42 +08:00
.@{menu-prefix-cls} {
.reset-component;
2019-04-15 10:52:00 +08:00
2015-08-06 16:49:54 +08:00
margin-bottom: 0;
padding-left: 0; // Override default ul/ol
2018-01-25 10:59:49 +08:00
color: @menu-item-color;
font-size: @menu-item-font-size;
2017-10-12 18:14:07 +08:00
line-height: 0; // Fix display inline-block gap
text-align: left;
list-style: none;
background: @menu-bg;
outline: none;
box-shadow: @box-shadow-base;
transition: background 0.3s, width 0.3s cubic-bezier(0.2, 0, 0, 1) 0s;
2017-10-12 18:14:07 +08:00
.clearfix;
2015-08-06 16:49:54 +08:00
ul,
ol {
margin: 0;
padding: 0;
list-style: none;
}
2015-11-04 23:14:49 +08:00
&-hidden {
display: none;
}
2015-08-06 16:49:54 +08:00
&-item-group-title {
height: @menu-item-group-height;
padding: 8px 16px;
2018-01-25 10:59:49 +08:00
color: @menu-item-group-title-color;
font-size: @menu-item-group-title-font-size;
line-height: @menu-item-group-height;
2018-12-07 20:02:01 +08:00
transition: all 0.3s;
2015-08-06 16:49:54 +08:00
}
&-horizontal &-submenu {
transition: border-color 0.3s @ease-in-out, background 0.3s @ease-in-out;
}
2016-03-22 20:43:57 +08:00
&-submenu,
&-submenu-inline {
2018-12-07 20:02:01 +08:00
transition: border-color 0.3s @ease-in-out, background 0.3s @ease-in-out,
padding 0.15s @ease-in-out;
}
2019-06-11 12:00:52 +08:00
&-submenu-selected {
color: @menu-highlight-color;
}
&-item:active,
&-submenu-title:active {
2018-01-25 10:59:49 +08:00
background: @menu-item-active-bg;
}
2016-03-22 20:43:57 +08:00
&-submenu &-sub {
cursor: initial;
2018-12-07 20:02:01 +08:00
transition: background 0.3s @ease-in-out, padding 0.3s @ease-in-out;
2016-03-22 20:43:57 +08:00
}
&-item a {
2018-01-25 10:59:49 +08:00
color: @menu-item-color;
2016-01-14 11:54:46 +08:00
&:hover {
2018-01-25 10:59:49 +08:00
color: @menu-highlight-color;
2016-01-14 11:54:46 +08:00
}
&::before {
2016-06-25 15:09:23 +08:00
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
background-color: transparent;
2018-12-07 20:02:01 +08:00
content: '';
2016-06-25 15:09:23 +08:00
}
2016-01-14 11:54:46 +08:00
}
// https://github.com/ant-design/ant-design/issues/19809
&-item > .@{ant-prefix}-badge a {
color: @menu-item-color;
&:hover {
color: @menu-highlight-color;
}
}
&-item-divider {
height: 1px;
overflow: hidden;
line-height: 0;
background-color: @border-color-split;
}
2016-06-25 15:09:23 +08:00
&-item:hover,
2015-11-14 16:37:42 +08:00
&-item-active,
2017-02-22 14:47:01 +08:00
&:not(&-inline) &-submenu-open,
2016-04-05 17:42:32 +08:00
&-submenu-active,
2015-11-14 16:37:42 +08:00
&-submenu-title:hover {
2018-01-25 10:59:49 +08:00
color: @menu-highlight-color;
2015-08-06 16:49:54 +08:00
}
2015-11-14 20:41:10 +08:00
&-horizontal &-item,
&-horizontal &-submenu {
margin-top: -1px;
}
2016-06-25 15:09:23 +08:00
&-horizontal > &-item:hover,
2015-11-14 16:37:42 +08:00
&-horizontal > &-item-active,
&-horizontal > &-submenu &-submenu-title:hover {
background-color: transparent;
2015-08-06 16:49:54 +08:00
}
2015-11-14 16:37:42 +08:00
&-item-selected {
2018-01-25 10:59:49 +08:00
color: @menu-highlight-color;
a,
a:hover {
2018-01-25 10:59:49 +08:00
color: @menu-highlight-color;
2016-04-13 14:46:08 +08:00
}
2015-11-14 16:37:42 +08:00
}
2015-11-05 19:26:53 +08:00
2016-12-04 19:26:11 +08:00
&:not(&-horizontal) &-item-selected {
2018-01-25 10:59:49 +08:00
background-color: @menu-item-active-bg;
2016-12-04 19:26:11 +08:00
}
&-inline,
&-vertical,
&-vertical-left {
border-right: @border-width-base @border-style-base @border-color-split;
}
feat: added rtl direction to all of ant-design components (#19380) * rtl demo change en-us description * change bundlesize css limit * RTL: modal component (exclude confirm) * RTL: table component * RTL: pagination component * cleanup rtl demo * fix pagination.tsx compile error * RTL: button and button-group * RTL: Steps component * fix rtl demo style * fix input suffix icon alignment * fix select component arrow issue * RTL: form component * add pagination rtl test * fix test lint error * RTL: rate component * RTL: radio and radio group components * RTL: tree-select component * some fixes to RTL components * RTL: badge component * fix rtl issue in inline form * fix input component rtl padding issue * fix switch component text rtl issue * fix table grouped header text-align * add rtl support to whole demo with RTL button * Update rtl demo responsive * RTL: page-header component * RTL: typography component * RTL: Dropdown (Partial) * update config-provider doc * RTL: input component * RTL: select component * RTL: switch component * RTL: tree component * fix rtl demo lint * rtl demo change en-us description * RTL: modal component (exclude confirm) * RTL: table component * RTL: pagination component * cleanup rtl demo * RTL: button and button-group * RTL: Steps component * fix rtl demo style * fix input suffix icon alignment * RTL: form component * RTL: rate component * RTL: radio and radio group components * RTL: tree-select component * RTL: badge component * fix rtl issue in inline form * fix input component rtl padding issue * add rtl support to whole demo with RTL button * fix lost changes after rebase * fix lint errors * RTL: Transfer Component * RTL: upload component * RTL: update avatar demo * RTL: comment component * RTL: collapse component * RTL: carousel component * update snapshots * RTL: Card component * RTL: descriptions component * RTL: Empty component * RTL: list component * RTL: slider component * slider component import/order * add shared rtlTest * RTL: Statistic component * RTL: tooltip components * RTL: popover component * RTL: timeline component * RTL: tag component * RTL: alert component * RTL: drawer component * RTL: Tab component * change direction definition * RTL: progress component * input.tsx, remove duplicate after rebase * fix demo.less after rebase * fix ant-row-rtl after rebase * fix upload issues in rtl * badge rtl demo margin fix * fix: tabs with icon margin * fix: radio-wrapper margin * fix: table component after rebase * fix: centered modal text-align * update slider snapshot * RTL: popconfirm component * RTL: back-top component * RTL: spin component * RTL: result component * RTL: skeleton component * RTL: menu component * RTL: time-picker component * RTL: calendar component * RTL: date-picker component * RTL: home page * update snapshots * test: add auto-complete rtl test * test: add avatar component rtl tests * test: add badge component rtl tests * test: add breadcrumb component rtl tests * test: add button components rtl tests * test: add card component rtl tests * test: add carousel component rtl tests * test: add cascader component rtl tests * test: add checkbox component rtl tests * test: add collapse component rtl tests * test: add comment component rtl tests * test: add dropdown component rtl tests * test: add empty component rtl tests * test: add form component rtl tests * test: add grid component rtl tests * test: add input component rtl tests * test: add search component rtl tests * test: add input-number component rtl tests * test: add layout component rtl tests * test: add list component rtl tests * test: add mentions component rtl tests * test: add modal component rtl tests * test: add page-header component rtl tests * test: add pagination component rtl tests * test: add radio component rtl tests * test: add rate component rtl tests * test: add select component rtl tests * test: add slider component rtl tests * test: add steps component rtl tests * test: add switch component rtl tests * test: add table component rtl tests * test: add transfer component rtl tests * test: add tree component rtl tests * test: add tree-select component rtl tests * test: add typography component rtl tests * test: add upload component rtl tests * test: add affix component rtl tests * update calendar tests * increase css file maxSize * update snapshots * remove workflows to allow push * remove duplicate reverse prop from slider * fix: remove table demo from config-provider * fix: remove table demo from config-provider * fix lint error * Added direction property to ConfigProvider * cascader rtl tests added * update config-provider doc * RTL: grid system * RTL: input component * RTL: switch component * fix rtl demo lint * RTL: modal component (exclude confirm) * RTL: table component * RTL: pagination component * cleanup rtl demo * fix pagination.tsx compile error * RTL: button and button-group * RTL: Steps component * fix rtl demo style * RTL: form component * add pagination rtl test * RTL: rate component * RTL: radio and radio group components * RTL: tree-select component * RTL: badge component * fix rtl issue in inline form * fix input component rtl padding issue * add rtl support to whole demo with RTL button * RTL: input component * RTL: select component * RTL: switch component * RTL: tree component * fix rtl demo lint * rtl demo change en-us description * RTL: modal component (exclude confirm) * RTL: table component * RTL: pagination component * cleanup rtl demo * RTL: button and button-group * RTL: Steps component * fix rtl demo style * fix input suffix icon alignment * RTL: form component * RTL: rate component * RTL: radio and radio group components * RTL: tree-select component * RTL: badge component * fix rtl issue in inline form * fix input component rtl padding issue * add rtl support to whole demo with RTL button * input.tsx, remove duplicate after rebase * fix ant-row-rtl after rebase * update snapshots * test: add cascader component rtl tests * test: add pagination component rtl tests * update calendar tests * update snapshots * fix: remove table demo from config-provider * fix: remove table demo from config-provider * fix lint error * update direction.md icons * dropdown and cascader default placement in rtl * update snapshots * fix lint errors * remove duplicate import * update snapshots * update snapshot * update calendar snapshot * update snapshots * integrate with new rc-picker * update snapshots * fix lint errors * update snapshot * update snapshots * update snapshots * update snapshots :| * update snapshots * fix compile error. * fix typo after rebase * update snapshots * remove workflows to allow push * update snapshots * update snapshots * fix dist error * front-page css fix * update snapshots * fix lint and test issues * restore cascader index.less * update snapshots * fix logo in rtl and demo controls * ci errors * resolve steps/index.tsx conflicts * tooltip family demo remove inline style * resolve table/Table.tsx conflicts * resolve modal/Modal.tsx conflicts * resolve cascader/index.tsx conflicts * add workflows from upstream * update snapshots * revert logo to default * fix codebox demo direction of placements * resolve tooltip overlayClassName conflicts * update snapshots * update popover test * fix: cascader miss popupClassName * fix: fix select missing dropdownClassName * chore: Update snapshot * chore: Adjust menu use rtl logic * docs: Update demo line color Co-authored-by: 二货机器人 <smith3816@gmail.com>
2020-01-02 19:10:16 +08:00
&-vertical-right {
border-left: @border-width-base @border-style-base @border-color-split;
}
&-vertical&-sub,
&-vertical-left&-sub,
&-vertical-right&-sub {
min-width: 160px;
max-height: calc(100vh - 100px);
padding: 0;
overflow: hidden;
border-right: 0;
// https://github.com/ant-design/ant-design/issues/22244
// https://github.com/ant-design/ant-design/issues/26812
&:not([class*='-active']) {
overflow-x: hidden;
overflow-y: auto;
}
2016-04-27 15:25:57 +08:00
.@{menu-prefix-cls}-item {
left: 0;
margin-left: 0;
border-right: 0;
&::after {
2017-04-02 14:43:34 +08:00
border-right: 0;
}
}
> .@{menu-prefix-cls}-item,
> .@{menu-prefix-cls}-submenu {
transform-origin: 0 0;
}
2016-04-27 15:25:57 +08:00
}
&-horizontal&-sub {
min-width: 114px; // in case of submenu width is too big: https://codesandbox.io/s/qvpwm6mk66
2015-08-06 16:49:54 +08:00
}
&-horizontal &-item,
&-horizontal &-submenu-title {
transition: border-color 0.3s, background 0.3s;
}
2015-11-14 17:51:09 +08:00
&-item,
&-submenu-title {
2015-08-06 16:49:54 +08:00
position: relative;
display: block;
margin: 0;
padding: @menu-item-padding;
2015-08-06 16:49:54 +08:00
white-space: nowrap;
cursor: pointer;
transition: border-color 0.3s, background 0.3s, padding 0.15s @ease-in-out;
.@{menu-prefix-cls}-item-icon,
.@{iconfont-css-prefix} {
2016-05-16 14:35:24 +08:00
min-width: 14px;
margin-right: @menu-icon-margin-right;
2019-11-04 16:47:26 +08:00
font-size: @menu-icon-size;
transition: font-size 0.15s @ease-out, margin 0.3s @ease-in-out, color 0.3s;
2017-06-30 21:07:01 +08:00
+ span {
2017-07-25 10:30:36 +08:00
opacity: 1;
transition: opacity 0.3s @ease-in-out, width 0.3s @ease-in-out, color 0.3s;
2017-06-30 21:07:01 +08:00
}
2016-05-07 16:03:51 +08:00
}
&.@{menu-prefix-cls}-item-only-child {
> .@{iconfont-css-prefix},
> .@{menu-prefix-cls}-item-icon {
margin-right: 0;
}
}
2015-08-06 16:49:54 +08:00
}
2016-04-05 17:42:32 +08:00
2015-08-06 16:49:54 +08:00
& > &-item-divider {
height: 1px;
margin: 1px 0;
padding: 0;
overflow: hidden;
2015-08-06 16:49:54 +08:00
line-height: 0;
2017-03-25 20:31:24 +08:00
background-color: @border-color-split;
2015-08-06 16:49:54 +08:00
}
&-submenu {
&-popup {
position: absolute;
2017-11-20 14:58:03 +08:00
z-index: @zindex-dropdown;
background: transparent;
border-radius: @border-radius-base;
box-shadow: none;
transform-origin: 0 0;
// https://github.com/ant-design/ant-design/issues/13955
&::before {
position: absolute;
top: -7px;
right: 0;
bottom: 0;
left: 0;
z-index: -1;
width: 100%;
height: 100%;
2018-12-07 20:02:01 +08:00
opacity: 0.0001;
content: ' ';
}
}
2015-08-06 16:49:54 +08:00
// https://github.com/ant-design/ant-design/issues/13955
&-placement-rightTop::before {
top: 0;
left: -7px;
}
2015-08-20 16:55:42 +08:00
> .@{menu-prefix-cls} {
2019-12-26 14:06:32 +08:00
background-color: @menu-bg;
2017-03-25 20:31:24 +08:00
border-radius: @border-radius-base;
&-submenu-title::after {
2018-12-07 20:02:01 +08:00
transition: transform 0.3s @ease-in-out;
}
2015-08-06 16:49:54 +08:00
}
2019-12-26 14:06:32 +08:00
&-popup > .@{menu-prefix-cls} {
background-color: @menu-popup-bg;
}
&-expand-icon,
&-arrow {
position: absolute;
top: 50%;
right: 16px;
width: 10px;
color: @menu-item-color;
transform: translateY(-50%);
transition: transform 0.3s @ease-in-out;
}
feat: added rtl direction to all of ant-design components (#19380) * rtl demo change en-us description * change bundlesize css limit * RTL: modal component (exclude confirm) * RTL: table component * RTL: pagination component * cleanup rtl demo * fix pagination.tsx compile error * RTL: button and button-group * RTL: Steps component * fix rtl demo style * fix input suffix icon alignment * fix select component arrow issue * RTL: form component * add pagination rtl test * fix test lint error * RTL: rate component * RTL: radio and radio group components * RTL: tree-select component * some fixes to RTL components * RTL: badge component * fix rtl issue in inline form * fix input component rtl padding issue * fix switch component text rtl issue * fix table grouped header text-align * add rtl support to whole demo with RTL button * Update rtl demo responsive * RTL: page-header component * RTL: typography component * RTL: Dropdown (Partial) * update config-provider doc * RTL: input component * RTL: select component * RTL: switch component * RTL: tree component * fix rtl demo lint * rtl demo change en-us description * RTL: modal component (exclude confirm) * RTL: table component * RTL: pagination component * cleanup rtl demo * RTL: button and button-group * RTL: Steps component * fix rtl demo style * fix input suffix icon alignment * RTL: form component * RTL: rate component * RTL: radio and radio group components * RTL: tree-select component * RTL: badge component * fix rtl issue in inline form * fix input component rtl padding issue * add rtl support to whole demo with RTL button * fix lost changes after rebase * fix lint errors * RTL: Transfer Component * RTL: upload component * RTL: update avatar demo * RTL: comment component * RTL: collapse component * RTL: carousel component * update snapshots * RTL: Card component * RTL: descriptions component * RTL: Empty component * RTL: list component * RTL: slider component * slider component import/order * add shared rtlTest * RTL: Statistic component * RTL: tooltip components * RTL: popover component * RTL: timeline component * RTL: tag component * RTL: alert component * RTL: drawer component * RTL: Tab component * change direction definition * RTL: progress component * input.tsx, remove duplicate after rebase * fix demo.less after rebase * fix ant-row-rtl after rebase * fix upload issues in rtl * badge rtl demo margin fix * fix: tabs with icon margin * fix: radio-wrapper margin * fix: table component after rebase * fix: centered modal text-align * update slider snapshot * RTL: popconfirm component * RTL: back-top component * RTL: spin component * RTL: result component * RTL: skeleton component * RTL: menu component * RTL: time-picker component * RTL: calendar component * RTL: date-picker component * RTL: home page * update snapshots * test: add auto-complete rtl test * test: add avatar component rtl tests * test: add badge component rtl tests * test: add breadcrumb component rtl tests * test: add button components rtl tests * test: add card component rtl tests * test: add carousel component rtl tests * test: add cascader component rtl tests * test: add checkbox component rtl tests * test: add collapse component rtl tests * test: add comment component rtl tests * test: add dropdown component rtl tests * test: add empty component rtl tests * test: add form component rtl tests * test: add grid component rtl tests * test: add input component rtl tests * test: add search component rtl tests * test: add input-number component rtl tests * test: add layout component rtl tests * test: add list component rtl tests * test: add mentions component rtl tests * test: add modal component rtl tests * test: add page-header component rtl tests * test: add pagination component rtl tests * test: add radio component rtl tests * test: add rate component rtl tests * test: add select component rtl tests * test: add slider component rtl tests * test: add steps component rtl tests * test: add switch component rtl tests * test: add table component rtl tests * test: add transfer component rtl tests * test: add tree component rtl tests * test: add tree-select component rtl tests * test: add typography component rtl tests * test: add upload component rtl tests * test: add affix component rtl tests * update calendar tests * increase css file maxSize * update snapshots * remove workflows to allow push * remove duplicate reverse prop from slider * fix: remove table demo from config-provider * fix: remove table demo from config-provider * fix lint error * Added direction property to ConfigProvider * cascader rtl tests added * update config-provider doc * RTL: grid system * RTL: input component * RTL: switch component * fix rtl demo lint * RTL: modal component (exclude confirm) * RTL: table component * RTL: pagination component * cleanup rtl demo * fix pagination.tsx compile error * RTL: button and button-group * RTL: Steps component * fix rtl demo style * RTL: form component * add pagination rtl test * RTL: rate component * RTL: radio and radio group components * RTL: tree-select component * RTL: badge component * fix rtl issue in inline form * fix input component rtl padding issue * add rtl support to whole demo with RTL button * RTL: input component * RTL: select component * RTL: switch component * RTL: tree component * fix rtl demo lint * rtl demo change en-us description * RTL: modal component (exclude confirm) * RTL: table component * RTL: pagination component * cleanup rtl demo * RTL: button and button-group * RTL: Steps component * fix rtl demo style * fix input suffix icon alignment * RTL: form component * RTL: rate component * RTL: radio and radio group components * RTL: tree-select component * RTL: badge component * fix rtl issue in inline form * fix input component rtl padding issue * add rtl support to whole demo with RTL button * input.tsx, remove duplicate after rebase * fix ant-row-rtl after rebase * update snapshots * test: add cascader component rtl tests * test: add pagination component rtl tests * update calendar tests * update snapshots * fix: remove table demo from config-provider * fix: remove table demo from config-provider * fix lint error * update direction.md icons * dropdown and cascader default placement in rtl * update snapshots * fix lint errors * remove duplicate import * update snapshots * update snapshot * update calendar snapshot * update snapshots * integrate with new rc-picker * update snapshots * fix lint errors * update snapshot * update snapshots * update snapshots * update snapshots :| * update snapshots * fix compile error. * fix typo after rebase * update snapshots * remove workflows to allow push * update snapshots * update snapshots * fix dist error * front-page css fix * update snapshots * fix lint and test issues * restore cascader index.less * update snapshots * fix logo in rtl and demo controls * ci errors * resolve steps/index.tsx conflicts * tooltip family demo remove inline style * resolve table/Table.tsx conflicts * resolve modal/Modal.tsx conflicts * resolve cascader/index.tsx conflicts * add workflows from upstream * update snapshots * revert logo to default * fix codebox demo direction of placements * resolve tooltip overlayClassName conflicts * update snapshots * update popover test * fix: cascader miss popupClassName * fix: fix select missing dropdownClassName * chore: Update snapshot * chore: Adjust menu use rtl logic * docs: Update demo line color Co-authored-by: 二货机器人 <smith3816@gmail.com>
2020-01-02 19:10:16 +08:00
&-arrow {
&::before,
&::after {
position: absolute;
width: 6px;
height: 1.5px;
background-color: currentColor;
border-radius: 2px;
transition: background 0.3s @ease-in-out, transform 0.3s @ease-in-out, top 0.3s @ease-in-out,
color 0.3s @ease-in-out;
content: '';
}
&::before {
transform: rotate(45deg) translateY(-2.5px);
}
&::after {
transform: rotate(-45deg) translateY(2.5px);
}
2015-08-13 17:31:09 +08:00
}
2020-11-08 15:29:37 +08:00
&:hover > &-title > &-expand-icon,
&:hover > &-title > &-arrow {
color: @menu-highlight-color;
feat: added rtl direction to all of ant-design components (#19380) * rtl demo change en-us description * change bundlesize css limit * RTL: modal component (exclude confirm) * RTL: table component * RTL: pagination component * cleanup rtl demo * fix pagination.tsx compile error * RTL: button and button-group * RTL: Steps component * fix rtl demo style * fix input suffix icon alignment * fix select component arrow issue * RTL: form component * add pagination rtl test * fix test lint error * RTL: rate component * RTL: radio and radio group components * RTL: tree-select component * some fixes to RTL components * RTL: badge component * fix rtl issue in inline form * fix input component rtl padding issue * fix switch component text rtl issue * fix table grouped header text-align * add rtl support to whole demo with RTL button * Update rtl demo responsive * RTL: page-header component * RTL: typography component * RTL: Dropdown (Partial) * update config-provider doc * RTL: input component * RTL: select component * RTL: switch component * RTL: tree component * fix rtl demo lint * rtl demo change en-us description * RTL: modal component (exclude confirm) * RTL: table component * RTL: pagination component * cleanup rtl demo * RTL: button and button-group * RTL: Steps component * fix rtl demo style * fix input suffix icon alignment * RTL: form component * RTL: rate component * RTL: radio and radio group components * RTL: tree-select component * RTL: badge component * fix rtl issue in inline form * fix input component rtl padding issue * add rtl support to whole demo with RTL button * fix lost changes after rebase * fix lint errors * RTL: Transfer Component * RTL: upload component * RTL: update avatar demo * RTL: comment component * RTL: collapse component * RTL: carousel component * update snapshots * RTL: Card component * RTL: descriptions component * RTL: Empty component * RTL: list component * RTL: slider component * slider component import/order * add shared rtlTest * RTL: Statistic component * RTL: tooltip components * RTL: popover component * RTL: timeline component * RTL: tag component * RTL: alert component * RTL: drawer component * RTL: Tab component * change direction definition * RTL: progress component * input.tsx, remove duplicate after rebase * fix demo.less after rebase * fix ant-row-rtl after rebase * fix upload issues in rtl * badge rtl demo margin fix * fix: tabs with icon margin * fix: radio-wrapper margin * fix: table component after rebase * fix: centered modal text-align * update slider snapshot * RTL: popconfirm component * RTL: back-top component * RTL: spin component * RTL: result component * RTL: skeleton component * RTL: menu component * RTL: time-picker component * RTL: calendar component * RTL: date-picker component * RTL: home page * update snapshots * test: add auto-complete rtl test * test: add avatar component rtl tests * test: add badge component rtl tests * test: add breadcrumb component rtl tests * test: add button components rtl tests * test: add card component rtl tests * test: add carousel component rtl tests * test: add cascader component rtl tests * test: add checkbox component rtl tests * test: add collapse component rtl tests * test: add comment component rtl tests * test: add dropdown component rtl tests * test: add empty component rtl tests * test: add form component rtl tests * test: add grid component rtl tests * test: add input component rtl tests * test: add search component rtl tests * test: add input-number component rtl tests * test: add layout component rtl tests * test: add list component rtl tests * test: add mentions component rtl tests * test: add modal component rtl tests * test: add page-header component rtl tests * test: add pagination component rtl tests * test: add radio component rtl tests * test: add rate component rtl tests * test: add select component rtl tests * test: add slider component rtl tests * test: add steps component rtl tests * test: add switch component rtl tests * test: add table component rtl tests * test: add transfer component rtl tests * test: add tree component rtl tests * test: add tree-select component rtl tests * test: add typography component rtl tests * test: add upload component rtl tests * test: add affix component rtl tests * update calendar tests * increase css file maxSize * update snapshots * remove workflows to allow push * remove duplicate reverse prop from slider * fix: remove table demo from config-provider * fix: remove table demo from config-provider * fix lint error * Added direction property to ConfigProvider * cascader rtl tests added * update config-provider doc * RTL: grid system * RTL: input component * RTL: switch component * fix rtl demo lint * RTL: modal component (exclude confirm) * RTL: table component * RTL: pagination component * cleanup rtl demo * fix pagination.tsx compile error * RTL: button and button-group * RTL: Steps component * fix rtl demo style * RTL: form component * add pagination rtl test * RTL: rate component * RTL: radio and radio group components * RTL: tree-select component * RTL: badge component * fix rtl issue in inline form * fix input component rtl padding issue * add rtl support to whole demo with RTL button * RTL: input component * RTL: select component * RTL: switch component * RTL: tree component * fix rtl demo lint * rtl demo change en-us description * RTL: modal component (exclude confirm) * RTL: table component * RTL: pagination component * cleanup rtl demo * RTL: button and button-group * RTL: Steps component * fix rtl demo style * fix input suffix icon alignment * RTL: form component * RTL: rate component * RTL: radio and radio group components * RTL: tree-select component * RTL: badge component * fix rtl issue in inline form * fix input component rtl padding issue * add rtl support to whole demo with RTL button * input.tsx, remove duplicate after rebase * fix ant-row-rtl after rebase * update snapshots * test: add cascader component rtl tests * test: add pagination component rtl tests * update calendar tests * update snapshots * fix: remove table demo from config-provider * fix: remove table demo from config-provider * fix lint error * update direction.md icons * dropdown and cascader default placement in rtl * update snapshots * fix lint errors * remove duplicate import * update snapshots * update snapshot * update calendar snapshot * update snapshots * integrate with new rc-picker * update snapshots * fix lint errors * update snapshot * update snapshots * update snapshots * update snapshots :| * update snapshots * fix compile error. * fix typo after rebase * update snapshots * remove workflows to allow push * update snapshots * update snapshots * fix dist error * front-page css fix * update snapshots * fix lint and test issues * restore cascader index.less * update snapshots * fix logo in rtl and demo controls * ci errors * resolve steps/index.tsx conflicts * tooltip family demo remove inline style * resolve table/Table.tsx conflicts * resolve modal/Modal.tsx conflicts * resolve cascader/index.tsx conflicts * add workflows from upstream * update snapshots * revert logo to default * fix codebox demo direction of placements * resolve tooltip overlayClassName conflicts * update snapshots * update popover test * fix: cascader miss popupClassName * fix: fix select missing dropdownClassName * chore: Update snapshot * chore: Adjust menu use rtl logic * docs: Update demo line color Co-authored-by: 二货机器人 <smith3816@gmail.com>
2020-01-02 19:10:16 +08:00
}
&-inline &-arrow {
&::before {
transform: rotate(-45deg) translateX(2.5px);
}
&::after {
transform: rotate(45deg) translateX(-2.5px);
}
}
&-horizontal &-arrow {
display: none;
}
2020-11-08 15:29:37 +08:00
&-open&-inline > &-title > &-arrow {
transform: translateY(-2px);
&::after {
transform: rotate(-45deg) translateX(-2.5px);
}
&::before {
transform: rotate(45deg) translateX(2.5px);
2015-08-13 17:31:09 +08:00
}
2015-08-06 16:49:54 +08:00
}
}
2016-07-22 18:41:59 +08:00
&-vertical &-submenu-selected,
&-vertical-left &-submenu-selected,
&-vertical-right &-submenu-selected {
2018-01-25 10:59:49 +08:00
color: @menu-highlight-color;
2015-08-06 16:49:54 +08:00
}
&-horizontal {
line-height: @menu-horizontal-line-height;
2015-11-26 19:32:55 +08:00
border: 0;
border-bottom: @border-width-base @border-style-base @border-color-split;
2015-08-06 16:49:54 +08:00
box-shadow: none;
&:not(.@{menu-prefix-cls}-dark) {
> .@{menu-prefix-cls}-item,
> .@{menu-prefix-cls}-submenu {
margin: @menu-item-padding;
margin-top: -1px;
margin-bottom: 0;
padding: @menu-item-padding;
padding-right: 0;
padding-left: 0;
&:hover,
&-active,
&-open,
&-selected {
color: @menu-highlight-color;
border-bottom: 2px solid @menu-highlight-color;
}
}
}
2015-11-14 17:29:48 +08:00
> .@{menu-prefix-cls}-item,
> .@{menu-prefix-cls}-submenu {
position: relative;
top: 1px;
display: inline-block;
2018-09-03 14:35:44 +08:00
vertical-align: bottom;
2015-11-14 17:29:48 +08:00
border-bottom: 2px solid transparent;
}
2015-11-14 17:29:48 +08:00
> .@{menu-prefix-cls}-submenu > .@{menu-prefix-cls}-submenu-title {
padding: 0;
}
> .@{menu-prefix-cls}-item {
a {
color: @menu-item-color;
&:hover {
color: @menu-highlight-color;
}
&::before {
bottom: -2px;
}
}
&-selected a {
color: @menu-highlight-color;
2015-08-17 17:28:48 +08:00
}
2015-08-06 16:49:54 +08:00
}
&::after {
2015-08-06 16:49:54 +08:00
display: block;
clear: both;
height: 0;
content: '\20';
2015-08-06 16:49:54 +08:00
}
}
2015-11-26 19:32:55 +08:00
&-vertical,
&-vertical-left,
&-vertical-right,
2017-02-16 21:24:17 +08:00
&-inline {
.@{menu-prefix-cls}-item {
position: relative;
&::after {
position: absolute;
top: 0;
right: 0;
bottom: 0;
border-right: @menu-item-active-border-width solid @menu-highlight-color;
2018-12-07 20:02:01 +08:00
transform: scaleY(0.0001);
opacity: 0;
2018-12-07 20:02:01 +08:00
transition: transform 0.15s @ease-out, opacity 0.15s @ease-out;
content: '';
}
}
2017-02-16 21:24:17 +08:00
.@{menu-prefix-cls}-item,
.@{menu-prefix-cls}-submenu-title {
height: @menu-item-height;
margin-top: @menu-item-vertical-margin;
margin-bottom: @menu-item-vertical-margin;
padding: 0 16px;
overflow: hidden;
line-height: @menu-item-height;
text-overflow: ellipsis;
2015-08-06 16:49:54 +08:00
}
2017-11-20 14:37:14 +08:00
// disable margin collapsed
.@{menu-prefix-cls}-submenu {
padding-bottom: 0.02px;
2017-11-20 14:37:14 +08:00
}
.@{menu-prefix-cls}-item:not(:last-child) {
margin-bottom: @menu-item-boundary-margin;
2017-11-20 14:37:14 +08:00
}
> .@{menu-prefix-cls}-item,
> .@{menu-prefix-cls}-submenu > .@{menu-prefix-cls}-submenu-title {
height: @menu-inline-toplevel-item-height;
line-height: @menu-inline-toplevel-item-height;
}
2015-08-06 16:49:54 +08:00
}
2015-08-10 17:57:28 +08:00
&-vertical {
.@{menu-prefix-cls}-submenu-title {
padding-right: 34px;
}
}
2017-10-26 13:38:18 +08:00
&-inline {
width: 100%;
.@{menu-prefix-cls}-selected,
.@{menu-prefix-cls}-item-selected {
&::after {
2017-10-26 13:38:18 +08:00
transform: scaleY(1);
opacity: 1;
transition: transform 0.15s @ease-in-out, opacity 0.15s @ease-in-out;
2017-10-26 13:38:18 +08:00
}
}
.@{menu-prefix-cls}-item,
.@{menu-prefix-cls}-submenu-title {
2018-12-07 20:02:01 +08:00
width: ~'calc(100% + 1px)';
2017-10-26 13:38:18 +08:00
}
2018-01-23 21:00:11 +08:00
.@{menu-prefix-cls}-submenu-title {
padding-right: 34px;
}
2017-10-26 13:38:18 +08:00
}
2017-08-22 18:37:08 +08:00
&-inline-collapsed {
width: @menu-collapsed-width;
> .@{menu-prefix-cls}-item,
2018-12-07 20:02:01 +08:00
> .@{menu-prefix-cls}-item-group
> .@{menu-prefix-cls}-item-group-list
> .@{menu-prefix-cls}-item,
> .@{menu-prefix-cls}-item-group
> .@{menu-prefix-cls}-item-group-list
> .@{menu-prefix-cls}-submenu
> .@{menu-prefix-cls}-submenu-title,
2017-08-22 18:37:08 +08:00
> .@{menu-prefix-cls}-submenu > .@{menu-prefix-cls}-submenu-title {
left: 0;
padding: 0 ~'calc(50% - @{menu-icon-size-lg} / 2)';
text-overflow: clip;
.@{menu-prefix-cls}-submenu-arrow {
2017-08-22 18:37:08 +08:00
display: none;
}
.@{menu-prefix-cls}-item-icon,
2017-08-22 18:37:08 +08:00
.@{iconfont-css-prefix} {
margin: 0;
2019-11-04 16:47:26 +08:00
font-size: @menu-icon-size-lg;
line-height: @menu-item-height;
2017-08-22 18:37:08 +08:00
+ span {
display: inline-block;
max-width: 0;
2017-08-22 18:37:08 +08:00
opacity: 0;
}
}
}
.@{menu-prefix-cls}-item-icon,
.@{iconfont-css-prefix} {
display: inline-block;
}
2017-08-22 18:37:08 +08:00
&-tooltip {
pointer-events: none;
.@{menu-prefix-cls}-item-icon,
2017-08-22 18:37:08 +08:00
.@{iconfont-css-prefix} {
display: none;
}
a {
color: @text-color-dark;
}
}
.@{menu-prefix-cls}-item-group-title {
padding-right: 4px;
padding-left: 4px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
2017-08-22 18:37:08 +08:00
}
2017-02-16 17:56:15 +08:00
&-item-group-list {
margin: 0;
padding: 0;
2017-02-16 21:24:17 +08:00
.@{menu-prefix-cls}-item,
.@{menu-prefix-cls}-submenu-title {
2017-02-16 17:56:15 +08:00
padding: 0 16px 0 28px;
}
}
&-root&-vertical,
&-root&-vertical-left,
&-root&-vertical-right,
2015-08-13 17:31:09 +08:00
&-root&-inline {
box-shadow: none;
2015-08-13 17:31:09 +08:00
}
&-root&-inline-collapsed {
.@{menu-prefix-cls}-item,
.@{menu-prefix-cls}-submenu .@{menu-prefix-cls}-submenu-title {
> .@{menu-prefix-cls}-inline-collapsed-noicon {
font-size: @menu-icon-size-lg;
text-align: center;
}
}
}
2015-08-10 17:57:28 +08:00
&-sub&-inline {
padding: 0;
2015-11-26 19:32:55 +08:00
border: 0;
2015-11-14 16:37:42 +08:00
border-radius: 0;
box-shadow: none;
2015-11-26 19:32:55 +08:00
& > .@{menu-prefix-cls}-item,
& > .@{menu-prefix-cls}-submenu > .@{menu-prefix-cls}-submenu-title {
height: @menu-item-height;
line-height: @menu-item-height;
list-style-position: inside;
list-style-type: disc;
2015-08-10 17:57:28 +08:00
}
2015-12-11 16:55:30 +08:00
& .@{menu-prefix-cls}-item-group-title {
padding-left: 32px;
}
2015-08-10 17:57:28 +08:00
}
// Disabled state sets text to gray and nukes hover/tab effects
&-item-disabled,
&-submenu-disabled {
color: @disabled-color !important;
background: none;
border-color: transparent !important;
cursor: not-allowed;
a {
color: @disabled-color !important;
pointer-events: none;
}
> .@{menu-prefix-cls}-submenu-title {
color: @disabled-color !important;
cursor: not-allowed;
> .@{menu-prefix-cls}-submenu-arrow {
&::before,
&::after {
background: @disabled-color !important;
}
}
}
}
2015-08-06 16:49:54 +08:00
}
2017-11-29 21:08:44 +08:00
// Integration with header element so menu items have the same height
.@{ant-prefix}-layout-header {
.@{menu-prefix-cls} {
line-height: inherit;
}
}
2017-11-29 21:08:44 +08:00
@import './dark';
@import './rtl';