Skip to content
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
4 changes: 2 additions & 2 deletions src/vs/workbench/common/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -676,8 +676,8 @@ export const SURFACE_BACKGROUND = registerColor('surface.background', {
export const SURFACE_FOREGROUND = registerColor('surface.foreground', SIDE_BAR_FOREGROUND, localize('surfaceForeground', "Foreground color of framed container surfaces (\"cards\"), such as the floating workbench panels in the modern layout."));

export const SURFACE_BORDER = registerColor('surface.border', {
dark: transparent(foreground, 0.1),
light: transparent(foreground, 0.1),
dark: opaque(transparent(foreground, 0.1), SURFACE_BACKGROUND),
light: opaque(transparent(foreground, 0.1), SURFACE_BACKGROUND),
hcDark: contrastBorder,
hcLight: contrastBorder
}, localize('surfaceBorder', "Border color of framed container surfaces (\"cards\"), such as the floating workbench panels in the modern layout."));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,31 @@ suite('StyleOverridesContribution', () => {
});
});

test('uses opaque surface border defaults', () => {
const darkTheme = ColorThemeData.createUnloadedTheme('vs-dark');
const lightTheme = ColorThemeData.createUnloadedTheme('vs');
const darkSurfaceBorder = darkTheme.getColor(SURFACE_BORDER);
const darkEditorBorder = darkTheme.getColor(EDITOR_BORDER);
const lightSurfaceBorder = lightTheme.getColor(SURFACE_BORDER);
const lightEditorBorder = lightTheme.getColor(EDITOR_BORDER);

assert.deepStrictEqual({
darkSurfaceBorderIsOpaque: darkSurfaceBorder?.isOpaque(),
darkEditorBorderIsOpaque: darkEditorBorder?.isOpaque(),
darkEditorBorderMatchesSurface: darkEditorBorder?.equals(darkSurfaceBorder ?? null),
lightSurfaceBorderIsOpaque: lightSurfaceBorder?.isOpaque(),
lightEditorBorderIsOpaque: lightEditorBorder?.isOpaque(),
lightEditorBorderMatchesSurface: lightEditorBorder?.equals(lightSurfaceBorder ?? null),
}, {
darkSurfaceBorderIsOpaque: true,
darkEditorBorderIsOpaque: true,
darkEditorBorderMatchesSurface: true,
lightSurfaceBorderIsOpaque: true,
lightEditorBorderIsOpaque: true,
lightEditorBorderMatchesSurface: true,
});
});

test('hides collapsed primary side bar grips without hiding constrained auxiliary sash grips', () => {
const root = document.createElement('div');
root.className = 'monaco-workbench style-override nosidebar nopanel';
Expand Down
Loading