forked from phcode-dev/staging.phcode.dev
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbrackets_scrollbars.less
More file actions
252 lines (211 loc) · 6.92 KB
/
brackets_scrollbars.less
File metadata and controls
252 lines (211 loc) · 6.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
/*
* GNU AGPL-3.0 License
*
* Copyright (c) 2021 - present core.ai . All rights reserved.
* Original work Copyright (c) 2013 - 2021 Adobe Systems Incorporated. All rights reserved.
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License
* for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see https://opensource.org/licenses/AGPL-3.0.
*
*/
/* Fix for issue#10150 for weird project tree scrollbar behaviour. Scrollbar not appearing on hover.
Forcing the div to render displays the scrollbar. So setting transparent background color on hover. */
.open-files-container:hover,
#project-files-container:hover,
.ai-chat-messages:hover,
.ai-session-history-dropdown:hover {
background-color: inherit;
}
/* Temporary implementation of unobtrusive scrollbars.
FUTURE: These currently rely on nonstandard WebKit styles, and don't have all the right behavior.
Longer-term, we'll need to implement custom scrollbars. */
.platform-mac .quiet-scrollbars,
.platform-win .quiet-scrollbars,
.platform-linux .quiet-scrollbars,
.dark.platform-mac .quiet-scrollbars,
.dark.platform-win .quiet-scrollbars,
.dark.platform-linux .quiet-scrollbars {
::-webkit-scrollbar {
width: 9px;
height: 9px;
background-color: transparent;
}
::-webkit-scrollbar-corner {
background-color: transparent;
}
::-webkit-scrollbar-thumb {
box-shadow: none;
border: none;
}
/* This looks like a dupe, but without it the thumb doesn't fade in
* properly, probably due to flakiness in how these styles are handled
* in the build of WebKit that's in CEF.
*/
::-webkit-scrollbar-corner {
background-color: transparent;
}
.dragging ::-webkit-scrollbar-thumb,
:hover::-webkit-scrollbar-thumb,
:focus::-webkit-scrollbar-thumb {
border-radius: 999px;
box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.6) inset;
border: 2px solid transparent;
}
.dragging ::-webkit-scrollbar-thumb,
:hover::-webkit-scrollbar-thumb:vertical,
:focus::-webkit-scrollbar-thumb:vertical {
min-height: 20px;
}
.dragging :-webkit-scrollbar-thumb,
:hover::-webkit-scrollbar-thumb:horizontal,
:focus::-webkit-scrollbar-thumb:horizontal {
min-width: 20px;
}
}
/* Always-visible scrollbar — same style as quiet-scrollbars but always shown.
Add element classes here to opt in. */
.visible-scrollbars,
.ai-plan-body {
&::-webkit-scrollbar {
width: 9px;
height: 9px;
background-color: transparent;
}
&::-webkit-scrollbar-thumb {
border-radius: 999px;
box-shadow: 0 0 0 5px rgba(0, 0, 0, 0.6) inset !important;
border: 2px solid transparent !important;
}
.dark & {
&::-webkit-scrollbar-thumb {
box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.3) inset !important;
}
}
}
/* Dropdown overflow menu needs track bg to match its popup background */
.dropdown-overflow-menu {
&::-webkit-scrollbar {
width: 9px;
height: 9px;
background-color: @bc-menu-bg !important;
}
&::-webkit-scrollbar-thumb {
border-radius: 999px;
box-shadow: 0 0 0 5px rgba(0, 0, 0, 0.3) inset !important;
border: 2px solid transparent !important;
}
.dark & {
&::-webkit-scrollbar {
background-color: @dark-bc-menu-bg !important;
}
&::-webkit-scrollbar-thumb {
box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.3) inset !important;
}
}
}
.platform-linux, .platform-mac {
// Note: when changing padding/margins, may need to adjust metrics in ScrollTrackMarkers.js
::-webkit-scrollbar {
width: 12px;
height: 12px;
}
::-webkit-scrollbar-track:vertical {
margin: 0 0 8px 0;
}
::-webkit-scrollbar-track:horizontal {
margin: 0 8px 0 0;
}
::-webkit-scrollbar-thumb {
border-radius: 999px;
box-shadow: 0 0 0 5px @linux-scrollbar-thumb inset;
border: 2px solid transparent;
}
::-webkit-scrollbar-corner {
background: none;
}
::-webkit-scrollbar-thumb:window-inactive {
box-shadow: 0 0 0 5px @linux-scrollbar-thumb-inactive inset;
}
}
.platform-win {
// Note: when changing padding/margins, may need to adjust metrics in ScrollTrackMarkers.js
::-webkit-scrollbar {
width: 12px;
height: 12px;
background-color: transparent;
}
::-webkit-scrollbar:hover {
background-color: @win-scrollbar-track;
}
::-webkit-scrollbar-thumb {
box-shadow: 0 0 0 12px @win-scrollbar-thumb inset;
}
.dragging ::-webkit-scrollbar-thumb,
::-webkit-scrollbar-thumb:hover,
::-webkit-scrollbar-thumb:focus {
box-shadow: 0 0 0 12px @win-scrollbar-thumb-hover inset;
}
::-webkit-scrollbar-thumb:active {
box-shadow: 0 0 0 12px @win-scrollbar-thumb-active inset;
}
::-webkit-scrollbar-thumb:vertical {
min-height: 20px;
}
::-webkit-scrollbar-thumb:horizontal {
min-width: 20px;
}
::-webkit-scrollbar-corner {
background: none;
}
}
// Dark Scrollbars
.dark {
/* Custom scrollbar colors */
&.platform-win {
.CodeMirror-scrollbar-filler {
background-color: rgb(30, 30, 30);
}
.CodeMirror-gutter-filler {
background-color: transparent;
}
// Note: when changing padding/margins, may need to adjust metrics in ScrollTrackMarkers.js
::-webkit-scrollbar {
background-color: transparent;
}
::-webkit-scrollbar:hover {
background-color: rgba(15, 15, 15, .5);
}
::-webkit-scrollbar-thumb {
box-shadow: 0 0 0 12px rgb(49, 49, 49) inset;
}
::-webkit-scrollbar-thumb:hover,
::-webkit-scrollbar-thumb:focus {
box-shadow: 0 0 0 12px rgb(89, 89, 89) inset;
}
::-webkit-scrollbar-thumb:active {
box-shadow: 0 0 0 12px rgb(169, 169, 169) inset;
}
}
&.platform-linux, &.platform-mac {
.CodeMirror-scrollbar-filler,
.CodeMirror-gutter-filler {
background-color: transparent;
}
::-webkit-scrollbar-thumb {
box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.24) inset;
}
::-webkit-scrollbar-thumb:window-inactive {
box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.12) inset;
}
}
}