Path: blob/main/src/vs/sessions/browser/parts/mobile/mobileSidebarPart.ts
13399 views
/*---------------------------------------------------------------------------------------------1* Copyright (c) Microsoft Corporation. All rights reserved.2* Licensed under the MIT License. See License.txt in the project root for license information.3*--------------------------------------------------------------------------------------------*/45import { AbstractPaneCompositePart } from '../../../../workbench/browser/parts/paneCompositePart.js';6import { SidebarPart } from '../sidebarPart.js';7import { isPhoneLayout } from './mobileLayout.js';89/**10* Mobile variant of SidebarPart.11*12* On phone-sized viewports the sidebar skips card-specific inline styles13* so that CSS-only theming takes over. On tablet/desktop it falls back14* to the desktop behavior so runtime viewport transitions keep working.15*/16export class MobileSidebarPart extends SidebarPart {1718override updateStyles(): void {19// Run base theme wiring; this also cascades to AbstractPaneCompositePart.20super.updateStyles();2122if (!isPhoneLayout(this.layoutService)) {23return;24}2526// Skip SidebarPart's card / title-area inline styles on phone.27AbstractPaneCompositePart.prototype.updateStyles.call(this);2829const container = this.getContainer();30if (container) {31container.style.backgroundColor = '';32container.style.color = '';33container.style.outlineColor = '';34}35}36}373839