Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Commit fd39c6d

Browse files
committed
Merge pull request #5083 from adobe/larz/linux-scrollbar-sqaushed
Larz/linux scrollbar
2 parents 5086852 + edce885 commit fd39c6d

6 files changed

Lines changed: 108 additions & 76 deletions

File tree

src/index.html

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,6 @@
2929

3030
<!-- CSS/LESS -->
3131

32-
<!-- Temporary CSS for unobtrusive scrollbars. This can't live in LESS because it uses
33-
nonstandard WebKit-specific syntax. -->
34-
<link rel="stylesheet" href="styles/quiet-scrollbars.css">
35-
3632
<!-- NOTE: All scripts must be external for Chrome App support: http://developer.chrome.com/apps/app_csp.html -->
3733

3834
<!-- Warn about failed cross origin requests in Chrome -->

src/styles/brackets.less

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,6 @@ html, body {
6565
backface-visibility: hidden;
6666
}
6767

68-
body {
69-
height: 100%;
70-
}
71-
7268
.resizing-container {
7369
position: absolute;
7470
top: 0;
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
/*
2+
* Copyright (c) 2013 Adobe Systems Incorporated. All rights reserved.
3+
*
4+
* Permission is hereby granted, free of charge, to any person obtaining a
5+
* copy of this software and associated documentation files (the "Software"),
6+
* to deal in the Software without restriction, including without limitation
7+
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
8+
* and/or sell copies of the Software, and to permit persons to whom the
9+
* Software is furnished to do so, subject to the following conditions:
10+
*
11+
* The above copyright notice and this permission notice shall be included in
12+
* all copies or substantial portions of the Software.
13+
*
14+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19+
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20+
* DEALINGS IN THE SOFTWARE.
21+
*
22+
*/
23+
24+
/* Temporary implementation of unobtrusive scrollbars.
25+
FUTURE: These currently rely on nonstandard WebKit styles, and don't have all the right behavior.
26+
Longer-term, we'll need to implement custom scrollbars. */
27+
28+
.platform-mac .quiet-scrollbars,
29+
.platform-win .quiet-scrollbars,
30+
.platform-linux .quiet-scrollbars {
31+
32+
::-webkit-scrollbar {
33+
width: 9px;
34+
height: 9px;
35+
}
36+
37+
::-webkit-scrollbar-corner {
38+
background-color: transparent;
39+
}
40+
41+
::-webkit-scrollbar-thumb {
42+
box-shadow: none;
43+
border: none;
44+
}
45+
46+
/* This looks like a dupe, but without it the thumb doesn't fade in
47+
* properly, probably due to flakiness in how these styles are handled
48+
* in the build of WebKit that's in CEF.
49+
*/
50+
::-webkit-scrollbar-corner {
51+
background-color: transparent;
52+
}
53+
54+
:hover::-webkit-scrollbar-thumb,
55+
:focus::-webkit-scrollbar-thumb {
56+
border-radius: 999px;
57+
box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.6) inset;
58+
border: 2px solid transparent;
59+
}
60+
61+
:hover::-webkit-scrollbar-thumb:vertical,
62+
:focus::-webkit-scrollbar-thumb:vertical {
63+
min-height: 20px;
64+
}
65+
66+
:hover::-webkit-scrollbar-thumb:horizontal,
67+
:focus::-webkit-scrollbar-thumb:horizontal {
68+
min-width: 20px;
69+
}
70+
}
71+
72+
.platform-linux {
73+
::-webkit-scrollbar {
74+
width: 12px;
75+
height: 12px;
76+
}
77+
78+
::-webkit-scrollbar-track:vertical {
79+
margin: 0 0 8px 0;
80+
}
81+
82+
::-webkit-scrollbar-track:horizontal {
83+
margin: 0 8px 0 0;
84+
}
85+
86+
::-webkit-scrollbar-thumb {
87+
border-radius: 999px;
88+
box-shadow: 0 0 0 4px @custom-scrollbar-thumb inset;
89+
border: 2px solid transparent;
90+
}
91+
92+
::-webkit-scrollbar-corner {
93+
background: none;
94+
}
95+
96+
::-webkit-scrollbar-thumb:window-inactive {
97+
box-shadow: 0 0 0 5px @custom-scrollbar-thumb-inactive inset;
98+
}
99+
}

src/styles/brackets_shared.less

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,5 +58,8 @@
5858
// Codemirror styling overrides
5959
@import url(brackets_codemirror_override.less);
6060

61-
// styling for file tree
61+
// Styling for file tree
6262
@import url(jsTreeTheme.less);
63+
64+
// Styling for scrollbars
65+
@import url(brackets_scrollbars.less);

src/styles/brackets_theme_default.less

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,13 +107,17 @@
107107
@open-working-file-name-highlight: #8fddff;
108108
@open-working-file-ext-highlight: #8fddff;
109109

110-
/* Selection colors */
110+
/* selection colors */
111111
@selection-color-focused: #D9EFF7;
112112
@selection-color-unfocused: #e9e9e9;
113113

114114
/* background color of the line that has the cursor */
115115
@activeline-bgcolor: #e6e9e9;
116116

117+
/* custom scrollbar colors */
118+
@custom-scrollbar-thumb: rgba(0, 0, 0, 0.24);
119+
@custom-scrollbar-thumb-inactive: rgba(0, 0, 0, 0.12);
120+
117121
/* Code font formatting
118122
*
119123
* NOTE (JRB): In order to get the web font to load early enough, we have a div called "dummy-text" that

src/styles/quiet-scrollbars.css

Lines changed: 0 additions & 66 deletions
This file was deleted.

0 commit comments

Comments
 (0)