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

Tabs: border-top is thicker in first column tabs compared to other rows #50933

Closed
bpasero opened this issue Jun 1, 2018 · 12 comments
Closed
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug verified Verification succeeded workbench-editor-grid Grid layout issues in the editor area
Milestone

Comments

@bpasero
Copy link
Member

bpasero commented Jun 1, 2018

That is because the grid-sash trick we are currently using is adding a ::before element that takes away 1px of the thickness of the border:

image

This might improve when the grid widget implements a way for me to specify the color of sashes (@joaomoreno )

@bpasero bpasero added bug Issue identified by VS Code Team member as probable bug workbench-editor-grid Grid layout issues in the editor area labels Jun 1, 2018
@bpasero bpasero self-assigned this Jun 1, 2018
@bpasero bpasero added this to the June 2018 milestone Jun 2, 2018
@joaomoreno
Copy link
Member

joaomoreno commented Jun 6, 2018

@bpasero The :before element isn't taking any space away. It uses a value of z-index > 0 so it gets drawn on top of the tab border (which isn't really a border but a box-shadow).

You seem to have a z-index problem, because the minimum z-index that makes the sash border go behind the tab border is 0. But with 0, vertical sashes don't appear at all... probably there's something z-index > 0 in the editor which covers them.

@joaomoreno
Copy link
Member

joaomoreno commented Jun 6, 2018

That something is the actual monaco-editor instance... thought it doesn't set the z-index... it just follows DOM order. Hmmmm sad!

Unfortunately I don't have a great idea but to make the box-shadow 3px high, for tabs which are not on the first view.

@bpasero
Copy link
Member Author

bpasero commented Jun 7, 2018

Unfortunately I don't have a great idea but to make the box-shadow 3px high, for tabs which are not on the first view.

@joaomoreno yeah, my thinking as well. Do you have a CSS rule I can use that makes that change only for those tabs that are in the grid in that position?

@joaomoreno
Copy link
Member

Unfortunately not... Why don't you make the tab border push down its contents?

@bpasero
Copy link
Member Author

bpasero commented Jun 7, 2018

😱

@joaomoreno
Copy link
Member

So, instead of box-shadow, really use border-box.

@bpasero
Copy link
Member Author

bpasero commented Jun 8, 2018

@joaomoreno even with a border-top: 1px solid red I need to use a 2px border for tabs that are below the sash-separator to make it show up.

@joaomoreno
Copy link
Member

Oh. Damn! We might have to find that CSS rule then. 😆

@bpasero
Copy link
Member Author

bpasero commented Jun 8, 2018

@joaomoreno yeah, in a text adventure I would simply do "Use Joao with CSS problem" and it would probably work.

@joaomoreno joaomoreno self-assigned this Jun 11, 2018
@joaomoreno
Copy link
Member

As discussed, let's add some information in the DOM to indicate where grid nodes are in the grid.

@joaomoreno
Copy link
Member

Let's try to move the tab border to a :before: element, just like the splitview separator:

https://github.com/Microsoft/vscode/blob/master/src/vs/base/browser/ui/splitview/splitview.ts#L181

@joaomoreno joaomoreno removed their assignment Jun 12, 2018
@bpasero bpasero closed this as completed Jun 13, 2018
bpasero added a commit that referenced this issue Jun 13, 2018
@joaomoreno
Copy link
Member

@bpasero Good job!

@mjbvz mjbvz added the verified Verification succeeded label Jun 28, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Jul 28, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug verified Verification succeeded workbench-editor-grid Grid layout issues in the editor area
Projects
None yet
Development

No branches or pull requests

3 participants