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

Conversation

Projects
None yet
2 participants
@usernamehw
Copy link
Contributor

usernamehw commented Dec 10, 2018

Fixes #64684

Before After
before after
@bpasero

This comment has been minimized.

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

This comment has been minimized.

Copy link
Contributor Author

usernamehw commented Dec 10, 2018

We can merge and wait for complaints.

@usernamehw

This comment has been minimized.

Copy link
Contributor Author

usernamehw commented Dec 10, 2018

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

@bpasero
Copy link
Member

bpasero left a comment

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

This comment has been minimized.

Copy link
Contributor Author

usernamehw commented Dec 10, 2018

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

@bpasero bpasero merged commit 34f0b18 into Microsoft:master Dec 11, 2018

2 checks passed

VS Code #20181210.79 succeeded
Details
license/cla All CLA requirements met.
@bpasero

This comment has been minimized.

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 usernamehw:tab_close branch Dec 11, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment