Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

add transition polishment for switch buttons #5013

Merged
merged 1 commit into from
Oct 24, 2016
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions less/about/preferences.less
Original file line number Diff line number Diff line change
Expand Up @@ -1012,9 +1012,9 @@ div.nextPaymentSubmission {
}

#searchSelectIcon {
width: 16px;
height: 16px;
color: @braveOrange;
width: 16px;
height: 16px;
color: @braveOrange;
}

.prefTabContainer .switchControl {
Expand All @@ -1038,7 +1038,6 @@ div.nextPaymentSubmission {
.switchBackground.switchedOn {
background-color: @switchBG_on;
.switchIndicator {
left: auto;
right: 2px;
}
}
Expand Down Expand Up @@ -1096,7 +1095,6 @@ div.nextPaymentSubmission {
background-color: white;
border-radius: 100%;
height: @switchNubDiameter;
left: @switchNubLeftMargin;
position: absolute;
top: @switchNubTopMargin;
width: @switchNubDiameter;
Expand Down
10 changes: 6 additions & 4 deletions less/switchControls.less
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
.switchBackground.switchedOn {
background-color: @braveOrange;
.switchIndicator {
left: auto;
right: @switchNubRightMargin;
right: 2px;
}
}
}
Expand All @@ -29,10 +28,11 @@
.switchBackground {
height: 26px;
width: 60px;
background-color: @switchBG_off_lrg;
background-color: @switchBG_off_lrg;
.switchIndicator {
height: 22px;
width: 22px;
right: calc(60px - 22px - @switchNubRightMargin);
}
}
}
Expand Down Expand Up @@ -70,16 +70,18 @@
position: relative;
width: @switchWidth;
box-shadow: @switchShadow;
transition: @switchBGTransition;

.switchIndicator {
background-color: white;
border-radius: 100%;
height: @switchNubDiameter;
left: @switchNubLeftMargin;
right: calc(@switchWidth - @switchNubDiameter - @switchNubRightMargin);
position: absolute;
top: @switchNubTopMargin;
width: @switchNubDiameter;
box-shadow: @switchNubShadow;
transition: @switchNubTransition;
}
}
}
2 changes: 2 additions & 0 deletions less/variables.less
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
@switchBG_off: #d3d3d3;
@switchBG_off_lrg: #adadad;
@switchBG_dis: #e8e8e8;
@switchBGTransition: background-color 100ms;
@switchHeight: 16px;
@switchWidth: 45px;
@switchRadius: 10px;
Expand All @@ -61,6 +62,7 @@
@switchNubRightMargin: 2px;
@switchNubColor: white;
@switchNubShadow: 1px 1px 5px -2px black;
@switchNubTransition: right 100ms;

@navbarHeight: 36px;
@downloadsBarHeight: 50px;
Expand Down