forked from phcode-dev/phoenix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
brackets_scrollbars.less
196 lines (163 loc) · 5.44 KB
/
brackets_scrollbars.less
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
/*
* 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.
*
*/
/* Temporary fix for issue#10150 for weird project tree scrollbar behaviour on mac. Scrollbar not appearing on hover. Forcing the project tree div to render displays the scrollbar. So setting transparent background color of div on hover.
*/
.platform-mac
{
.open-files-container:hover,
#project-files-container:hover {
background-color: rgba(128, 128, 128, 0);
}
}
/* 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;
}
}
.platform-linux {
// 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 4px @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: @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,
.CodeMirror-gutter-filler {
background-color: rgb(15, 15, 15);
}
// Note: when changing padding/margins, may need to adjust metrics in ScrollTrackMarkers.js
::-webkit-scrollbar {
background-color: rgb(15, 15, 15);
}
::-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 {
.CodeMirror-scrollbar-filler,
.CodeMirror-gutter-filler {
background-color: #1d1f21;
}
::-webkit-scrollbar-thumb {
box-shadow: 0 0 0 4px 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;
}
}
}