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

Completely hide tab close button when dirty state is highlighted in top border #64718

Merged
merged 2 commits into from Dec 11, 2018
Merged

Completely hide tab close button when dirty state is highlighted in top border #64718

merged 2 commits into from Dec 11, 2018

Conversation

usernamehw
Copy link
Contributor

@usernamehw usernamehw commented Dec 10, 2018

Fixes #64684

Before After
before after

@bpasero
Copy link
Member

bpasero commented Dec 10, 2018

I am not sure this requires another setting, can we be sure people want this?

@bpasero bpasero added this to the Backlog milestone Dec 10, 2018
@usernamehw
Copy link
Contributor Author

We can merge and wait for complaints.

@usernamehw
Copy link
Contributor Author

It's not like people would actually upvote the issue #64684.

Copy link
Member

@bpasero bpasero left a comment

Choose a reason for hiding this comment

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

I would prefer the CSS to be just more explicit via a :not() pseudo:

.monaco-workbench > .part.editor > .content .editor-group-container > .title .tabs-container > .tab.close-button-off.dirty:not(.dirty-border-top) {
	background-repeat: no-repeat;
	background-position-y: center;
	background-position-x: calc(100% - 6px); /* to the right of the tab label */
	padding-right: 28px; /* make room for dirty indication when we are running without close button */
}

.vs .monaco-workbench > .part.editor > .content .editor-group-container > .title .tabs-container > .tab.close-button-off.dirty:not(.dirty-border-top) {
	background-image: url('close-dirty.svg');
}

.vs-dark .monaco-workbench > .part.editor > .content .editor-group-container > .title .tabs-container > .tab.close-button-off.dirty:not(.dirty-border-top),
.hc-black .monaco-workbench > .part.editor > .content .editor-group-container > .title .tabs-container > .tab.close-button-off.dirty:not(.dirty-border-top) {
	background-image: url('close-dirty-inverse.svg');
}

This avoids having to repeat CSS rules that have been defined elsewhere already.

@bpasero bpasero modified the milestones: Backlog, December 2018, On Deck Dec 10, 2018
@usernamehw
Copy link
Contributor Author

No selector for .hc because there's no modified border there.

@bpasero bpasero merged commit 34f0b18 into microsoft:master Dec 11, 2018
@bpasero
Copy link
Member

bpasero commented Dec 11, 2018

Thanks 👍

@bpasero bpasero modified the milestones: On Deck, December 2018 Dec 11, 2018
@usernamehw usernamehw deleted the tab_close branch December 11, 2018 07:56
@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Should closeTab icon be hidden when highlightModifiedTabs is true?
2 participants