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

ui: improve tabbar styling #10822

Merged
merged 1 commit into from
Mar 7, 2022
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
1 change: 1 addition & 0 deletions packages/core/src/browser/style/sidepanel.css
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@

#theia-bottom-content-panel .p-TabBar-tab:not(.p-mod-current) {
color: var(--theia-panelTitle-inactiveForeground);
border-top: var(--theia-border-width) solid var(--theia-panel-background);
}

#theia-bottom-content-panel .p-TabBar-tab.p-mod-current {
Expand Down
33 changes: 13 additions & 20 deletions packages/core/src/browser/style/tabs.css
Original file line number Diff line number Diff line change
Expand Up @@ -138,21 +138,22 @@ body.theia-editor-highlightModifiedTabs
#theia-main-content-panel .p-TabBar .p-TabBar-tab:not(.p-mod-current):not(.theia-mod-active) {
background: var(--theia-tab-inactiveBackground);
color: var(--theia-tab-inactiveForeground);
border-top: 1px solid var(--theia-tab-inactiveBackground);
}

.p-TabBar.theia-app-centers {
background: var(--theia-editorGroupHeader-tabsBackground);
}

.p-TabBar.theia-app-centers::after {
content: '';
position: absolute;
bottom: 0;
left: 0;
pointer-events: none;
background-color: var(--theia-editorGroupHeader-tabsBorder);
width: 100%;
height: 1px;
content: '';
position: absolute;
bottom: 0;
left: 0;
pointer-events: none;
background-color: var(--theia-editorGroupHeader-tabsBorder);
width: 100%;
height: 1px;
}

.p-TabBar.theia-app-centers .p-TabBar-tabIcon,
Expand Down Expand Up @@ -261,22 +262,14 @@ body.theia-editor-highlightModifiedTabs
padding-right: 4px;
}

.p-TabBar.theia-app-centers .p-TabBar-tab.p-mod-current > .theia-tab-icon-label > .p-TabBar-tabIcon {
margin-top: -2px;
}

.p-TabBar.theia-app-centers .p-TabBar-tab.p-mod-current > .p-TabBar-tabCloseIcon {
margin-top: 0px;
}
Comment on lines -264 to -270
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@msujew I'm not sure why the changes were necessary for the current tab but it caused the shifting of the file-icon and the close to occur:

master-tab

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting, that only seems to happen on Chrome. I tested this (and build the original PR) on Firefox, where these lines of CSS fixed the shifting issue. But it seems like they introduced shifting in Chrome


.p-TabBar.theia-app-centers .p-TabBar-tab.p-mod-closable:not(.theia-mod-dirty):hover > .p-TabBar-tabCloseIcon:before,
.p-TabBar.theia-app-centers .p-TabBar-tab.p-mod-closable:not(.theia-mod-dirty).p-TabBar-tab.p-mod-current > .p-TabBar-tabCloseIcon:before,
.p-TabBar.theia-app-centers .p-TabBar-tab.p-mod-closable.theia-mod-dirty > .p-TabBar-tabCloseIcon:hover:before {
content: "\ea76"
.p-TabBar.theia-app-centers .p-TabBar-tab.p-mod-closable.theia-mod-dirty > .p-TabBar-tabCloseIcon:hover:before {
content: "\ea76";
}

.p-TabBar.theia-app-centers .p-TabBar-tab.p-mod-closable.theia-mod-dirty > .p-TabBar-tabCloseIcon:before {
content: "\ea71"
.p-TabBar.theia-app-centers .p-TabBar-tab.p-mod-closable.theia-mod-dirty > .p-TabBar-tabCloseIcon:before {
content: "\ea71";
}

.p-TabBar-tabIcon.no-icon {
Expand Down