Browse Source

border && theme dark

pull/526/head
yuntao.qyt 9 years ago
parent
commit
29f07d0972
  1. 2
      components/menu/demo/sider-current.md
  2. 88
      style/components/menu.less

2
components/menu/demo/sider-current.md

@ -30,7 +30,7 @@ var Sider = React.createClass({
}); });
}, },
render() { render() {
return <Menu theme="dark" onClick={this.handleClick} return <Menu onClick={this.handleClick}
style={{width:240}} style={{width:240}}
openKeys={this.state.openKeys} openKeys={this.state.openKeys}
onOpen={this.onToggle} onOpen={this.onToggle}

88
style/components/menu.less

@ -8,7 +8,6 @@
list-style: none; list-style: none;
z-index: 999; z-index: 999;
box-shadow: @overlay-shadow; box-shadow: @overlay-shadow;
border-radius: @border-radius-base;
color: @text-color; color: @text-color;
background: #fff; background: #fff;
@ -46,11 +45,6 @@
background-color: tint(@primary-color, 90%); background-color: tint(@primary-color, 90%);
} }
&-item-selected {
background-color: tint(@primary-color, 90%);
color: @primary-color;
}
& > li&-submenu { & > li&-submenu {
cursor: pointer; cursor: pointer;
transition: all 0.3s ease; transition: all 0.3s ease;
@ -72,6 +66,12 @@
.@{menu-prefix-cls}-item-active { .@{menu-prefix-cls}-item-active {
border-right: 2px solid @primary-color; border-right: 2px solid @primary-color;
} }
.@{menu-prefix-cls}-item-selected {
background-color: tint(@primary-color, 90%);
color: @primary-color;
border-right: 2px solid #2db7f5;
}
} }
&-submenu-horizontal > .@{menu-prefix-cls} { &-submenu-horizontal > .@{menu-prefix-cls} {
@ -169,7 +169,6 @@
border: none; border: none;
border-bottom: 1px solid #d9d9d9; border-bottom: 1px solid #d9d9d9;
box-shadow: none; box-shadow: none;
border-radius: 0;
padding-left: 24px; padding-left: 24px;
z-index: 0; z-index: 0;
@ -234,23 +233,6 @@
} }
} }
&-vertical, &-horizontal {
.@{menu-prefix-cls}-submenu {
.@{menu-prefix-cls}-item:first-child {
border-radius: @border-radius-base @border-radius-base 0 0;
}
.@{menu-prefix-cls}-item:last-child {
border-radius: 0 0 @border-radius-base @border-radius-base;
}
&:first-child {
border-radius: @border-radius-base @border-radius-base 0 0;
}
&:last-child {
border-radius: 0 0 @border-radius-base @border-radius-base;
}
}
}
&-vertical&-sub { &-vertical&-sub {
padding: 0; padding: 0;
transform-origin: 0 0; transform-origin: 0 0;
@ -261,14 +243,12 @@
&-root&-vertical, &-root&-vertical,
&-root&-inline { &-root&-inline {
border-radius: 0;
box-shadow: none; box-shadow: none;
} }
&-sub&-inline { &-sub&-inline {
padding: 0; padding: 0;
border: none; border: none;
border-radius: 0;
box-shadow: none; box-shadow: none;
& > .@{menu-prefix-cls}-item, & > .@{menu-prefix-cls}-submenu > .@{menu-prefix-cls}-submenu-title { & > .@{menu-prefix-cls}-item, & > .@{menu-prefix-cls}-submenu > .@{menu-prefix-cls}-submenu-title {
line-height: 34px; line-height: 34px;
@ -316,6 +296,13 @@
} }
} }
.@{menu-prefix-cls}-submenu-vertical:hover {
color: #FFF;
.anticon {
color: #FFF;
}
}
&-item, &-submenu-title { &-item, &-submenu-title {
margin: 0; margin: 0;
position: relative; position: relative;
@ -395,7 +382,6 @@
border: none; border: none;
border-bottom: 1px solid #d9d9d9; border-bottom: 1px solid #d9d9d9;
box-shadow: none; box-shadow: none;
border-radius: 0;
padding-left: 24px; padding-left: 24px;
z-index: 0; z-index: 0;
@ -456,65 +442,63 @@
.@{menu-prefix-cls}-submenu { .@{menu-prefix-cls}-submenu {
background: #404040; background: #404040;
} }
.@{menu-prefix-cls}-submenu.@{menu-prefix-cls}-submenu-active {
background: #2DB7F5;
color: #FFF;
}
} }
.@{menu-prefix-cls}-vertical, .@{menu-prefix-cls}-vertical,
.@{menu-prefix-cls}-inline { .@{menu-prefix-cls}-inline {
.@{menu-prefix-cls}-item, .@{menu-prefix-cls}-item,
.@{menu-prefix-cls}-submenu > .@{menu-prefix-cls}-submenu-title { .@{menu-prefix-cls}-submenu > .@{menu-prefix-cls}-submenu-title {
background-color: #333333;
color: rgba(255, 255, 255, 0.45); color: rgba(255, 255, 255, 0.45);
} }
.@{menu-prefix-cls}-item {
background-color: #333333;
}
} }
.@{menu-prefix-cls}-vertical, .@{menu-prefix-cls}-vertical,
.@{menu-prefix-cls}-inline { .@{menu-prefix-cls}-inline {
border-right: 1px solid #3F3F3F; border-right: 0px solid #3F3F3F;
.@{menu-prefix-cls}-item.@{menu-prefix-cls}-item-selected, .@{menu-prefix-cls}-item.@{menu-prefix-cls}-item-selected,
.@{menu-prefix-cls}-item.@{menu-prefix-cls}-item-active { .@{menu-prefix-cls}-item.@{menu-prefix-cls}-item-active {
border-right: 2px solid #2DB7F5; border-right: 0px solid #2DB7F5;
background-color: #2DB7F5; background-color: #2DB7F5;
color: #FFF; color: #FFF;
} }
} }
&-vertical, &-horizontal { // ddd
.@{menu-prefix-cls}-submenu { .@{menu-prefix-cls}-vertical,
.@{menu-prefix-cls}-item:first-child { .@{menu-prefix-cls}-inline {
border-radius: @border-radius-base @border-radius-base 0 0; border-right: 0px;
}
.@{menu-prefix-cls}-item:last-child { .@{menu-prefix-cls}-item {
border-radius: 0 0 @border-radius-base @border-radius-base; border-right: 0px solid transparent;
} margin-left: 0px;
&:first-child { left: 0px;
border-radius: @border-radius-base @border-radius-base 0 0;
}
&:last-child {
border-radius: 0 0 @border-radius-base @border-radius-base;
}
}
} }
&-vertical&-sub { .@{menu-prefix-cls}-selected,
padding: 0; .@{menu-prefix-cls}-item-active {
transform-origin: 0 0; border-right: 0px solid @primary-color;
& > .@{menu-prefix-cls}-item, & > .@{menu-prefix-cls}-submenu {
transform-origin: 0 0;
} }
} }
&-root&-vertical, &-root&-vertical,
&-root&-inline { &-root&-inline {
border-radius: 0;
box-shadow: none; box-shadow: none;
} }
&-sub&-inline { &-sub&-inline {
padding: 0; padding: 0;
border: none; border: none;
border-radius: 0;
box-shadow: none; box-shadow: none;
& > .@{menu-prefix-cls}-item, & > .@{menu-prefix-cls}-submenu > .@{menu-prefix-cls}-submenu-title { & > .@{menu-prefix-cls}-item, & > .@{menu-prefix-cls}-submenu > .@{menu-prefix-cls}-submenu-title {
line-height: 34px; line-height: 34px;

Loading…
Cancel
Save