|
| 1 | +/* |
| 2 | + * Copyright (c) 2012 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 | + background-color: rgba(0,0,0,0); |
| 43 | + box-shadow: none; |
| 44 | + border: none; |
| 45 | + } |
| 46 | + |
| 47 | + /* This looks like a dupe, but without it the thumb doesn't fade in |
| 48 | + * properly, probably due to flakiness in how these styles are handled |
| 49 | + * in the build of WebKit that's in CEF. |
| 50 | + */ |
| 51 | + ::-webkit-scrollbar-corner { |
| 52 | + background-color: transparent; |
| 53 | + } |
| 54 | + |
| 55 | + /* The data URIs for the thumb were generated from the Fireworks files in |
| 56 | + * styles/vertical-thumb-fw-outline.png and styles/horiz-thumb-fw-outline.png. |
| 57 | + */ |
| 58 | + :hover::-webkit-scrollbar-thumb:vertical, |
| 59 | + :focus::-webkit-scrollbar-thumb:vertical { |
| 60 | + -webkit-border-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAUCAYAAABf2RdVAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABV0RVh0Q3JlYXRpb24gVGltZQA0LzIzLzEyckCqugAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNXG14zYAAACPSURBVCiR7ZIhDoNAEEXfkJCsxKBJimTPwA3mDHvqsXWrquqaIH5FKUk3XKAJT87789U3SQkYgZ5fNuABvDpgrLUOOefZzBYzW3LOc6112J/pgL6UMkZE+lZERCqlHO0m6WZmCydICuDencmWK/Tfoc3dn63YbxsAkpKkyd1XwD/eV0nT7jBJAO2Ej+kCvAFNxTqyZCNcEQAAAABJRU5ErkJggg==") 9 0; |
| 61 | + border-color: transparent; |
| 62 | + border-width: 9px 0; |
| 63 | + min-height: 20px; |
| 64 | + } |
| 65 | + |
| 66 | + :hover::-webkit-scrollbar-thumb:horizontal, |
| 67 | + :focus::-webkit-scrollbar-thumb:horizontal { |
| 68 | + -webkit-border-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAJCAYAAAAywQxIAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABV0RVh0Q3JlYXRpb24gVGltZQA0LzIzLzEyckCqugAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNXG14zYAAACLSURBVCiRrdIxCgIxEEbhfxYFOyuxCCLazjGmTu6YKyRV7hFLCzshlcXCQoqxMWCd5B3gqx6pKgAcAJwA7NFfBVB2P+zsnLvGGI89kois3vtijAGp6sU5d+vFWsy85ZyfpKp3IuIRrKWqj2UG9N8CoFprP6MQM28NLCGE1wgqImtK6Q2g0uxtGjitL9E6N1T9Wl8CAAAAAElFTkSuQmCC") 0 9; |
| 69 | + border-color: transparent; |
| 70 | + border-width: 0 9px; |
| 71 | + min-width: 20px; |
| 72 | + } |
| 73 | +} |
| 74 | + |
| 75 | +.platform-linux, .platform-mac { |
| 76 | + ::-webkit-scrollbar { |
| 77 | + width: 12px; |
| 78 | + height: 12px; |
| 79 | + } |
| 80 | + |
| 81 | + ::-webkit-scrollbar-track:vertical { |
| 82 | + margin: 0 0 8px 0; |
| 83 | + } |
| 84 | + |
| 85 | + ::-webkit-scrollbar-track:horizontal { |
| 86 | + margin: 0 8px 0 0; |
| 87 | + } |
| 88 | + |
| 89 | + ::-webkit-scrollbar-thumb { |
| 90 | + border-radius: 999px; |
| 91 | + box-shadow: 0 0 0 4px @custom-scrollbar-thumb inset; |
| 92 | + border: 2px solid rgba(0, 0, 0, 0); |
| 93 | + } |
| 94 | + |
| 95 | + ::-webkit-scrollbar-corner { |
| 96 | + background: none; |
| 97 | + } |
| 98 | + |
| 99 | + ::-webkit-scrollbar-thumb:window-inactive { |
| 100 | + box-shadow: 0 0 0 5px @custom-scrollbar-thumb-inactive inset; |
| 101 | + } |
| 102 | +} |
0 commit comments