Skip to content

Commit

Permalink
Seperate @active-item-bg into 2 variables
Browse files Browse the repository at this point in the history
  • Loading branch information
megawac committed May 3, 2017
1 parent 0bc8284 commit d8d17a6
Show file tree
Hide file tree
Showing 18 changed files with 33 additions and 26 deletions.
4 changes: 2 additions & 2 deletions components/calendar/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
transition: all .3s;

&:hover {
background: @active-item-bg;
background: @item-hover-bg;
cursor: pointer;
}

Expand Down Expand Up @@ -195,7 +195,7 @@
transition: background .3s;

&:hover {
background: @active-item-bg;
background: @item-hover-bg;
cursor: pointer;
}

Expand Down
2 changes: 1 addition & 1 deletion components/cascader/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@
white-space: nowrap;
transition: all 0.3s;
&:hover {
background: @active-item-bg;
background: @item-hover-bg;
}
&-disabled {
cursor: not-allowed;
Expand Down
2 changes: 1 addition & 1 deletion components/date-picker/style/Calendar.less
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
}

&:hover {
background: @active-item-bg;
background: @item-hover-bg;
cursor: pointer;
}

Expand Down
2 changes: 1 addition & 1 deletion components/date-picker/style/DecadePanel.less
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
transition: background 0.3s ease;

&:hover {
background: @active-item-bg;
background: @item-hover-bg;
cursor: pointer;
}
}
Expand Down
2 changes: 1 addition & 1 deletion components/date-picker/style/MonthPanel.less
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
transition: background 0.3s ease;

&:hover {
background: @active-item-bg;
background: @item-hover-bg;
cursor: pointer;
}
}
2 changes: 1 addition & 1 deletion components/date-picker/style/RangePicker.less
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
&:before {
content: '';
display: block;
background: @active-item-bg;
background: @item-active-bg;
border-radius: 0;
border: 0;
position: absolute;
Expand Down
2 changes: 1 addition & 1 deletion components/date-picker/style/TimePicker.less
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
}

li:hover {
background: @active-item-bg;
background: @item-hover-bg;
}

li&-option-selected {
Expand Down
2 changes: 1 addition & 1 deletion components/date-picker/style/YearPanel.less
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
transition: background 0.3s ease;

&:hover {
background: @active-item-bg;
background: @item-hover-bg;
cursor: pointer;
}
}
Expand Down
4 changes: 2 additions & 2 deletions components/dropdown/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,11 @@
&-selected,
&-selected > a {
color: @primary-color;
background-color: @active-item-bg;
background-color: @item-active-bg;
}

&:hover {
background-color: @active-item-bg;
background-color: @item-hover-bg;
}

&-disabled {
Expand Down
7 changes: 5 additions & 2 deletions components/mention/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,13 @@
overflow: hidden;
transition: background 0.3s;

&:hover,
&:hover {
background-color: @item-hover-bg;
}

&.focus,
&-active {
background-color: @active-item-bg;
background-color: @item-active-bg;
}

&-disabled {
Expand Down
4 changes: 2 additions & 2 deletions components/menu/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@

&-item:active,
&-submenu-title:active {
background: @active-item-bg;
background: @item-active-bg;
}

&-submenu &-sub {
Expand Down Expand Up @@ -108,7 +108,7 @@
}

&:not(&-horizontal) &-item-selected {
background-color: @active-item-bg;
background-color: @item-active-bg;
}

&-horizontal,
Expand Down
7 changes: 5 additions & 2 deletions components/select/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -460,9 +460,12 @@
overflow: hidden;
transition: background 0.3s ease;

&:hover,
&:hover {
background-color: @item-hover-bg;
}

&-active {
background-color: @active-item-bg;
background-color: @item-active-bg;
}

&-disabled {
Expand Down
7 changes: 4 additions & 3 deletions components/style/themes/default.less
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,10 @@
@border-radius-base : 4px;
@border-radius-sm : 2px;

// The background color used when an item (such as a list item or table cell)
// is active or hovered.
@active-item-bg : @primary-1;
// The background colors for active and hover states for things like
// list items or table cells.
@item-active-bg : @primary-1;
@item-hover-bg : @primary-1;

// ICONFONT
@iconfont-css-prefix : anticon;
Expand Down
2 changes: 1 addition & 1 deletion components/time-picker/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
}

li:hover {
background: @active-item-bg;
background: @item-hover-bg;
}

li&-option-selected {
Expand Down
2 changes: 1 addition & 1 deletion components/transfer/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@

&-item:not(&-item-disabled):hover {
cursor: pointer;
background-color: @active-item-bg;
background-color: @item-hover-bg;
}

&-item-disabled {
Expand Down
4 changes: 2 additions & 2 deletions components/tree-select/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@
color: @text-color;
transition: all 0.3s ease;
&:hover {
background-color: @active-item-bg;
background-color: @item-hover-bg;
}
&.@{select-tree-prefix-cls}-node-selected {
background-color: @primary-2;
background-color: @item-active-bg;
}
}
span {
Expand Down
2 changes: 1 addition & 1 deletion components/tree/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
color: @text-color;
transition: all 0.3s ease;
&:hover {
background-color: @active-item-bg;
background-color: @item-hover-bg;
}
&.@{tree-prefix-cls}-node-selected {
background-color: @primary-2;
Expand Down
2 changes: 1 addition & 1 deletion components/upload/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@
}

&:hover &-info {
background-color: @active-item-bg;
background-color: @item-hover-bg;
}

&:hover .@{iconfont-css-prefix}-cross {
Expand Down

0 comments on commit d8d17a6

Please sign in to comment.