Skip to content

Commit 516f9f9

Browse files
committed
feat: git branch dropdown better styling
1 parent b4e237b commit 516f9f9

2 files changed

Lines changed: 27 additions & 16 deletions

File tree

src/extensions/default/Git/styles/git-styles.less

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -930,6 +930,7 @@
930930
margin-left: -12px;
931931
position: absolute;
932932
display: block;
933+
min-width: 200px;
933934
max-width: none;
934935
z-index: 100;
935936
overflow-y: auto;
@@ -950,6 +951,7 @@
950951
}
951952
.git-branch-link {
952953
position: relative;
954+
padding-right: 62px;
953955
.switch-branch {
954956
display: inline-block;
955957
width: 100%;
@@ -959,30 +961,39 @@
959961
.trash-icon, .merge-branch {
960962
position: absolute;
961963
opacity: 0;
962-
top: 27%;
964+
top: 50%;
965+
transform: translateY(-50%);
963966
background-image: none !important;
964-
width: 16px;
965-
height: 16px;
966-
font-size: 20px;
967-
color: rgba(0, 0, 0, 0.5);
968-
line-height: 15px;
967+
width: 20px;
968+
height: 20px;
969+
font-size: 13px;
970+
color: fade(@bc-menu-text, 55%);
971+
line-height: 20px;
969972
text-align: center;
970-
&:hover {
971-
color: rgba(0, 0, 0, 1);
973+
.dark & {
974+
color: fade(@dark-bc-menu-text, 55%);
972975
}
973-
}
974-
.trash-icon, .merge-branch {
975976
&:hover {
976-
color: rgba(0, 0, 0, 1);
977+
color: @bc-menu-text;
978+
.dark & {
979+
color: @dark-bc-menu-text;
980+
}
977981
}
978982
}
979-
&:hover {
983+
&:hover, &.selected {
980984
.trash-icon, .merge-branch {
981985
opacity: 1;
982986
}
983987
}
984988
.merge-branch {
985-
right: 5px;
989+
right: 34px;
990+
.octicon {
991+
font-size: 15px;
992+
}
993+
}
994+
.trash-icon {
995+
left: auto;
996+
right: 8px;
986997
}
987998
}
988999
a {

src/extensions/default/Git/templates/git-branches-menu.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
{{#branchList}}
1313
<li>
1414
<a class="git-branch-link" data-branch="{{name}}">
15+
<span class="switch-branch">{{name}}</span>
16+
<span class="merge-branch" title="{{Strings.MERGE_BRANCH}}"><i class="octicon octicon-git-merge"></i></span>
1517
{{#canDelete}}
16-
<span class="trash-icon">&times;</span>
18+
<span class="trash-icon" title="{{Strings.DELETE_LOCAL_BRANCH}}"><i class="fas fa-trash"></i></span>
1719
{{/canDelete}}
18-
<span class="merge-branch"><i title="{{Strings.MERGE_BRANCH}}" class="octicon octicon-git-merge"></i></span>
19-
<span class="switch-branch">{{name}}</span>
2020
</a>
2121
</li>
2222
{{/branchList}}

0 commit comments

Comments
 (0)