Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/src/vs/sessions/browser/parts/media/sidebarPart.css
13399 views
1
/*---------------------------------------------------------------------------------------------
2
* Copyright (c) Microsoft Corporation. All rights reserved.
3
* Licensed under the MIT License. See License.txt in the project root for license information.
4
*--------------------------------------------------------------------------------------------*/
5
6
/* Hide traffic light spacer in fullscreen (traffic lights are not shown) */
7
.monaco-workbench.fullscreen .part.sidebar .window-controls-container {
8
display: none;
9
}
10
11
/* Make the sidebar title area draggable to move the window */
12
.agent-sessions-workbench .part.sidebar > .composite.title {
13
position: relative;
14
}
15
16
.agent-sessions-workbench .part.sidebar > .composite.title > .titlebar-drag-region {
17
top: 0;
18
left: 0;
19
display: block;
20
position: absolute;
21
width: 100%;
22
height: 100%;
23
-webkit-app-region: drag;
24
}
25
26
/* Interactive elements in the title area must not be draggable */
27
.agent-sessions-workbench .part.sidebar > .composite.title .action-item {
28
-webkit-app-region: no-drag;
29
}
30
31
/* Toggled state for the sidebar toggle button in the sidebar title area */
32
.agent-sessions-workbench .part.sidebar > .composite.title > .global-actions-left .action-label.checked {
33
background: var(--vscode-toolbar-activeBackground);
34
border-radius: var(--vscode-cornerRadius-medium);
35
}
36
37
/* Preserve toggled background when the toggle button is hovered or focused */
38
.agent-sessions-workbench .part.sidebar > .composite.title > .global-actions-left .action-label.checked:hover,
39
.agent-sessions-workbench .part.sidebar > .composite.title > .global-actions-left .action-label.checked:focus {
40
background: var(--vscode-toolbar-activeBackground);
41
}
42
/* Sidebar Footer Container */
43
.agent-sessions-workbench .part.sidebar > .sidebar-footer {
44
display: flex;
45
align-items: stretch;
46
gap: 4px;
47
padding: 6px 0 0 0;
48
margin: 0 10px 2px 10px;
49
flex-shrink: 0;
50
}
51
52
/* Make the toolbar fill the footer width and stack actions vertically */
53
.monaco-workbench .part.sidebar > .sidebar-footer .monaco-toolbar,
54
.monaco-workbench .part.sidebar > .sidebar-footer .monaco-action-bar,
55
56
.monaco-workbench .part.sidebar > .sidebar-footer .actions-container {
57
width: 100%;
58
max-width: 100%;
59
display: flex;
60
flex-direction: column;
61
align-items: stretch;
62
cursor: default;
63
}
64
65
.monaco-workbench .part.sidebar > .sidebar-footer .action-item {
66
width: 100%;
67
max-width: 100%;
68
cursor: default;
69
}
70
71
/* ---- Phone Layout: Sidebar Drawer Overlay ---- */
72
73
/* On phone, the sidebar is a full-width drawer that slides over the chat.
74
It covers the full viewport below the mobile top bar; the top bar's
75
sidebar toggle button remains visible and is used to dismiss it.
76
77
The drawer slides in/out with a transition (not a keyframe animation) so
78
that interrupted toggles retarget smoothly from the current position
79
rather than restarting. The split-view wrapper toggles `display: none`
80
via a `.visible` class; `transition-behavior: allow-discrete` defers
81
the discrete `display` change until the slide-out completes, and
82
`@starting-style` provides the offscreen origin for the slide-in. */
83
.agent-sessions-workbench.phone-layout .split-view-view:has(> .part.sidebar) {
84
position: absolute !important;
85
top: 0 !important;
86
left: 0 !important;
87
bottom: 0 !important;
88
width: 100% !important;
89
height: 100% !important;
90
z-index: 250;
91
transform: translateX(0);
92
transition:
93
transform 260ms cubic-bezier(0.32, 0.72, 0, 1),
94
display 260ms allow-discrete;
95
}
96
97
/* Slide-in starting state (applies on each transition into .visible) */
98
@starting-style {
99
.agent-sessions-workbench.phone-layout .split-view-view.visible:has(> .part.sidebar) {
100
transform: translateX(-100%);
101
}
102
}
103
104
/* Slide-out target: when `.visible` is removed, splitview's own rule sets
105
`display: none`. With `allow-discrete` above, the transform animates first
106
and the discrete `display` swap happens at the end of the transition. */
107
.agent-sessions-workbench.phone-layout .split-view-view:not(.visible):has(> .part.sidebar) {
108
transform: translateX(-100%);
109
}
110
111
/* The sidebar Part inside fills its container */
112
.agent-sessions-workbench.phone-layout .part.sidebar {
113
width: 100%;
114
height: 100%;
115
}
116
117
@media (prefers-reduced-motion: reduce) {
118
.agent-sessions-workbench.phone-layout .split-view-view:has(> .part.sidebar) {
119
transition: none;
120
}
121
}
122
123
/* Increase sidebar footer action button height for touch */
124
.agent-sessions-workbench.phone-layout .part.sidebar > .sidebar-footer .sidebar-action-button {
125
min-height: 44px;
126
padding: 8px 12px;
127
}
128
129