Skip to content

Commit 644e713

Browse files
committed
feat: add new style to horizontal sidebar
1 parent 5054dca commit 644e713

3 files changed

Lines changed: 10 additions & 16 deletions

File tree

src/features/appearance/index.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ const generateServiceRibbonWidthStyle = (
231231
return horizontal
232232
? `
233233
.sidebar {
234-
height: ${width}px !important;
234+
height: ${width + 8}px !important;
235235
overflow: hidden !important;
236236
}
237237
.sidebar div {
@@ -250,15 +250,12 @@ const generateServiceRibbonWidthStyle = (
250250
.tab-item .tab-item__label {
251251
font-size: ${fontSize}px !important;
252252
}
253-
.tab-item.is-label-enabled {
254-
padding-top: 6px !important;
255-
padding-bottom: 2px !important;
256-
}
257253
.sidebar__button {
258254
font-size: ${width / 3}px !important;
255+
line-height: 0;
259256
}
260257
.app .app__content {
261-
padding-top: ${width + sidebarSizeBias}px !important;
258+
padding-top: ${width + sidebarSizeBias + 8}px !important;
262259
}
263260
.workspaces-drawer {
264261
margin-top: -${width}px !important;

src/styles/tabs.scss

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
display: flex;
1717
flex-direction: column;
1818
flex-shrink: 1;
19+
padding: 4px;
20+
gap: 4px;
1921

2022
.placeholder {
2123
height: 40px;
@@ -31,19 +33,20 @@
3133
min-height: 50px;
3234
position: relative;
3335
flex-direction: column;
36+
width: $theme-sidebar-width;
37+
border-radius: 4px;
38+
padding: 4px;
39+
3440
@media (prefers-reduced-motion: no-preference) {
3541
transition: background $theme-transition-time;
3642
}
37-
width: $theme-sidebar-width;
3843

3944
&.is-active {
4045
background: change-color(
4146
$theme-brand-primary,
4247
$lightness: min(lightness($theme-brand-primary) * 1.35, 100)
4348
);
4449

45-
box-shadow: inset 4px 0 0 0 $theme-brand-primary;
46-
4750
.tab-item__icon,
4851
.tab-item__label {
4952
margin-left: 0px;
@@ -53,8 +56,6 @@
5356
&.is-label-enabled {
5457
height: min-content;
5558
overflow: hidden;
56-
padding-top: 8px;
57-
padding-bottom: 8px;
5859
}
5960

6061
.tab-item__label {

src/styles/vertical.scss

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,8 @@ $tabitem-bias: 30px;
3333

3434
.tab-item {
3535
&.is-active {
36-
box-shadow: inset 0 4px 0 0 $theme-brand-primary;
3736
overflow: hidden;
38-
height: $sidebar-width + 4;
37+
height: $sidebar-width;
3938
}
4039

4140
&.is-label-enabled {
@@ -44,9 +43,6 @@ $tabitem-bias: 30px;
4443
height: $sidebar-width + 10;
4544
width: max-content !important;
4645
overflow: hidden;
47-
padding-left: 4px;
48-
padding-right: 4px;
49-
padding-top: 8px;
5046
}
5147

5248
.tab-item__icon {

0 commit comments

Comments
 (0)