Skip to content

Commit

Permalink
fix: apply accent color for tabs when using sidebar in the horizontal…
Browse files Browse the repository at this point in the history
… mode
  • Loading branch information
DenysMb committed Nov 12, 2024
1 parent 659fe92 commit 69eba8f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/features/appearance/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const generateUserCustomCSS = () => {
return pathExistsSync(path) ? readFileSync(path).toString() : '';
};

const generateAccentStyle = accentColorStr => {
const generateAccentStyle = (accentColorStr, useHorizontalStyle) => {
let accentColor;
try {
accentColor = color(accentColorStr);
Expand Down Expand Up @@ -97,7 +97,7 @@ const generateAccentStyle = accentColorStr => {
}
.franz-form .franz-form__radio.is-selected, .tab-item.is-active {
box-shadow: inset 4px 0 0 0 ${accentColorStr};
box-shadow: inset ${useHorizontalStyle ? '0 4px' : '4px 0'} 0 0 ${accentColorStr};
}
a.button:hover, button.button:hover {
Expand Down Expand Up @@ -405,7 +405,7 @@ const generateStyle = (settings, app) => {
if (
accentColor.toLowerCase() !== DEFAULT_APP_SETTINGS.accentColor.toLowerCase()
) {
style += generateAccentStyle(accentColor);
style += generateAccentStyle(accentColor, useHorizontalStyle);
}

style += generateServiceRibbonWidthStyle(
Expand Down
1 change: 0 additions & 1 deletion src/styles/vertical.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ $tabitem-bias: 30px;

.tab-item {
&.is-active {
box-shadow: inset 0 4px 0 0 $theme-brand-primary;
overflow: hidden;
height: $sidebar-width + 4;
}
Expand Down

0 comments on commit 69eba8f

Please sign in to comment.