Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style: πŸ’„ optimize TimePicker focus style #17447

Merged
merged 1 commit into from Jul 3, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
31 changes: 17 additions & 14 deletions components/date-picker/style/TimePicker.less
Expand Up @@ -48,7 +48,6 @@
&-select {
position: relative; // Fix chrome weird render bug
float: left;
box-sizing: border-box;
height: 226px;
overflow: hidden;
font-size: @font-size-base;
Expand All @@ -68,7 +67,6 @@
}

ul {
box-sizing: border-box;
width: 100%;
max-height: 206px;
margin: 0;
Expand All @@ -77,30 +75,35 @@
}

li {
box-sizing: content-box;
width: 100%;
height: 24px;
margin: 0;
padding-left: 32px;
line-height: 24px;
text-align: center;
list-style: none;
cursor: pointer;
transition: background 0.3s ease;
transition: all .3s;
user-select: none;
}

li:last-child::after {
display: block;
height: 202px;
content: '';
}
&:last-child::after {
display: block;
height: 202px;
content: '';
}

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

&:focus {
color: @primary-color;
font-weight: 600;
outline: none;
}
}

li&-option-selected {
font-weight: bold;
font-weight: 600;
background: @time-picker-selected-bg;
}

Expand Down
14 changes: 8 additions & 6 deletions components/time-picker/style/index.less
Expand Up @@ -39,7 +39,6 @@

&-wrap {
position: relative;
box-sizing: border-box;
padding: 7px 2px 7px @control-padding-horizontal;
border-bottom: @border-width-base @border-style-base @border-color-split;
}
Expand All @@ -56,7 +55,6 @@
&-select {
position: relative; // Fix chrome weird render bug
float: left;
box-sizing: border-box;
width: @time-picker-panel-column-width;
max-height: @timepicker-item-height * 6;
overflow: hidden;
Expand All @@ -81,15 +79,13 @@
}

ul {
box-sizing: border-box;
width: 100%;
margin: 0;
padding: 0 0 @timepicker-item-height * 5;
list-style: none;
}

li {
box-sizing: content-box;
width: 100%;
height: @timepicker-item-height;
margin: 0;
Expand All @@ -98,16 +94,22 @@
text-align: left;
list-style: none;
cursor: pointer;
transition: background 0.3s;
transition: all 0.3s;
user-select: none;

&:focus {
color: @primary-color;
font-weight: 600;
outline: none;
}
}

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

li&-option-selected {
font-weight: bold;
font-weight: 600;
background: @time-picker-selected-bg;
&:hover {
background: @time-picker-selected-bg;
Expand Down