|
| 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 | +} |
0 commit comments